From 1c50a56f1dbe90baf21a0d318ca1e79b8b5d3da9 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 21 Dec 2018 16:25:01 +0000 Subject: [PATCH] Start setting up some infrastructure --- .gitignore | 101 ++++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 +- gateway.js | 8 ++++ package-lock.json | 5 +++ package.json | 15 +++++++ rfm95.mjs | 2 + 6 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 gateway.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 rfm95.mjs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c008877 --- /dev/null +++ b/.gitignore @@ -0,0 +1,101 @@ + +# Created by https://www.gitignore.io/api/node,git +# Edit at https://www.gitignore.io/?templates=node,git + +### Git ### +# Created by git for backups. To disable backups in Git: +# $ git config --global mergetool.keepBackup false +*.orig + +# Created by git when using merge tools for conflicts +*.BACKUP.* +*.BASE.* +*.LOCAL.* +*.REMOTE.* +*_BACKUP_*.txt +*_BASE_*.txt +*_LOCAL_*.txt +*_REMOTE_*.txt + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +#DynamoDB Local files +.dynamodb/ + +# End of https://www.gitignore.io/api/node,git diff --git a/README.md b/README.md index b308350..745c45a 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,9 @@ This repository contains my experiments into a bidirectional single-channel LoRa gateway. -Key folders: +Key places: - `Gateway-Python` - Some code I found that interacts with an RFM95 in Python. Based on [single_chan_pkt_fwd](https://github.com/tftelkamp/single_chan_pkt_fwd) - `Raw-RFM95` - Arduino code that interacts with an RFM95's registers directly via SPI. - `Raw-RFM95-Python` - Same as above, but in Python fort he Raspberry Pi. Tests the registeres to ensure they work correctly. + - `gateway.js` - The Node.JS port of all the above. diff --git a/gateway.js b/gateway.js new file mode 100644 index 0000000..03d39b6 --- /dev/null +++ b/gateway.js @@ -0,0 +1,8 @@ +const settings = { + +}; + +// Skip the first 2 items - they are node file.js +for(let i = 2; i < process.argv.length; i++) { + if(process.argv[i]) +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..70cefb2 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,5 @@ +{ + "name": "lora-gateway", + "version": "0.0.1", + "lockfileVersion": 1 +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f19eccd --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "lora-gateway", + "version": "0.0.1", + "description": "A bidirectional single-channel The Things Network gateway.", + "main": "gateway.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git@git.starbeamrainbowlabs.com:sbrl/TheThingsNetworkGateway.git" + }, + "author": "Starbeamrainbowlabs", + "license": "MPL-2.0" +} diff --git a/rfm95.mjs b/rfm95.mjs new file mode 100644 index 0000000..9ff6923 --- /dev/null +++ b/rfm95.mjs @@ -0,0 +1,2 @@ +import gpio from "gpio"; +import spi from "spi";