├── lorank8v1 ├── remote.env ├── efd08 │ ├── server.js.patch │ ├── loriot_lorank_8_iC880A_SPI_latest.tgz │ ├── uEnv.patch │ ├── init_form │ └── index.js.patch ├── fd541 │ ├── server.js.patch │ ├── loriot_lorank_8_iC880A_SPI_latest.tgz │ ├── uEnv.patch │ ├── init_form │ └── index.js.patch ├── photo.jpg ├── f6942 │ ├── uEnv.patch │ ├── loriot_lorank_8_iC880A_SPI_latest.tgz │ ├── sshd.patch │ ├── init_form │ ├── index.js.patch │ └── server.js.patch ├── manual.pdf ├── ngrok_2.3.25.gz ├── ngrok_latest.gz ├── 9e75c │ ├── loriot_lorank_8_iC880A_SPI_latest.tgz │ ├── uEnv.patch │ ├── init_form │ ├── index.js.patch │ └── server.js.patch ├── cb1ef │ ├── loriot_lorank_8_iC880A_SPI_latest.tgz │ ├── uEnv.patch │ ├── init_form │ ├── index.js.patch │ └── server.js.patch ├── lorank.service ├── restart.service ├── ngrok.service ├── ngrok_conf.json ├── restart ├── local_conf.json ├── init_aux ├── upgrade ├── init_prop ├── start ├── library.cfg ├── login.html ├── init_bbb ├── install ├── wipe ├── init_web ├── lora_suite ├── lorankctl ├── ResetIC880A.cpp ├── global_conf.json ├── manual.tex └── index.html ├── README.md ├── .gitattributes ├── .gitignore ├── install └── LICENSE /lorank8v1/remote.env: -------------------------------------------------------------------------------- 1 | TLS= 2 | RBT= 3 | -------------------------------------------------------------------------------- /lorank8v1/efd08/server.js.patch: -------------------------------------------------------------------------------- 1 | @@ Deliberately Empty 2 | -------------------------------------------------------------------------------- /lorank8v1/fd541/server.js.patch: -------------------------------------------------------------------------------- 1 | @@ Deliberately Empty 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Larank 2 | Software for the Larank product range. 3 | -------------------------------------------------------------------------------- /lorank8v1/photo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ideetron/Larank/HEAD/lorank8v1/photo.jpg -------------------------------------------------------------------------------- /lorank8v1/f6942/uEnv.patch: -------------------------------------------------------------------------------- 1 | 66a67,69 2 | > ##SPI0 3 | > uboot_overlay_addr4=/lib/firmware/BB-SPIDEV0-00A0.dtbo 4 | > 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pdf filter=lfs diff=lfs merge=lfs -text 2 | *.gz filter=lfs diff=lfs merge=lfs -text 3 | *.tgz filter=lfs diff=lfs merge=lfs -text 4 | -------------------------------------------------------------------------------- /lorank8v1/manual.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4970cd0cca0496b1f09e1568024b4a94858069860b93d32cbfc2834740d42dcd 3 | size 443531 4 | -------------------------------------------------------------------------------- /lorank8v1/ngrok_2.3.25.gz: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:eb38f569159f11f67949badc229f779d7eb0ec4e573c9381a214fbefb3a58eac 3 | size 12822996 4 | -------------------------------------------------------------------------------- /lorank8v1/ngrok_latest.gz: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:eb38f569159f11f67949badc229f779d7eb0ec4e573c9381a214fbefb3a58eac 3 | size 12822996 4 | -------------------------------------------------------------------------------- /lorank8v1/9e75c/loriot_lorank_8_iC880A_SPI_latest.tgz: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9c82cdca8b2db22ada8b5ef08e82b6302a436d0cb6de4a69137e72a83fe38671 3 | size 61940 4 | -------------------------------------------------------------------------------- /lorank8v1/cb1ef/loriot_lorank_8_iC880A_SPI_latest.tgz: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:081924fd799d8d1ec772b775c7b83fbcfb0ad07e100fc1ce8a3d770aa4ad784c 3 | size 55328 4 | -------------------------------------------------------------------------------- /lorank8v1/efd08/loriot_lorank_8_iC880A_SPI_latest.tgz: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:081924fd799d8d1ec772b775c7b83fbcfb0ad07e100fc1ce8a3d770aa4ad784c 3 | size 55328 4 | -------------------------------------------------------------------------------- /lorank8v1/efd08/uEnv.patch: -------------------------------------------------------------------------------- 1 | 16a17,19 2 | > #Enable SPI0, Disable HDMI 3 | > optargs=quiet drm.debug=7 capemgr.enable_partno=BB-SPIDEV0 capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN 4 | > 5 | -------------------------------------------------------------------------------- /lorank8v1/f6942/loriot_lorank_8_iC880A_SPI_latest.tgz: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9c82cdca8b2db22ada8b5ef08e82b6302a436d0cb6de4a69137e72a83fe38671 3 | size 61940 4 | -------------------------------------------------------------------------------- /lorank8v1/fd541/loriot_lorank_8_iC880A_SPI_latest.tgz: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:081924fd799d8d1ec772b775c7b83fbcfb0ad07e100fc1ce8a3d770aa4ad784c 3 | size 55328 4 | -------------------------------------------------------------------------------- /lorank8v1/9e75c/uEnv.patch: -------------------------------------------------------------------------------- 1 | 38c38,41 2 | < #cape_enable=bone_capemgr.enable_partno= 3 | --- 4 | > #cape_enable=bone_capemgr.enable_partno= 5 | > 6 | > ##SPI0 7 | > cape_enable=bone_capemgr.enable_partno=BB-SPIDEV0 8 | -------------------------------------------------------------------------------- /lorank8v1/cb1ef/uEnv.patch: -------------------------------------------------------------------------------- 1 | 10c10,13 2 | < cape_enable=capemgr.enable_partno=BB-UART2 3 | --- 4 | > #cape_enable=capemgr.enable_partno=BB-UART2 5 | > 6 | > ##SPI0 7 | > cape_enable=capemgr.enable_partno=BB-SPIDEV0 8 | -------------------------------------------------------------------------------- /lorank8v1/fd541/uEnv.patch: -------------------------------------------------------------------------------- 1 | 15c15,18 2 | < #cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN 3 | --- 4 | > cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN 5 | > 6 | > ##SPI0 7 | > cape_enable=capemgr.enable_partno=BB-SPIDEV0 8 | 9 | -------------------------------------------------------------------------------- /lorank8v1/lorank.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Lorank activation 3 | 4 | [Service] 5 | WorkingDirectory=/root/lorank8v1/ 6 | ExecStart=/root/lorank8v1/start 7 | SyslogIdentifier=lorank8v1.forwarder 8 | Restart=on-failure 9 | RestartSec=5 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /lorank8v1/f6942/sshd.patch: -------------------------------------------------------------------------------- 1 | --- org/sshd_config 2018-11-27 21:27:37.975138871 +0000 2 | +++ new/sshd_config 2018-11-27 21:31:41.540327876 +0000 3 | @@ -27,6 +27,7 @@ 4 | #LogLevel INFO 5 | 6 | # Authentication: 7 | +PermitRootLogin yes 8 | 9 | #LoginGraceTime 2m 10 | #PermitRootLogin prohibit-password 11 | -------------------------------------------------------------------------------- /lorank8v1/restart.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Lorank restart 3 | 4 | [Service] 5 | WorkingDirectory=/root/lorank8v1/ 6 | EnvironmentFile=/root/lorank8v1/remote.env 7 | ExecStart=/root/lorank8v1/restart $RBT 8 | SyslogIdentifier=lorank8v1.restart 9 | Type=simple 10 | Restart=always 11 | RestartSec=120 12 | 13 | [Install] 14 | WantedBy=multi-user.target 15 | -------------------------------------------------------------------------------- /lorank8v1/ngrok.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Lorank remote 3 | 4 | [Service] 5 | WorkingDirectory=/root/lorank8v1/ 6 | EnvironmentFile=/root/lorank8v1/remote.env 7 | ExecStart=/usr/bin/ngrok start -config ngrok_conf.json -config local_conf.json $TNL 8 | SyslogIdentifier=lorank8v1.remote 9 | Restart=on-failure 10 | RestartSec=30 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /lorank8v1/ngrok_conf.json: -------------------------------------------------------------------------------- 1 | { "console_ui": false, 2 | "log_level": "info", 3 | "log_format": "logfmt", 4 | "log": "/var/log/ngrok.log", 5 | "tunnels": 6 | { "web": 7 | { "proto": "http", 8 | "addr": 80, 9 | "remote_addr": 80, 10 | "bind_tls": false, 11 | "inspect": false }, 12 | "ssh": 13 | { "proto": "tcp", 14 | "addr": 22, 15 | "inspect": false } } } 16 | -------------------------------------------------------------------------------- /lorank8v1/cb1ef/init_form: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start this script once to prepare a new BeagleBone 4 | # In the directory you cloned the repro Lorank in. 5 | 6 | TARGETDIR=lorank8v1 7 | 8 | # Stop on the first sign of trouble 9 | set -e 10 | 11 | # Check if we start at the correct location 12 | if [ ! -d Lorank ] 13 | then 14 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 15 | exit 1 16 | fi 17 | -------------------------------------------------------------------------------- /lorank8v1/efd08/init_form: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start this script once to prepare a new BeagleBone 4 | # In the directory you cloned the repro Lorank in. 5 | 6 | TARGETDIR=lorank8v1 7 | 8 | # Stop on the first sign of trouble 9 | set -e 10 | 11 | # Check if we start at the correct location 12 | if [ ! -d Lorank ] 13 | then 14 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 15 | exit 1 16 | fi 17 | -------------------------------------------------------------------------------- /lorank8v1/fd541/init_form: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start this script once to prepare a new BeagleBone 4 | # In the directory you cloned the repro Lorank in. 5 | 6 | TARGETDIR=lorank8v1 7 | 8 | # Stop on the first sign of trouble 9 | set -e 10 | 11 | # Check if we start at the correct location 12 | if [ ! -d Lorank ] 13 | then 14 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 15 | exit 1 16 | fi 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.ko 4 | *.obj 5 | *.elf 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Libraries 12 | *.lib 13 | *.a 14 | *.la 15 | *.lo 16 | 17 | # Shared objects (inc. Windows DLLs) 18 | *.dll 19 | *.so 20 | *.so.* 21 | *.dylib 22 | 23 | # Executables 24 | *.exe 25 | *.out 26 | *.app 27 | *.i*86 28 | *.x86_64 29 | *.hex 30 | 31 | # Debug files 32 | *.dSYM/ 33 | 34 | #Specific Executables 35 | lorank8v1/ResetIC880A 36 | -------------------------------------------------------------------------------- /lorank8v1/restart: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # keep trying the internet connection, with some rome for hickups, 4 | # and reboot when there is no connection for at least one minute. 5 | # Do nothing if the startup parameter is less then 10 minutes. 6 | while [ $1 -gt 599 ]; do 7 | sleep $1 8 | output=$(ping -q -c4 -i15 google.com 2>&1 | grep packets) 9 | status=$? 10 | logger "ping google.com => $output" 11 | if [ $status -ne 0 ] ; then /sbin/reboot; fi 12 | done 13 | -------------------------------------------------------------------------------- /lorank8v1/local_conf.json: -------------------------------------------------------------------------------- 1 | { "authtoken": "", 2 | "metadata": "1DEE000000000000", 3 | "region": "eu", 4 | "gateway_conf": 5 | { "gateway_ID": "1DEE000000000000", 6 | "ref_latitude": 0, 7 | "ref_longitude": 0, 8 | "ref_altitude": 0, 9 | "contact_email": "", 10 | "description": "" }, 11 | "web_conf": 12 | { "username": "", 13 | "password": "" }, 14 | "remote_conf": 15 | { "ssh": false, 16 | "web": false, 17 | "reboot": 0 } } 18 | -------------------------------------------------------------------------------- /lorank8v1/9e75c/init_form: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start this script once to prepare a new BeagleBone 4 | # In the directory you cloned the repro Lorank in. 5 | 6 | TARGETDIR=lorank8v1 7 | 8 | # Stop on the first sign of trouble 9 | set -e 10 | 11 | # Check if we start at the correct location 12 | if [ ! -d Lorank ] 13 | then 14 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 15 | exit 1 16 | fi 17 | 18 | # Remove the x11 packages for they take too much space 19 | apt-get -y -q --purge remove x11-* 20 | apt-get -y -q autoremove 21 | 22 | -------------------------------------------------------------------------------- /lorank8v1/f6942/init_form: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start this script once to prepare a new BeagleBone 4 | # In the directory you cloned the repro Lorank in. 5 | 6 | TARGETDIR=lorank8v1 7 | 8 | # Stop on the first sign of trouble 9 | set -e 10 | 11 | # Check if we start at the correct location 12 | if [ ! -d Lorank ] 13 | then 14 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 15 | exit 1 16 | fi 17 | 18 | # Remove the x11 packages for they take too much space 19 | apt-get -y -q --purge remove x11-* 20 | apt-get -y -q autoremove 21 | 22 | # Doing that again get rid of even more. 23 | apt-get -y -q --purge remove x11-* 24 | apt-get -y -q autoremove 25 | -------------------------------------------------------------------------------- /lorank8v1/init_aux: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This part contains the installation of auxiliary software 4 | 5 | TARGETDIR=lorank8v1 6 | 7 | # Stop on the first sign of trouble 8 | set -e 9 | 10 | # Check if we start at the correct location 11 | if [ ! -d Lorank ] 12 | then 13 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 14 | exit 1 15 | fi 16 | 17 | # Make the Lorank platform specific software 18 | pushd Lorank/$TARGETDIR 19 | g++ -O2 -Wall ResetIC880A.cpp -o ResetIC880A 20 | popd 21 | 22 | # Install a script to guard the internet connection. 23 | cp Lorank/$TARGETDIR/restart $TARGETDIR/ 24 | 25 | # Install the configuration files for remote contol 26 | cp Lorank/$TARGETDIR/ngrok_conf.json $TARGETDIR/ 27 | cp Lorank/$TARGETDIR/remote.env $TARGETDIR/ 28 | 29 | # Install the optional services, but do not enable them yet. 30 | cp Lorank/$TARGETDIR/restart.service /lib/systemd/system/ 31 | cp Lorank/$TARGETDIR/ngrok.service /lib/systemd/system/ 32 | 33 | -------------------------------------------------------------------------------- /lorank8v1/9e75c/index.js.patch: -------------------------------------------------------------------------------- 1 | *** index.jsORG Fri Jan 17 19:56:06 2014 2 | --- index.js Tue Mar 29 20:06:10 2016 3 | *************** 4 | *** 532,541 **** 5 | --- 532,555 ---- 6 | if(callback) callback({'data': data}); 7 | return(data); 8 | }; 9 | f.echo.args = ['data', 'callback']; 10 | 11 | + f.lorankctl = function(arg, callback) { 12 | + var args="'"+arg+"'"; 13 | + var sep=arg.indexOf("|"); 14 | + if (sep>0) args="'"+arg.slice(0,sep)+"' '"+arg.slice(sep+1)+"'"; 15 | + child_process.exec("/root/lorank8v1/lorankctl " + args , response); 16 | + function response(error, stdout, stderr) { 17 | + if(typeof callback != 'function') return; 18 | + if(error) callback({'error': error}); 19 | + if(stdout) callback({'stdout': stdout}); 20 | + if(stderr) callback({'stderr': stderr}); 21 | + } 22 | + }; 23 | + f.lorankctl.args = ['arg', 'callback']; 24 | + 25 | f.setDate = function(date, callback) { 26 | child_process.exec('date -s "' + date + '"', dateResponse); 27 | 28 | function dateResponse(error, stdout, stderr) { 29 | if(typeof callback != 'function') return; 30 | -------------------------------------------------------------------------------- /lorank8v1/f6942/index.js.patch: -------------------------------------------------------------------------------- 1 | *** /old/index.js Wed Nov 28 11:28:10 2018 2 | --- /new/index.js Wed Nov 28 12:47:16 2018 3 | *************** 4 | *** 535,544 **** 5 | --- 535,558 ---- 6 | if(callback) callback({'data': data}); 7 | return(data); 8 | }; 9 | f.echo.args = ['data', 'callback']; 10 | 11 | + f.lorankctl = function(arg, callback) { 12 | + var args="'"+arg+"'"; 13 | + var sep=arg.indexOf("|"); 14 | + if (sep>0) args="'"+arg.slice(0,sep)+"' '"+arg.slice(sep+1)+"'"; 15 | + child_process.exec("/root/lorank8v1/lorankctl " + args , response); 16 | + function response(error, stdout, stderr) { 17 | + if(typeof callback != 'function') return; 18 | + if(error) callback({'error': error}); 19 | + if(stdout) callback({'stdout': stdout}); 20 | + if(stderr) callback({'stderr': stderr}); 21 | + } 22 | + }; 23 | + f.lorankctl.args = ['arg', 'callback']; 24 | + 25 | f.setDate = function(date, callback) { 26 | child_process.exec('date -s "' + date + '"', dateResponse); 27 | 28 | function dateResponse(error, stdout, stderr) { 29 | if(typeof callback != 'function') return; 30 | -------------------------------------------------------------------------------- /lorank8v1/cb1ef/index.js.patch: -------------------------------------------------------------------------------- 1 | *** index.jsORG Fri Jan 17 19:56:06 2014 2 | --- index.js Tue Mar 29 20:06:10 2016 3 | *************** 4 | *** 474,483 **** 5 | --- 474,497 ---- 6 | callback({'data': data}); 7 | return(data); 8 | }; 9 | f.echo.args = ['data', 'callback']; 10 | 11 | + f.lorankctl = function(arg, callback) { 12 | + var args="'"+arg+"'"; 13 | + var sep=arg.indexOf("|"); 14 | + if (sep>0) args="'"+arg.slice(0,sep)+"' '"+arg.slice(sep+1)+"'"; 15 | + child_process.exec("/root/lorank8v1/lorankctl " + args , response); 16 | + function response(error, stdout, stderr) { 17 | + if(typeof callback != 'function') return; 18 | + if(error) callback({'error': error}); 19 | + if(stdout) callback({'stdout': stdout}); 20 | + if(stderr) callback({'stderr': stderr}); 21 | + } 22 | + }; 23 | + f.lorankctl.args = ['arg', 'callback']; 24 | + 25 | f.setDate = function(date, callback) { 26 | child_process.exec('date -s "' + date + '"', dateResponse); 27 | function dateResponse(error, stdout, stderr) { 28 | if(typeof callback != 'function') return; 29 | if(error) callback({'error': error}); 30 | -------------------------------------------------------------------------------- /lorank8v1/efd08/index.js.patch: -------------------------------------------------------------------------------- 1 | *** index.jsORG Fri Jan 17 19:56:06 2014 2 | --- index.js Tue Mar 29 20:06:10 2016 3 | *************** 4 | *** 474,483 **** 5 | --- 474,497 ---- 6 | callback({'data': data}); 7 | return(data); 8 | }; 9 | f.echo.args = ['data', 'callback']; 10 | 11 | + f.lorankctl = function(arg, callback) { 12 | + var args="'"+arg+"'"; 13 | + var sep=arg.indexOf("|"); 14 | + if (sep>0) args="'"+arg.slice(0,sep)+"' '"+arg.slice(sep+1)+"'"; 15 | + child_process.exec("/root/lorank8v1/lorankctl " + args , response); 16 | + function response(error, stdout, stderr) { 17 | + if(typeof callback != 'function') return; 18 | + if(error) callback({'error': error}); 19 | + if(stdout) callback({'stdout': stdout}); 20 | + if(stderr) callback({'stderr': stderr}); 21 | + } 22 | + }; 23 | + f.lorankctl.args = ['arg', 'callback']; 24 | + 25 | f.setDate = function(date, callback) { 26 | child_process.exec('date -s "' + date + '"', dateResponse); 27 | function dateResponse(error, stdout, stderr) { 28 | if(typeof callback != 'function') return; 29 | if(error) callback({'error': error}); 30 | -------------------------------------------------------------------------------- /lorank8v1/fd541/index.js.patch: -------------------------------------------------------------------------------- 1 | *** index.jsORG Fri Jan 17 19:56:06 2014 2 | --- index.js Tue Mar 29 20:06:10 2016 3 | *************** 4 | *** 474,483 **** 5 | --- 474,497 ---- 6 | callback({'data': data}); 7 | return(data); 8 | }; 9 | f.echo.args = ['data', 'callback']; 10 | 11 | + f.lorankctl = function(arg, callback) { 12 | + var args="'"+arg+"'"; 13 | + var sep=arg.indexOf("|"); 14 | + if (sep>0) args="'"+arg.slice(0,sep)+"' '"+arg.slice(sep+1)+"'"; 15 | + child_process.exec("/root/lorank8v1/lorankctl " + args , response); 16 | + function response(error, stdout, stderr) { 17 | + if(typeof callback != 'function') return; 18 | + if(error) callback({'error': error}); 19 | + if(stdout) callback({'stdout': stdout}); 20 | + if(stderr) callback({'stderr': stderr}); 21 | + } 22 | + }; 23 | + f.lorankctl.args = ['arg', 'callback']; 24 | + 25 | f.setDate = function(date, callback) { 26 | child_process.exec('date -s "' + date + '"', dateResponse); 27 | function dateResponse(error, stdout, stderr) { 28 | if(typeof callback != 'function') return; 29 | if(error) callback({'error': error}); 30 | -------------------------------------------------------------------------------- /lorank8v1/upgrade: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start this script with the software version number as argument 4 | # In the directory you cloned the repro Lorank in. 5 | # This script is suitable for upgrading only 6 | 7 | VERSION=$1 8 | HWTARGET=lorank8v1 9 | 10 | # Stop on the first sign of trouble 11 | set -e 12 | 13 | # Check if a version is supplied (obligatory at this point) 14 | if [[ $VERSION == "" ]] 15 | then 16 | echo "WARNING: No version number supplied, use latest." 17 | fi 18 | 19 | # Check if we start at the correct location 20 | if [ ! -d Lorank ] 21 | then 22 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 23 | exit 1 24 | fi 25 | 26 | # Upgrade the Lorank tree 27 | pushd Lorank 28 | git checkout master 29 | git pull 30 | if [[ $VERSION != "" ]]; then git checkout -q Lorank_v$VERSION; fi 31 | popd 32 | 33 | # Reinstall the auxiliary software 34 | ./Lorank/$HWTARGET/init_aux 35 | 36 | # Reinstall the website 37 | ./Lorank/$HWTARGET/init_web 38 | 39 | # Renstall the proprietary software 40 | ./Lorank/$HWTARGET/init_prop 41 | 42 | # Reinstall the lora suite 43 | ./Lorank/$HWTARGET/lora_suite $VERSION 44 | 45 | # Inform the user. 46 | echo "INFO: Upgrade complete, please restart the concentrator manually." 47 | 48 | 49 | -------------------------------------------------------------------------------- /lorank8v1/init_prop: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This part contains the installation of proprietary software 4 | 5 | TARGETDIR=lorank8v1 6 | DOGTAG=$(md5sum /etc/dogtag) 7 | DTSHORT=${DOGTAG:0:5} 8 | 9 | # Stop on the first sign of trouble 10 | set -e 11 | 12 | # Check if we start at the correct location 13 | if [ ! -d Lorank ] 14 | then 15 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 16 | exit 1 17 | fi 18 | 19 | if [ ! -d Lorank/$TARGETDIR/$DTSHORT ] 20 | then 21 | echo "ERROR: BBB Release not known, no initialization possible" 22 | exit 1 23 | fi 24 | 25 | # Make necessary directories 26 | mkdir -p Lorank/Ngrok 27 | mkdir -p Lorank/Loriot 28 | 29 | # Get the ngrok binairy for remote maintenance 30 | pushd Lorank/Ngrok 31 | wget -nv -N https://github.com/Ideetron/Lorank/raw/master/$TARGETDIR/ngrok_2.3.25.gz 32 | gunzip -c ngrok_2.3.25.gz > /usr/bin/ngrok 33 | chown root:root /usr/bin/ngrok 34 | chmod u+x /usr/bin/ngrok 35 | popd 36 | 37 | # Get the Loriot packet forwarder 38 | pushd Lorank/Loriot 39 | wget -nv -N https://github.com/Ideetron/Lorank/raw/master/$TARGETDIR/$DTSHORT/loriot_lorank_8_iC880A_SPI_latest.tgz 40 | tar xf loriot_lorank_8_iC880A_SPI_latest.tgz 41 | mv loriot_lorank_8_iC880A_SPI_*[^.tgz] loriot_pkt_fwd 42 | chown root:root loriot_pkt_fwd 43 | chmod a+x loriot_pkt_fwd 44 | popd 45 | 46 | # Install certificates for Loriot. 47 | apt-get install -qq ca-certificates 48 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # start me like: install lorank8v1 1.0.1 4 | # from the directory you cloned the repro Lorank in. 5 | 6 | # Control of urs leds 7 | function led_on { pushd /sys/class/leds/beaglebone\:green\:usr$1; echo none > trigger; echo 1 > brightness; popd; } 8 | function led_off { pushd /sys/class/leds/beaglebone\:green\:usr$1; echo none > trigger; echo 0 > brightness; popd; } 9 | function led_flash { pushd /sys/class/leds/beaglebone\:green\:usr$1; echo timer > trigger; echo 50 > delay_on; echo 100 > delay_off; popd; } 10 | function led_blank { led_off 0; led_off 1; led_off 2; led_off 3; } 11 | function led_error { led_flash 0; led_flash 1; led_flash 2; led_flash 3; } 12 | 13 | HWTARGET=$1 14 | SWVERSION=$2 15 | 16 | # report progress 17 | led_blank 18 | led_flash 0 19 | sleep 1 20 | 21 | # Set the Lorank installation software to the correct release. 22 | pushd Lorank 23 | if [[ $SWVERSION != "" ]]; then git checkout -q Lorank_v$SWVERSION; fi 24 | popd 25 | 26 | # Start the platform dependent installation for this release. 27 | if [[ $HWTARGET != "" ]] && [ -e ./Lorank/$HWTARGET/install ] 28 | then 29 | ./Lorank/$HWTARGET/install $SWVERSION 30 | else 31 | echo "Target does not exist, nothing to install." 32 | led_error 33 | exit 1 34 | fi 35 | 36 | 37 | # We are done, check if we must report an error, if not terminate. 38 | if [ $? -ne 0 ]; 39 | then 40 | led_error 41 | else 42 | systemctl --no-block poweroff 43 | fi 44 | 45 | -------------------------------------------------------------------------------- /lorank8v1/start: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | FRWD=$(cat "./forwarder") 4 | 5 | # Test the connection, wait if needed, but not forever. 6 | CNT=5 7 | while [[ $(ping -c1 google.com 2>&1 | grep " 0% packet loss") == "" ]] && [[ $CNT -gt 0 ]]; do 8 | echo "Concentrator: waiting for internet connection ... " 9 | let CNT=CNT-1 10 | sleep 30 11 | done 12 | 13 | if [[ $(ping -c1 google.com 2>&1 | grep " 0% packet loss") == "" ]] 14 | then 15 | echo "Concentrator: internet does not work or is blocked, let's just continue ... " 16 | fi 17 | 18 | 19 | # Test if the time has already been set, wait if needed, but not for ever. 20 | CNT=5 21 | while [[ $(date +%Y) -lt 2016 ]] && [[ $CNT -gt 0 ]]; do 22 | echo "Concentrator: waiting for clock to be set, ($CNT) ... " 23 | let CNT=CNT-1 24 | sleep 15 25 | done 26 | 27 | if [[ $(date +%Y) -lt 2016 ]] 28 | then 29 | echo "Concentrator: time is still more than a year off, let's just continue ... " 30 | fi 31 | 32 | 33 | # Reset the concentrator board and fire up the forwarder. 34 | ./ResetIC880A 35 | 36 | # Select the apropiate forwarder and start it. 37 | if [[ $FRWD == "fw_semtech" ]] 38 | then 39 | echo "Starting the standard Semtech packet forwarder." 40 | ./lora_pkt_fwd 41 | elif [[ $FRWD == "fw_loriot" ]] 42 | then 43 | echo "Starting the Loriot packet forwarder" 44 | ./loriot_pkt_fwd -f 45 | else 46 | echo "Starting the Poly packet forwarder." 47 | echo "{}" > stats.txt 48 | ./poly_pkt_fwd 49 | fi 50 | -------------------------------------------------------------------------------- /lorank8v1/library.cfg: -------------------------------------------------------------------------------- 1 | # That file will be included in the Makefile files that have hardware dependencies 2 | 3 | ### SPI interface to the concentrator ### 4 | # Accepted values (replace ??? bij one of those below) 5 | # native Linux native SPI driver (RECOMMENDED). 6 | # Note: check the value of /dev/spidevX.X defined in source code 7 | # to ensure the right device will be opened on your platform. 8 | # ftdi FTDI SPI-over-USB bridge using libmpsse/libftdi/libusb 9 | # mac FTDI SPI-over-USB bridge using libmpsse on the MAC 10 | # Note: building on the MAC (OSX) is for testing purposes only 11 | # not for regular operations. 12 | 13 | CFG_SPI= native 14 | 15 | 16 | ### Specify which platform you are on. 17 | # Accepted values: (replace ??? bij one of those below) 18 | # kerlink This is the default from Semtech and works for the Kerlink 19 | # lorank This is for the Lorank (BeagleBone + IMST concentrator). 20 | # imst_rpi This is for the IMST concentrators with a Raspberry Pi host. 21 | # linklabs_blowfish_rpi This is for the LinkLabs concentrators with a Raspberry Pi host. 22 | 23 | PLATFORM= lorank 24 | 25 | 26 | ### Debug options ### 27 | # Set the DEBUG_* to 1 to activate debug mode in individual modules. 28 | # Warning: that makes the module *very verbose*, do not use for production 29 | 30 | DEBUG_AUX= 0 31 | DEBUG_SPI= 0 32 | DEBUG_REG= 0 33 | DEBUG_HAL= 0 34 | DEBUG_LBT= 0 35 | DEBUG_GPS= 0 36 | -------------------------------------------------------------------------------- /lorank8v1/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Lorank 8 - Login 14 | 15 | 16 | 17 | 18 | 38 | 39 | 40 | 41 | 42 |
43 |
44 |
45 |
46 |
47 | 48 | 49 |
50 |
51 | 52 | 53 |
54 |
55 |
56 | 57 |
58 |
59 |
60 |
61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /lorank8v1/init_bbb: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start this script once to prepare a new BeagleBone 4 | # In the directory you cloned the repro Lorank in. 5 | 6 | TARGETDIR=lorank8v1 7 | DOGTAG=$(md5sum /etc/dogtag) 8 | DTSHORT=${DOGTAG:0:5} 9 | 10 | # Stop on the first sign of trouble 11 | set -e 12 | 13 | # Check if we start at the correct location 14 | if [ ! -d Lorank ] 15 | then 16 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 17 | exit 1 18 | fi 19 | 20 | if [ ! -d Lorank/$TARGETDIR/$DTSHORT ] 21 | then 22 | echo "ERROR: BeagleBone Release not known, no initialization possible" 23 | exit 1 24 | fi 25 | 26 | # Make dir for the system files we are about to modify 27 | mkdir -p /root/savesys 28 | 29 | # Make sure lorank gets to be a service after boottime 30 | cp Lorank/$TARGETDIR/lorank.service /lib/systemd/system/ 31 | systemctl enable lorank.service 32 | 33 | # Disable HDMI on the BBB, enable SPI 34 | if [ -e /boot/uEnv.txt ] 35 | then 36 | cp -an /boot/uEnv.txt /root/savesys/boot_uEnv.txt 37 | patch -lN /boot/uEnv.txt Lorank/$TARGETDIR/$DTSHORT/uEnv.patch 38 | elif [ -e /boot/uboot/uEnv.txt ] 39 | then 40 | cp -an /boot/uboot/uEnv.txt /root/savesys/boot_uboot_uEnv.txt 41 | patch -lN /boot/uboot/uEnv.txt Lorank/$TARGETDIR/$DTSHORT/uEnv.patch 42 | else 43 | echo "Could not patch uEnv.txt" 44 | exit 1 45 | fi 46 | 47 | # Set the hostname to lorank8 48 | BBBNAME=$(hostname) 49 | NEWNAME="lorank8" 50 | hostname $NEWNAME 51 | echo $NEWNAME > /etc/hostname 52 | sed -i "s/$BBBNAME/$NEWNAME/" /etc/hosts 53 | 54 | # Generate a key-pair so you can enable remote maintenance 55 | if [ ! -e /root/.ssh/id_rsa ] 56 | then 57 | ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa 58 | fi 59 | 60 | # Set a password for the root (user must change this on first use!) 61 | echo "root:LorankAdmin" | chpasswd 62 | 63 | # Sometimes, there is no root access allowed over shh. 64 | # Disable the default debian login only when patch succeeds or is not needed 65 | if [ -e Lorank/$TARGETDIR/$DTSHORT/sshd.patch ] 66 | then 67 | cp -an /etc/ssh/sshd_config /root/savesys/sshd_config 68 | patch -lN /etc/ssh/sshd_config Lorank/$TARGETDIR/$DTSHORT/sshd.patch && passwd debian -l 69 | else 70 | passwd debian -l 71 | fi 72 | 73 | -------------------------------------------------------------------------------- /lorank8v1/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start this script with the software version number as argument 4 | # In the directory you cloned the repro Lorank in. 5 | # This script is NOT suitable for upgrading, but only for one time 6 | # initialization of a clean Beagle Bone. 7 | 8 | # Control of urs leds 9 | function led_on { pushd /sys/class/leds/beaglebone\:green\:usr$1; echo none > trigger; echo 1 > brightness; popd; } 10 | function led_off { pushd /sys/class/leds/beaglebone\:green\:usr$1; echo none > trigger; echo 0 > brightness; popd; } 11 | function led_flash { pushd /sys/class/leds/beaglebone\:green\:usr$1; echo timer > trigger; echo 50 > delay_on; echo 100 > delay_off; popd; } 12 | function led_blank { led_off 0; led_off 1; led_off 2; led_off 3; } 13 | function led_error { led_flash 0; led_flash 1; led_flash 2; led_flash 3; } 14 | 15 | VERSION=$1 16 | HWTARGET=lorank8v1 17 | DOGTAG=$(md5sum /etc/dogtag) 18 | DTSHORT=${DOGTAG:0:5} 19 | 20 | # Stop on the first sign of trouble 21 | set -e 22 | 23 | # Check if a version is supplied (obligatory at this point) 24 | if [[ $VERSION == "" ]] 25 | then 26 | echo "WARNING: No version number supplied, use latest." 27 | fi 28 | 29 | # Check if we start at the correct location 30 | if [ ! -d Lorank ] 31 | then 32 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 33 | exit 1 34 | fi 35 | 36 | if [ ! -d Lorank/$HWTARGET/$DTSHORT ] 37 | then 38 | echo "ERROR: BBB Release not known, no initialization possible" 39 | exit 1 40 | fi 41 | 42 | 43 | # report progress 44 | led_flash 0 45 | sleep 1 46 | 47 | # Initialize the BeagleBone for first use. 48 | ./Lorank/$HWTARGET/init_bbb 49 | 50 | # Perform the platform dependent initialization. 51 | ./Lorank/$HWTARGET/$DTSHORT/init_form 52 | 53 | # Install the auxiliary software 54 | ./Lorank/$HWTARGET/init_aux 55 | 56 | 57 | # report progress 58 | led_on 0 59 | led_flash 1 60 | sleep 1 61 | 62 | # Install the website 63 | ./Lorank/$HWTARGET/init_web 64 | 65 | 66 | # report progress 67 | led_on 1 68 | led_flash 2 69 | sleep 1 70 | 71 | # Install the proprietary software 72 | ./Lorank/$HWTARGET/init_prop 73 | 74 | 75 | # report progress 76 | led_on 2 77 | led_flash 3 78 | sleep 1 79 | 80 | # Install the lora suite. 81 | ./Lorank/$HWTARGET/lora_suite $VERSION 82 | 83 | 84 | # We are done 85 | led_on 3 86 | sleep 1 87 | 88 | -------------------------------------------------------------------------------- /lorank8v1/wipe: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start this script to remove Lorank and modifications 4 | # In the directory you cloned the repro Lorank in. 5 | # option "--force" is required to start. 6 | 7 | TARGETDIR=lorank8v1 8 | 9 | # Stop on the first sign of trouble 10 | set -e 11 | 12 | if [ ! -d Lorank ] 13 | then 14 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 15 | exit 1 16 | fi 17 | 18 | if [[ $1 != "--force" ]] 19 | then 20 | echo "INFO: Option --force is required to prevent accidental wiping of Lorank services." 21 | echo "This script deletes Lorank software AND bootup services required to reset hardware." 22 | echo "There are valid reasons for use, but a simple software upgrade is NOT one of them." 23 | echo "After a wipe, complete reinstall of lora software is required, use with extreme care." 24 | echo "In case of doubt, do NOT use." 25 | exit 26 | fi 27 | 28 | # Remove the Lorank directory (of which everything is a child) 29 | rm -rf Lorank 30 | rm -rf lorank* 31 | 32 | 33 | # Restore the boot environment 34 | if [ -e /root/savesys/boot_uEnv.txt ] 35 | then 36 | cp -af /root/savesys/boot_uEnv.txt /boot/uEnv.txt 37 | fi 38 | 39 | if [ -e /root/savesys/boot_uboot_uEnv.txt ] 40 | then 41 | cp -af /root/savesys/boot_uboot_uEnv.txt /boot/uboot/uEnv.txt 42 | fi 43 | 44 | # Restore the system environment 45 | if [ -e /root/savesys/sshd_config ] 46 | then 47 | cp -af /root/savesys/sshd_config /etc/ssh/sshd_config 48 | fi 49 | 50 | # Restore the webpage 51 | if [ -e /root/savesys/cloud9_index.html ] 52 | then 53 | rm -f /var/lib/cloud9/login.html 54 | rm -f /var/lib/cloud9/images/photo.jpg 55 | cp -af /root/savesys/cloud9_index.html /var/lib/cloud9/index.html 2>/dev/null || : 56 | elif [ -e /root/savesys/bone101_index.html ] 57 | then 58 | rm -f /usr/share/bone101/login.html 59 | rm -f /usr/share/bone101/images/photo.jpg 60 | cp -af /root/savesys/bone101_index.html /usr/share/bone101/index.html 2>/dev/null || : 61 | else 62 | echo "Cannot restore the default webpage. Sorry." 63 | fi 64 | 65 | # Restore the bonescript 66 | cp -af /root/savesys/bonescript_index.js /usr/local/lib/node_modules/bonescript/index.js 2>/dev/null || : 67 | cp -af /root/savesys/bonescript_server.js /usr/local/lib/node_modules/bonescript/server.js 2>/dev/null || : 68 | cp -af /root/savesys/bonescript_src_index.js /usr/local/lib/node_modules/bonescript/src/index.js 2>/dev/null || : 69 | cp -af /root/savesys/bonescript_src_server.js /usr/local/lib/node_modules/bonescript/src/server.js 2>/dev/null || : 70 | 71 | # Remove Lorank startup services 72 | systemctl stop lorank.service 73 | systemctl disable lorank.service 74 | rm -f /lib/systemd/system/lorank.service 75 | 76 | 77 | # Remove all ssh related stuff 78 | rm -rf /root/.ssh 79 | 80 | 81 | # Reenable the debian (default) user 82 | passwd debian -u 83 | 84 | 85 | # Remove the root password 86 | passwd -d root 87 | -------------------------------------------------------------------------------- /lorank8v1/init_web: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start this script once to modify a new Beagle Bone 4 | # In the directory you cloned the repro Lorank in. 5 | 6 | TARGETDIR=lorank8v1 7 | DOGTAG=$(md5sum /etc/dogtag) 8 | DTSHORT=${DOGTAG:0:5} 9 | 10 | # Stop on the first sign of trouble 11 | set -e 12 | 13 | # Check if we start at the correct location 14 | if [ ! -d Lorank ] 15 | then 16 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 17 | exit 1 18 | fi 19 | 20 | if [ ! -d Lorank/$TARGETDIR/$DTSHORT ] 21 | then 22 | echo "ERROR: Beagle Bone Release not known, no initialization possible" 23 | exit 1 24 | fi 25 | 26 | # Make dir for the system files we are about to modify 27 | mkdir -p /root/savesys 28 | 29 | # Load a basic webpage 30 | if [ -e /var/lib/cloud9/index.html ] 31 | then 32 | WT=/var/lib/cloud9 33 | cp -n $WT/index.html /root/savesys/cloud9_index.html 34 | elif [ -e /usr/share/bone101/index.html ] 35 | then 36 | WT=/usr/share/bone101 37 | cp -n $WT/index.html /root/savesys/bone101_index.html 38 | else 39 | echo "Could find not index.html file to patch." 40 | exit 1 41 | fi 42 | mkdir -p $WT/images 43 | cp Lorank/$TARGETDIR/index.html $WT/index.html 44 | cp Lorank/$TARGETDIR/login.html $WT/login.html 45 | cp Lorank/$TARGETDIR/photo.jpg $WT/images/photo.jpg 46 | 47 | # Patch the bonescript file, if possible 48 | if [ -e /usr/local/lib/node_modules/bonescript/index.js ] 49 | then 50 | cp -n /usr/local/lib/node_modules/bonescript/index.js /root/savesys/bonescript_index.js 51 | cp -n /usr/local/lib/node_modules/bonescript/server.js /root/savesys/bonescript_server.js 52 | patch -lN /usr/local/lib/node_modules/bonescript/index.js Lorank/$TARGETDIR/$DTSHORT/index.js.patch || true 53 | patch -lN /usr/local/lib/node_modules/bonescript/server.js Lorank/$TARGETDIR/$DTSHORT/server.js.patch || true 54 | elif [ -e /usr/local/lib/node_modules/bonescript/src/index.js ] 55 | then 56 | cp -n /usr/local/lib/node_modules/bonescript/src/index.js /root/savesys/bonescript_src_index.js 57 | cp -n /usr/local/lib/node_modules/bonescript/src/server.js /root/savesys/bonescript_src_server.js 58 | patch -lN /usr/local/lib/node_modules/bonescript/src/index.js Lorank/$TARGETDIR/$DTSHORT/index.js.patch || true 59 | patch -lN /usr/local/lib/node_modules/bonescript/src/server.js Lorank/$TARGETDIR/$DTSHORT/server.js.patch || true 60 | else 61 | echo "Could find not bonescript index.js file to patch." 62 | exit 1 63 | fi 64 | 65 | # Localize files for off-line use 66 | wget -nv -nc -P $WT/static https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css 67 | wget -nv -nc -P $WT/static https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css.map 68 | wget -nv -nc -P $WT/static https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js 69 | wget -nv -nc -P $WT/static https://code.jquery.com/jquery-1.12.2.min.js 70 | 71 | # install additional nodeJS modules 72 | NPM_MODS="passport passport-local body-parser express-session connect-ensure-login" 73 | pushd /usr/local/lib/node_modules/bonescript 74 | npm install $NPM_MODS 75 | popd 76 | -------------------------------------------------------------------------------- /lorank8v1/lora_suite: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Use this script to install a particular version of then Lora Suite 4 | # from github or the latest version. Versions are cloned and precompiled 5 | # in a seperate directory and executeables are then copied to the platform 6 | # dependent directory. Executeables already present there are removed, 7 | # config files are renewd, old ones are saved. It is assumed init_bbb has 8 | # been run. 9 | 10 | TARGETDIR=lorank8v1 11 | 12 | # Stop on the first sign of trouble 13 | set -e 14 | 15 | # Check if we start at the correct location 16 | if [ ! -d Lorank ] 17 | then 18 | echo "ERROR: Invalid working directory, does not contain the Lorank directory" 19 | exit 1 20 | fi 21 | 22 | # See if we want a particular version (must be present as an release on github) 23 | # or just the lastest one. 24 | if [[ $1 == "" ]] 25 | then 26 | VERSION=Last 27 | else 28 | VERSION=$1 29 | fi 30 | 31 | BASEDIR=lorank8-$VERSION 32 | 33 | # Make the required directories, make sure they are clean 34 | mkdir -p $BASEDIR 35 | pushd $BASEDIR 36 | rm -rf * 37 | 38 | # Get all required repositrories (Lorank itself is already present) 39 | git clone https://github.com/Ideetron/packet_forwarder.git 40 | git clone https://github.com/Ideetron/lora_gateway.git 41 | popd 42 | 43 | # Modify files for this specific release 44 | cp Lorank/$TARGETDIR/library.cfg $BASEDIR/lora_gateway/libloragw/library.cfg 45 | 46 | # Compile the lora_gateway libraries 47 | pushd $BASEDIR/lora_gateway 48 | if [[ $VERSION != "Last" ]]; then git checkout -q Lorank_v$VERSION; fi 49 | make clean all 50 | popd 51 | 52 | # Compile the packet_forwarder applications 53 | pushd $BASEDIR/packet_forwarder 54 | if [[ $VERSION != "Last" ]]; then git checkout -q Lorank_v$VERSION; fi 55 | make clean all 56 | popd 57 | 58 | # Make the target directories, make sure they are clean enough 59 | mkdir -p $TARGETDIR 60 | pushd $TARGETDIR 61 | rm -f *_pkt_fwd 62 | if [ -e global_conf.json ] 63 | then 64 | mv global_conf.json global_conf_old.json 65 | echo "WARNING: New global_conf.json, manually copy your entries from the old version, if needed." 66 | fi 67 | popd 68 | 69 | # Copy the configuration files to the target directory 70 | cp Lorank/$TARGETDIR/global_conf.json $TARGETDIR/ 71 | 72 | # Copy the executeables to the target location 73 | cp Lorank/$TARGETDIR/start $TARGETDIR/ 74 | cp Lorank/$TARGETDIR/ResetIC880A $TARGETDIR/ 75 | cp Lorank/$TARGETDIR/lorankctl $TARGETDIR/ 76 | mv -f $BASEDIR/packet_forwarder/lora_pkt_fwd/lora_pkt_fwd $TARGETDIR/ 77 | mv -f $BASEDIR/packet_forwarder/poly_pkt_fwd/poly_pkt_fwd $TARGETDIR/ 78 | mv -f Lorank/Loriot/loriot_pkt_fwd $TARGETDIR/ 79 | 80 | # Give the gateway an unique address, if not already present. 81 | if [ ! -e $TARGETDIR/local_conf.json ] 82 | then 83 | REPLACE=`printf "%016x" $((0x1dee<<48 | RANDOM<<30 | RANDOM<<15 | RANDOM))`; 84 | echo $REPLACE > $TARGETDIR/gatewayID 85 | cat Lorank/$TARGETDIR/local_conf.json | sed "s|1DEE000000000000|${REPLACE}|" > $TARGETDIR/local_conf.json 86 | fi; 87 | 88 | # See if we must create a default setting for the forwarder 89 | if [ ! -e $TARGETDIR/forwarder ] 90 | then 91 | echo -n "fw_poly" > $TARGETDIR/forwarder 92 | fi 93 | 94 | 95 | -------------------------------------------------------------------------------- /lorank8v1/f6942/server.js.patch: -------------------------------------------------------------------------------- 1 | *** /old/server.js Wed Nov 28 12:53:33 2018 2 | --- /new/server.js Wed Nov 28 13:09:16 2018 3 | *************** 4 | *** 5,19 **** 5 | --- 5,48 ---- 6 | var http = require('http'); 7 | var winston = require('winston'); 8 | var express = require('express'); 9 | var events = require('events'); 10 | var socketHandlers = require('./socket_handlers'); 11 | + var passport = require('passport'); 12 | + var LocalStrategy = require('passport-local').Strategy; 13 | + var express_session = require('express-session'); 14 | + var bodyParser = require('body-parser'); 15 | + var connectEnsure = require('connect-ensure-login'); 16 | 17 | var serverEmitter = new events.EventEmitter(); 18 | 19 | var debug = process.env.DEBUG ? true : false; 20 | 21 | + var localConf = '/root/lorank8v1/local_conf.json'; 22 | + 23 | + passport.serializeUser(function(user, cb) { cb(null, user); }); 24 | + passport.deserializeUser(function(id, cb) { cb(null, id); }); 25 | + 26 | + passport.use(new LocalStrategy(validateCreds)); 27 | + 28 | + function validCreds() 29 | + { try 30 | + { var lcContent = fs.readFileSync(localConf, 'utf8'); 31 | + var creds = JSON.parse(lcContent).web_conf; 32 | + return (creds.username.length > 0) && (creds.password.length > 0); } 33 | + catch (e) { return false; } } 34 | + 35 | + function validateCreds(username, password, cb) 36 | + { try 37 | + { var lcContent = fs.readFileSync(localConf, 'utf8'); 38 | + var creds = JSON.parse(lcContent).web_conf; 39 | + if(creds.username == username.trim() && creds.password == password.trim()) 40 | + { console.log(username + " logged in"); 41 | + cb(null, username); } 42 | + else cb(null, false); } 43 | + catch (e) { cb(null, username); } } 44 | + 45 | myrequire('systemd', function() { 46 | if(debug) winston.debug("Startup as socket-activated service under systemd not enabled"); 47 | }); 48 | 49 | exports.serverStart = function(port, directory, callback) { 50 | *************** 51 | *** 40,49 **** 52 | --- 69,92 ---- 53 | }; 54 | 55 | function mylisten(port, directory) { 56 | winston.info("Opening port " + port + " to serve up " + directory); 57 | var app = express(); 58 | + // only enable authentication if there are any credentials stored in the configuration file 59 | + if (validCreds()) 60 | + { app.use(express_session({ secret: 'geheim', resave: false, saveUninitialized: false })); 61 | + app.use(passport.initialize()); 62 | + app.use(passport.session()); 63 | + app.use(bodyParser.urlencoded({ extended: true })); 64 | + // overwrite catch-all route for the static resources (so we can use css on the login page) 65 | + app.post('/login', passport.authenticate('local', { failureRedirect: '/login' }), function(req, res){ res.redirect('/'); }); 66 | + app.use('/static', express.static(directory+"/static")); 67 | + // overwrite catch-all route for the login page to prevent infinite redirection 68 | + app.get('/login', function(req, res, next){ res.sendFile("/login.html", {root : directory}); }); 69 | + app.get('/logout', function(req, res, next){ req.logout(); res.redirect('/'); }); 70 | + // catch-all route: require to be logged in to access any file 71 | + app.use(connectEnsure.ensureLoggedIn('/login')); } 72 | app.get('/bonescript.js', socketHandlers.socketJSReqHandler); 73 | app.use('/bone101', express.static(directory)); 74 | app.use('/bone101/static', express.static(directory+"/static")); 75 | app.use(express.static(directory)); 76 | var server = http.createServer(app); 77 | -------------------------------------------------------------------------------- /lorank8v1/9e75c/server.js.patch: -------------------------------------------------------------------------------- 1 | *** server-2016-old.js Sat Oct 28 17:28:40 2017 2 | --- server-2016-new.js Sat Oct 28 17:40:06 2017 3 | *************** 4 | *** 5,19 **** 5 | --- 5,48 ---- 6 | var http = require('http'); 7 | var winston = require('winston'); 8 | var express = require('express'); 9 | var events = require('events'); 10 | var socketHandlers = require('./socket_handlers'); 11 | + var passport = require('passport'); 12 | + var LocalStrategy = require('passport-local').Strategy; 13 | + var express_session = require('express-session'); 14 | + var bodyParser = require('body-parser'); 15 | + var connectEnsure = require('connect-ensure-login'); 16 | 17 | var serverEmitter = new events.EventEmitter(); 18 | 19 | var debug = process.env.DEBUG ? true : false; 20 | 21 | + var localConf = '/root/lorank8v1/local_conf.json'; 22 | + 23 | + passport.serializeUser(function(user, cb) { cb(null, user); }); 24 | + passport.deserializeUser(function(id, cb) { cb(null, id); }); 25 | + 26 | + passport.use(new LocalStrategy(validateCreds)); 27 | + 28 | + function validCreds() 29 | + { try 30 | + { var lcContent = fs.readFileSync(localConf, 'utf8'); 31 | + var creds = JSON.parse(lcContent).web_conf; 32 | + return (creds.username.length > 0) && (creds.password.length > 0); } 33 | + catch (e) { return false; } } 34 | + 35 | + function validateCreds(username, password, cb) 36 | + { try 37 | + { var lcContent = fs.readFileSync(localConf, 'utf8'); 38 | + var creds = JSON.parse(lcContent).web_conf; 39 | + if(creds.username == username.trim() && creds.password == password.trim()) 40 | + { console.log(username + " logged in"); 41 | + cb(null, username); } 42 | + else cb(null, false); } 43 | + catch (e) { cb(null, username); } } 44 | + 45 | myrequire('systemd', function() { 46 | if(debug) winston.debug("Startup as socket-activated service under systemd not enabled"); 47 | }); 48 | 49 | exports.serverStart = function(port, directory, callback) { 50 | *************** 51 | *** 36,45 **** 52 | --- 65,88 ---- 53 | }; 54 | 55 | function listen(port, directory) { 56 | winston.info("Opening port " + port + " to serve up " + directory); 57 | var app = express(); 58 | + // only enable authentication if there are any credentials stored in the configuration file 59 | + if (validCreds()) 60 | + { app.use(express_session({ secret: 'geheim', resave: false, saveUninitialized: false })); 61 | + app.use(passport.initialize()); 62 | + app.use(passport.session()); 63 | + app.use(bodyParser.urlencoded({ extended: true })); 64 | + // overwrite catch-all route for the static resources (so we can use css on the login page) 65 | + app.post('/login', passport.authenticate('local', { failureRedirect: '/login' }), function(req, res){ res.redirect('/'); }); 66 | + app.use('/static', express.static(directory+"/static")); 67 | + // overwrite catch-all route for the login page to prevent infinite redirection 68 | + app.get('/login', function(req, res, next){ res.sendFile("/login.html", {root : directory}); }); 69 | + app.get('/logout', function(req, res, next){ req.logout(); res.redirect('/'); }); 70 | + // catch-all route: require to be logged in to access any file 71 | + app.use(connectEnsure.ensureLoggedIn('/login')); } 72 | app.get('/bonescript.js', socketHandlers.socketJSReqHandler); 73 | app.use('/bone101/static', express.static(directory+"/static")); 74 | app.use(express.static(directory)); 75 | var server = http.createServer(app); 76 | socketHandlers.addSocketListeners(server, serverEmitter); 77 | -------------------------------------------------------------------------------- /lorank8v1/cb1ef/server.js.patch: -------------------------------------------------------------------------------- 1 | *** server-2015-old.js Sat Oct 28 17:33:19 2017 2 | --- server-2015-new.js Sat Oct 28 17:35:37 2017 3 | *************** 4 | *** 7,16 **** 5 | --- 7,58 ---- 6 | var url = require('url'); 7 | var winston = require('winston'); 8 | var b = require('../bonescript'); 9 | var socketio = require('socket.io'); 10 | var express = require('express'); 11 | + var passport = require('passport'); 12 | + var LocalStrategy = require('passport-local').Strategy; 13 | + var express_session = require('express-session'); 14 | + var bodyParser = require('body-parser'); 15 | + var connectEnsure = require('connect-ensure-login'); 16 | + 17 | + var localConf = '/root/lorank8v1/local_conf.json'; 18 | + 19 | + passport.serializeUser(function(user, cb) { cb(null, user); }); 20 | + passport.deserializeUser(function(id, cb) { cb(null, id); }); 21 | + 22 | + passport.use(new LocalStrategy(validateCreds)); 23 | + 24 | + function validCreds() 25 | + { try 26 | + { var lcContent = fs.readFileSync(localConf, 'utf8'); 27 | + var creds = JSON.parse(lcContent).web_conf; 28 | + return (creds.username.length > 0) && (creds.password.length > 0); } 29 | + catch (e) { return false; } } 30 | + 31 | + function validateCreds(username, password, cb) 32 | + { try 33 | + { var lcContent = fs.readFileSync(localConf, 'utf8'); 34 | + var creds = JSON.parse(lcContent).web_conf; 35 | + if(creds.username == username.trim() && creds.password == password.trim()) 36 | + { console.log(username + " logged in"); 37 | + cb(null, username); } 38 | + else cb(null, false); } 39 | + catch (e) { cb(null, username); } } 40 | + 41 | + function sendSpecFile(res, fileName) { 42 | + var localRoot = '/var/lib/cloud9'; 43 | + console.log('sendSpecFile'); 44 | + function sendFile(err, file) 45 | + { if(err) 46 | + { res.writeHead(500, {"Content-Type": "text/plain"}); 47 | + res.end(err + '\n'); 48 | + return; } 49 | + res.setHeader('Content-Type', 'text/html'); 50 | + res.end(file); } 51 | + fs.readFile(localRoot.concat(fileName), 'utf8', sendFile); } 52 | + 53 | 54 | myrequire('systemd', function() { 55 | winston.debug("Startup as socket-activated service under systemd not enabled"); 56 | }); 57 | 58 | *************** 59 | *** 18,27 **** 60 | --- 60,83 ---- 61 | listen(port, '/var/lib/cloud9'); 62 | 63 | function listen(port, directory) { 64 | var app = express(); 65 | app.use(express.logger()); 66 | + // only enable authentication if there are any credentials stored in the configuration file 67 | + if (validCreds()) 68 | + { app.use(express_session({ secret: 'geheim', resave: false, saveUninitialized: false })); 69 | + app.use(passport.initialize()); 70 | + app.use(passport.session()); 71 | + app.use(bodyParser.urlencoded({ extended: true })); 72 | + // overwrite catch-all route for the static resources (so we can use css on the login page) 73 | + app.post('/login', passport.authenticate('local', { failureRedirect: '/login' }), function(req, res){ res.redirect('/'); }); 74 | + app.use('/static', express.static(directory+"/static")); 75 | + // overwrite catch-all route for the login page to prevent infinite redirection 76 | + app.get('/login', function(req, res, next){ sendSpecFile(res,"/login.html"); }); 77 | + app.get('/logout', function(req, res, next){ req.logout(); res.redirect('/'); }); 78 | + // catch-all route: require to be logged in to access any file 79 | + app.use(connectEnsure.ensureLoggedIn('/login')); } 80 | app.get('/bonescript.js', handler); 81 | app.use(express.static(directory)); 82 | var server = http.createServer(app); 83 | addSocketListeners(server); 84 | server.listen(port); 85 | -------------------------------------------------------------------------------- /lorank8v1/lorankctl: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LOCDIR="/root/lorank8v1" 4 | LOCCONF="$LOCDIR/local_conf.json" 5 | LOCSTAT="$LOCDIR/stats.txt" 6 | LOCFRWD="$LOCDIR/forwarder" 7 | LOCRMTE="$LOCDIR/remote.env" 8 | 9 | function startConcentrator 10 | { if [[ $1 == "fw_poly" ]] || [[ $1 == "fw_semtech" ]] || [[ $1 == "fw_loriot" ]] 11 | then 12 | echo -n $1 > $LOCFRWD 13 | fi 14 | systemctl start lorank.service 15 | echo "{}" > $LOCSTAT 16 | echo "Starting Concentrator ... " 17 | } 18 | 19 | function stopConcentrator 20 | { systemctl stop lorank.service 21 | echo "{}" > $LOCSTAT 22 | echo "Stopping Concentrator ... " 23 | } 24 | 25 | function modRemote 26 | { systemctl stop restart.service 27 | systemctl disable restart.service > /dev/null 2>&1 28 | systemctl stop ngrok.service 29 | systemctl disable ngrok.service > /dev/null 2>&1 30 | if [[ $1 == "true" ]] && [[ $2 == "false" ]]; then echo "TNL=ssh" > $LOCRMTE; 31 | elif [[ $1 == "false" ]] && [[ $2 == "true" ]]; then echo "TNL=web" > $LOCRMTE; 32 | elif [[ $1 == "true" ]] && [[ $2 == "true" ]]; then echo "TNL=ssh web" > $LOCRMTE; 33 | else echo "TNL=" > $LOCRMTE; 34 | fi 35 | echo "RBT=$3" >> $LOCRMTE; 36 | sleep 1 37 | if [[ $1 == "true" ]] || [[ $2 == "true" ]] 38 | then 39 | systemctl enable ngrok.service > /dev/null 2>&1 40 | systemctl start ngrok.service 41 | fi 42 | if [ -n "$3" ] && [ "$3" -gt 0 ] 43 | then 44 | systemctl enable restart.service > /dev/null 2>&1 45 | systemctl start restart.service 46 | fi 47 | echo "Processing remote ... " 48 | } 49 | 50 | function collectInfo 51 | { Eth0Addr=$(cat /sys/class/net/eth0/address) 52 | Uname=$(uname -a) 53 | Dogtag=$(cat /etc/dogtag) 54 | Version=$(cd /root/Lorank; git status | head -n 1) 55 | echo "$Eth0Addr;$Uname;$Dogtag;$Version" 56 | } 57 | 58 | 59 | if [[ $1 == "DoShutdown" ]]; then shutdown -h now && echo "Shutting down ..."; 60 | elif [[ $1 == "DoReboot" ]]; then reboot && echo "Rebooting ... "; 61 | elif [[ $1 == "DoStartConc" ]]; then startConcentrator $2; 62 | elif [[ $1 == "DoStopConc" ]]; then stopConcentrator; 63 | elif [[ $1 == "DoClearStats" ]]; then echo "DoClearStats"; 64 | elif [[ $1 == "DoCheckUpdate" ]]; then echo "DoCheckUpdate"; 65 | elif [[ $1 == "DoUpdate" ]]; then echo "DoUpdate"; 66 | elif [[ $1 == "GetEth0Addr" ]]; then cat /sys/class/net/eth0/address; 67 | elif [[ $1 == "GetStatus" ]]; then systemctl status lorank.service | grep "Active:"; 68 | elif [[ $1 == "GetSysDate" ]]; then date; 69 | elif [[ $1 == "GetVersion" ]]; then cd /root/Lorank; git status | head -n 1; 70 | elif [[ $1 == "GetUname" ]]; then uname -a; 71 | elif [[ $1 == "GetDogtag" ]]; then cat /etc/dogtag; 72 | elif [[ $1 == "GetStats" ]]; then cat $LOCSTAT; 73 | elif [[ $1 == "GetForwarder" ]]; then cat $LOCFRWD; 74 | elif [[ $1 == "GetSysInfo" ]]; then echo $(cat /proc/uptime)";"$(cat /proc/loadavg)";"$(date); 75 | elif [[ $1 == "GetColInfo" ]]; then collectInfo; 76 | elif [[ $1 == "GetLogs50" ]]; then tail -n 50 /var/log/syslog; 77 | elif [[ $1 == "GetLogs200" ]]; then tail -n 200 /var/log/syslog; 78 | elif [[ $1 == "GetLogsOn" ]]; then tail -f /var/log/syslog; 79 | elif [[ $1 == "GetLogsOff" ]]; then killall tail; 80 | elif [[ $1 == "GetDiskfree" ]]; then df -BM | grep -e "%[[:space:]]/$" | head -n 1 | tr -s ' '; 81 | elif [[ $1 == "GetConf" ]]; then cat $LOCCONF | sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba'; 82 | elif [[ $1 == "SetConf" ]]; then echo -n $2 > $LOCCONF && echo "Updating local_conf.json ..."; 83 | elif [[ $1 == "SetRemote" ]]; then modRemote $2; 84 | else logger -s "ERROR: lorankctl received unknown command: $1" 85 | fi 86 | -------------------------------------------------------------------------------- /lorank8v1/ResetIC880A.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Written by Ruud Vlaming, Beta Research BV 3 | * http://www.betaresearch.nl/ 4 | * 5 | * This program pulses the resetline of the IMST iC880A Concentrator 6 | * as it is connected to GPIO on the Lorank 8 gateway. This may not 7 | * work, or even bring damage to other pieces of hardware. Use with 8 | * care. Compile with: 9 | * 10 | * g++ -O2 -Wall ResetIC880A.cpp -o ResetIC880A 11 | * 12 | * Based on: 13 | * 14 | * Work by Derek Molloy, School of Electronic Engineering, DCU 15 | * www.derekmolloy.ie 16 | * 17 | * Almost entirely based on Software by RidgeRun: 18 | * 19 | * Copyright (c) 2011, RidgeRun 20 | * All rights reserved. 21 | 22 | * Redistribution and use in source and binary forms, with or without modification, 23 | * are permitted provided that the following conditions are met: 24 | * 1. Redistributions of source code must retain the above copyright 25 | * notice, this list of conditions and the following disclaimer. 26 | * 2. Redistributions in binary form must reproduce the above copyright 27 | * notice, this list of conditions and the following disclaimer in the 28 | * documentation and/or other materials provided with the distribution. 29 | * 30 | * THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 31 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 32 | * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL I 33 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 34 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 35 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 37 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 38 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | */ 40 | 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | 51 | using namespace std; 52 | 53 | /* Definition of constants. */ 54 | 55 | #define SYSFS_GPIO_DIR "/sys/class/gpio" 56 | #define POLL_TIMEOUT (3 * 1000) /* 3 seconds */ 57 | #define MAX_BUF 64 58 | 59 | enum PIN_DIRECTION 60 | { INPUT_PIN=0, 61 | OUTPUT_PIN=1 }; 62 | 63 | enum PIN_VALUE 64 | { LOW=0, 65 | HIGH=1 }; 66 | 67 | unsigned int RESET = 14; 68 | 69 | 70 | /* Definitions of GPIO manipulation functions. */ 71 | 72 | int gpio_export(unsigned int gpio) 73 | { int fd, len; 74 | char buf[MAX_BUF]; 75 | fd = open(SYSFS_GPIO_DIR "/export", O_WRONLY); 76 | if (fd < 0) 77 | { perror("gpio/export"); 78 | return fd; } 79 | len = snprintf(buf, sizeof(buf), "%d", gpio); 80 | write(fd, buf, len); 81 | close(fd); 82 | return 0; } 83 | 84 | int gpio_set_dir(unsigned int gpio, PIN_DIRECTION out_flag) 85 | { int fd; 86 | char buf[MAX_BUF]; 87 | snprintf(buf, sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/direction", gpio); 88 | fd = open(buf, O_WRONLY); 89 | if (fd < 0) 90 | { perror("gpio/direction"); 91 | return fd; } 92 | if (out_flag == OUTPUT_PIN) write(fd, "out", 4); else write(fd, "in", 3); 93 | close(fd); 94 | return 0; } 95 | 96 | int gpio_set_value(unsigned int gpio, PIN_VALUE value) 97 | { int fd; 98 | char buf[MAX_BUF]; 99 | snprintf(buf, sizeof(buf), SYSFS_GPIO_DIR "/gpio%d/value", gpio); 100 | fd = open(buf, O_WRONLY); 101 | if (fd < 0) 102 | { perror("gpio/set-value"); 103 | return fd; } 104 | if (value==LOW) write(fd, "0", 2); else write(fd, "1", 2); 105 | close(fd); 106 | return 0; } 107 | 108 | 109 | /* Pulse the concentrator reset line once. */ 110 | 111 | int main(int argc, char *argv[]) 112 | { gpio_export(RESET); 113 | gpio_set_dir(RESET, OUTPUT_PIN); 114 | gpio_set_value(RESET, LOW); 115 | usleep(10000); 116 | gpio_set_value(RESET, HIGH); 117 | usleep(10000); 118 | gpio_set_value(RESET, LOW); 119 | return 0; } 120 | -------------------------------------------------------------------------------- /lorank8v1/global_conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "SX1301_conf": { 3 | "lorawan_public": true, 4 | "clksrc": 1, /* radio_1 provides clock to concentrator */ 5 | "lbt_cfg": { 6 | "enable": false, 7 | "rssi_target": 160, /* rssi in dBm = -lbt_rssi_target/2 */ 8 | "nb_channel": 1, 9 | "start_freq": 869525000, 10 | "scan_time_us": 5000, 11 | "tx_delay_1ch_us": 4000000, 12 | "tx_delay_2ch_us": 4000000 13 | }, 14 | "antenna_gain": 0, /* antenna gain, in dBi */ 15 | "radio_0": { 16 | "enable": true, 17 | "type": "SX1257", 18 | "freq": 867500000, 19 | "rssi_offset": -166.0, 20 | "tx_enable": true, 21 | "tx_freq_min": 863000000, 22 | "tx_freq_max": 870000000 23 | }, 24 | "radio_1": { 25 | "enable": true, 26 | "type": "SX1257", 27 | "freq": 868500000, 28 | "rssi_offset": -166.0, 29 | "tx_enable": false 30 | }, 31 | "chan_multiSF_0": { 32 | /* Lora MAC channel, 125kHz, all SF, 868.1 MHz */ 33 | "enable": true, 34 | "radio": 1, 35 | "if": -400000 36 | }, 37 | "chan_multiSF_1": { 38 | /* Lora MAC channel, 125kHz, all SF, 868.3 MHz */ 39 | "enable": true, 40 | "radio": 1, 41 | "if": -200000 42 | }, 43 | "chan_multiSF_2": { 44 | /* Lora MAC channel, 125kHz, all SF, 868.5 MHz */ 45 | "enable": true, 46 | "radio": 1, 47 | "if": 0 48 | }, 49 | "chan_multiSF_3": { 50 | /* Lora MAC channel, 125kHz, all SF, 867.1 MHz */ 51 | "enable": true, 52 | "radio": 0, 53 | "if": -400000 54 | }, 55 | "chan_multiSF_4": { 56 | /* Lora MAC channel, 125kHz, all SF, 867.3 MHz */ 57 | "enable": true, 58 | "radio": 0, 59 | "if": -200000 60 | }, 61 | "chan_multiSF_5": { 62 | /* Lora MAC channel, 125kHz, all SF, 867.5 MHz */ 63 | "enable": true, 64 | "radio": 0, 65 | "if": 0 66 | }, 67 | "chan_multiSF_6": { 68 | /* Lora MAC channel, 125kHz, all SF, 867.7 MHz */ 69 | "enable": true, 70 | "radio": 0, 71 | "if": 200000 72 | }, 73 | "chan_multiSF_7": { 74 | /* Lora MAC channel, 125kHz, all SF, 867.9 MHz */ 75 | "enable": true, 76 | "radio": 0, 77 | "if": 400000 78 | }, 79 | "chan_Lora_std": { 80 | /* Lora MAC channel, 250kHz, SF7, 868.3 MHz */ 81 | "enable": true, 82 | "radio": 1, 83 | "if": -200000, 84 | "bandwidth": 250000, 85 | "spread_factor": 7 86 | }, 87 | "chan_FSK": { 88 | /* FSK 50kbps channel, 868.8 MHz */ 89 | "enable": true, 90 | "radio": 1, 91 | "if": 300000, 92 | "bandwidth": 125000, 93 | "datarate": 50000 94 | }, 95 | "tx_lut_0": { 96 | /* TX gain table, index 0 */ 97 | "pa_gain": 0, 98 | "mix_gain": 8, 99 | "rf_power": -6, 100 | "dig_gain": 0 101 | }, 102 | "tx_lut_1": { 103 | /* TX gain table, index 1 */ 104 | "pa_gain": 0, 105 | "mix_gain": 10, 106 | "rf_power": -3, 107 | "dig_gain": 0 108 | }, 109 | "tx_lut_2": { 110 | /* TX gain table, index 2 */ 111 | "pa_gain": 0, 112 | "mix_gain": 12, 113 | "rf_power": 0, 114 | "dig_gain": 0 115 | }, 116 | "tx_lut_3": { 117 | /* TX gain table, index 3 */ 118 | "pa_gain": 1, 119 | "mix_gain": 8, 120 | "rf_power": 3, 121 | "dig_gain": 0 122 | }, 123 | "tx_lut_4": { 124 | /* TX gain table, index 4 */ 125 | "pa_gain": 1, 126 | "mix_gain": 10, 127 | "rf_power": 6, 128 | "dig_gain": 0 129 | }, 130 | "tx_lut_5": { 131 | /* TX gain table, index 5 */ 132 | "pa_gain": 1, 133 | "mix_gain": 12, 134 | "rf_power": 10, 135 | "dig_gain": 0 136 | }, 137 | "tx_lut_6": { 138 | /* TX gain table, index 6 */ 139 | "pa_gain": 1, 140 | "mix_gain": 13, 141 | "rf_power": 11, 142 | "dig_gain": 0 143 | }, 144 | "tx_lut_7": { 145 | /* TX gain table, index 7 */ 146 | "pa_gain": 2, 147 | "mix_gain": 9, 148 | "rf_power": 12, 149 | "dig_gain": 0 150 | }, 151 | "tx_lut_8": { 152 | /* TX gain table, index 8 */ 153 | "pa_gain": 1, 154 | "mix_gain": 15, 155 | "rf_power": 13, 156 | "dig_gain": 0 157 | }, 158 | "tx_lut_9": { 159 | /* TX gain table, index 9 */ 160 | "pa_gain": 2, 161 | "mix_gain": 10, 162 | "rf_power": 14, 163 | "dig_gain": 0 164 | }, 165 | "tx_lut_10": { 166 | /* TX gain table, index 10 */ 167 | "pa_gain": 2, 168 | "mix_gain": 11, 169 | "rf_power": 16, 170 | "dig_gain": 0 171 | }, 172 | "tx_lut_11": { 173 | /* TX gain table, index 11 */ 174 | "pa_gain": 3, 175 | "mix_gain": 9, 176 | "rf_power": 20, 177 | "dig_gain": 0 178 | }, 179 | "tx_lut_12": { 180 | /* TX gain table, index 12 */ 181 | "pa_gain": 3, 182 | "mix_gain": 10, 183 | "rf_power": 23, 184 | "dig_gain": 0 185 | }, 186 | "tx_lut_13": { 187 | /* TX gain table, index 13 */ 188 | "pa_gain": 3, 189 | "mix_gain": 11, 190 | "rf_power": 25, 191 | "dig_gain": 0 192 | }, 193 | "tx_lut_14": { 194 | /* TX gain table, index 14 */ 195 | "pa_gain": 3, 196 | "mix_gain": 12, 197 | "rf_power": 26, 198 | "dig_gain": 0 199 | }, 200 | "tx_lut_15": { 201 | /* TX gain table, index 15 */ 202 | "pa_gain": 3, 203 | "mix_gain": 14, 204 | "rf_power": 27, 205 | "dig_gain": 0 206 | } 207 | }, 208 | 209 | "gateway_conf": { 210 | /* change with default server address/ports, or overwrite in local_conf.json */ 211 | "gateway_ID": "0000000000000000", 212 | /* Systems (set logger to true for logs per (!) packet) */ 213 | "gps": true, 214 | "beacon": false, 215 | "monitor": false, 216 | "logger": false, 217 | /* Streams */ 218 | "upstream": true, 219 | "downstream": true, 220 | "ghoststream": false, 221 | "radiostream": true, 222 | "statusstream": true, 223 | /* node server, (for standard server, fall back for poly packet server) */ 224 | "server_address": "127.0.0.1", 225 | "serv_port_up": 1680, 226 | "serv_port_down": 1681, 227 | /* node servers for poly packet server (max 4 enabled, rest is ignored) */ 228 | "servers": 229 | [ { "server_address": "52.18.106.103", 230 | "serv_port_up": 20000, 231 | "serv_port_down": 20000, 232 | "serv_max_stall": 0, 233 | "serv_enabled": true }, 234 | { "server_address": "eu.thingsnetwork.org", 235 | "serv_port_up": 1700, 236 | "serv_port_down": 1700, 237 | "serv_max_stall": 0, 238 | "serv_enabled": true }, 239 | { "server_address": "amsterdam.loraley.org", 240 | "serv_port_up": 1680, 241 | "serv_port_down": 1681, 242 | "serv_max_stall": 0, 243 | "serv_enabled": false } ], 244 | /* adjust the following parameters for your network */ 245 | "keepalive_interval": 10, 246 | "stat_interval": 30, 247 | "push_timeout_ms": 100, 248 | /* forward only valid packets */ 249 | "forward_crc_valid": true, 250 | "forward_crc_error": false, 251 | "forward_crc_disabled": false, 252 | /* GPS configuration */ 253 | "gps_tty_path": "/dev/ttyAMA0", 254 | "fake_gps": true, 255 | "ref_latitude": 0, 256 | "ref_longitude": 0, 257 | "ref_altitude": 0, 258 | /* Ghost configuration (for simulating nodes) */ 259 | "ghost_address": "127.0.0.1", 260 | "ghost_port": 1918, 261 | /* Monitor configuration (for remote access through the firewall/nat) */ 262 | "monitor_address": "127.0.0.1", 263 | "monitor_port": 2008, 264 | "ssh_path": "/usr/bin/ssh", 265 | "ssh_port": 22, 266 | "http_port": 80, 267 | "ngrok_path": "/usr/bin/ngrok", 268 | "system_calls": ["df -m","free -h","uptime","who -a","uname -a"], 269 | /* Performance updates (if empty, nothing is send/written) */ 270 | "stat_format": "semtech", /* semtech or idee_verbose or idee_concise. */ 271 | "stat_damping": 50, /* 1 for least damping up to 99 for most damping. */ 272 | "stat_file": "stats.txt", /* Put or the whole path, or only a file name */ 273 | /* For human communication */ 274 | "platform": "*", /* Platform definition, put a asterix here for the system value, max 24 chars. */ 275 | "contact_email": "", /* Email of gateway operator, max 40 chars*/ 276 | "description": "" /* Public description of this device, max 64 chars */ 277 | } 278 | } 279 | -------------------------------------------------------------------------------- /lorank8v1/manual.tex: -------------------------------------------------------------------------------- 1 | \documentclass[12pt]{article} 2 | \usepackage[a4paper,margin=20mm]{geometry} 3 | \usepackage[parfill]{parskip} 4 | \usepackage{graphicx} 5 | \usepackage{sidecap} 6 | \usepackage{subfig} 7 | \usepackage{color} 8 | \usepackage{url} 9 | \usepackage{mathabx} 10 | \usepackage{relsize} 11 | \usepackage{tcolorbox} 12 | \usepackage{adjustbox} 13 | %\usepackage{hyperref} 14 | %\usepackage[usenames,dvipsnames]{pstricks} 15 | %\usepackage{epsfig} 16 | %\usepackage{pst-all} 17 | %\usepackage{pst-pdf} 18 | %\usepackage{pst-grad} % For gradients 19 | %\usepackage{pst-plot} % For axes 20 | \usepackage{setspace} 21 | \usepackage{emp} 22 | \usepackage{type1cm} 23 | \usepackage{eso-pic} 24 | \usepackage{multirow} 25 | \usepackage{hhline} 26 | \usepackage{colortbl} 27 | \usepackage{tabularx} 28 | \usepackage{arydshln} 29 | \usepackage{xcolor} 30 | \usepackage{lscape} 31 | \usepackage{enumitem} 32 | 33 | \newcommand{\ina}{\mbox{\hspace{2mm}}} 34 | \newcommand{\inb}{\mbox{\hspace{4mm}}} 35 | \newcommand{\inc}{\mbox{\hspace{6mm}}} 36 | \newcommand{\ind}{\mbox{\hspace{8mm}}} 37 | \newcommand{\pha}{\phantom\{} 38 | \newcommand{\phb}{\phantom\{\phantom\{} 39 | \newcommand{\phc}{\phantom\{\phantom\{\phantom\{} 40 | \newcommand{\phd}{\phantom\{\phantom\{\phantom\{\phantom\{} 41 | \newcommand{\nl}{\newline} 42 | 43 | \title{Manual Lorank 8.} 44 | \author{Ideetron} 45 | \date{\today} 46 | 47 | \input{../Commands-Common} 48 | 49 | \begin{document} 50 | \maketitle 51 | 52 | \begin{center} 53 | \includegraphics[width=70mm]{pic/redsmall.jpg}\\ 54 | \larger[1] Document Version 1.0.7 \\ 55 | \smaller[1] See \url{https://github.com/Ideetron/Lorank} \\ for the latest version of this manual. 56 | \end{center} 57 | 58 | 59 | \newpage 60 | 61 | % ========================================================================================================================== 62 | \section{Introduction} 63 | Welcome to the Lorank 8. This manual presents you with all the necessary 64 | information to run your Lorank 8 in a safe way. Please read this manual carefully 65 | before starting the Lorank 8 for the first time. 66 | 67 | Lora technology is a very young technology and as such constantly changing. 68 | The Lorank 8 implements the latest hardware and software as well 69 | as the most recent publicly available protocol specifications such 70 | as LoRaWAN\_1R0. In order to be kept informed of future updates 71 | you can subscribe to the Github of Ideetron: \url{https://github.com/Ideetron/Lorank}. 72 | 73 | \section{Quick start} 74 | To quickly set up your gateway perform the steps below. 75 | For this quick start to work, the following must be fulfilled: 76 | \begin{itemize} 77 | \item On your local network a DHCP server with DNS capabilities must be operational. 78 | \item Your PC and gateway are on the same subnet. 79 | \item Your router's firewall does {\bf not} block outgoing data traffic on higher port numbers. 80 | \item Make use of a recent browser (preferably {\bf not} Internet Explorer). 81 | \end{itemize} 82 | 83 | Then we can test if the gateway works and receives and forwards packets. 84 | If your router does not have DNS capabilities, the IP number must be used, please log 85 | in to you router to obtain the number that was issued to the gateway. 86 | 87 | \begin{itemize} 88 | \item Mount the antenna ({\bf never} operate the gateway without an antenna!) 89 | \item Connect the gateway to your local network using an ethernet cable. 90 | \item Connect the gateway to the supplied power source, and give it a few minutes to boot. 91 | \item On a pc, surf to \url{http://lorank8/} or \url{http://lorank8.local/} or \url{http://[ip-number]/} 92 | \end{itemize} 93 | 94 | Now you should see a simple webpage with a picture of the Lorank device. 95 | If this is all correct, we can see if the data gets outside, to that end: 96 | 97 | \begin{itemize} 98 | \item Switch on any LoraWAN capable Mote [keep at least (!!) 2 meters distance between Mote and Gateway]. 99 | \item Surf to \url{http://iot.semtech.com/gateways/} to see if the gateway is up, the first two bytes are 1D-EE. 100 | \item Surf to \url{http://iot.semtech.com/motes/} to see the Mote data. 101 | \end{itemize} 102 | If you can find your gateway in the list, and see the Mote's data, you know everything works 103 | as required. If you see the gateway but not your Mote, the latter may not be functioning. 104 | If any of these steps should not succeed a more in careful startup procedure is needed, please see below. 105 | If you do not have a Mote, the gateway may not show up in the gateway list on \url{iot.semtech.com}, 106 | in that case see if it is visible on the map on their website. 107 | 108 | Subsequently you can test if these packets are visible on The Things Network: 109 | \begin{itemize} 110 | \item Surf to \url{http://www.ttnstatus.org/} to see if the gateway is up. 111 | \item Surf to \url{http://thethingsnetwork.org/api/v0/gateways/} for additional data. 112 | \item Surf to \url{http://thethingsnetwork.org/api/v0/nodes/} to see the Mote data. 113 | \end{itemize} 114 | The Things Network is not yet fully operational and hiccups have been reported. 115 | In case that seems to be at hand, but the former step works, try again after a few days. 116 | 117 | \section{Connection to the network} 118 | The gateway should first be connected to a local network and subsequently connected to the power adapter. 119 | Do {\bf not} connect the gateway directly to outside Internet. First, that network is very busy, and, 120 | more importantly, for the preconfigured gateway, it is relatively easy for outsiders to break in. 121 | Once that happens, a complete reflash of the memory is needed. The router takes care of the primary 122 | protection of your gateway. 123 | 124 | The blue leds should light up. If this does not happen, there is something wrong with the 125 | 5V Stabilised Power Supply. Please use the one that was delivered with the unit. 126 | 127 | After a few minutes, the gateway starts asking for an IP number on the network using its DHCP client. 128 | It is expected that you have a DHCP server running on your network. 129 | Routers from network providers usually are configured that way. Depending on the services provided 130 | by that router you can find the gateway on its IP number or try to address it by its hostname. 131 | 132 | Try in a recent browser (preferably not Internet Explorer!) \url{http://lorank8/} or \url{http://lorank8.local/} 133 | You should see a webpage with a picture of the Lorank device. This indicates that the gateway is running. 134 | 135 | If that does not work, the router is probably not resolving the name because no local dns is 136 | running. In that case you need to obtain the IP number. This can only be done by logging into 137 | the router itself, and look upon the list of connected devices. Please refer to the manual of 138 | your router how this can be done. The number is usually something like 192.168.x.y or 139 | 10.x.y.z where x,y,z are numbers between 0 and 255. Then, in the browser try \url{http://192.168.x.y/} 140 | 141 | If more than 10 minutes have past, and still no IP number is visible in the routers connection 142 | list, take out the power cable (from the gateway, not the mains) and reconnect. Occasionally it 143 | can happen dat DHCP server and client misunderstand each other. Do not try multiple reconnections 144 | of the power quickly in a row, this can damage the internal file system. 145 | 146 | Apart from browsing to the webserver of the gateway, one can also login to the gateway using ssh. 147 | 148 | \section{Basic configuration} 149 | Although the gateway runs out of the box, further configuration may be required. 150 | Besides that, all gateways come with the same predefined root password, which is a potential 151 | security issue, and thus this must be changed. Furthermore, you may want to change the routers 152 | to which all data is send. 153 | 154 | \subsection{Default routers} 155 | The current version of the software allows for maximally four routers to be configured as 156 | targets for the data. Note that, in order for the service to actually start, {\bf all} 157 | these routers must exist, although they do no have to accept the data. This is a shortcoming 158 | of all current packet forwarders, which we expect to be lifted in the next version. 159 | Per default we have configured the following targets in the global configuration file: 160 | \begin{itemize} 161 | \item {\bf Semtech}: This company hosts a router that all gateways may utilise for demonstration purposes, 162 | see \url{www.semtech.com} for more information. 163 | \item {\bf The Things Network}: This is a crowd sourced IOT network, open for anyone to use, see 164 | \url{www.thethingsnetwork.org} for more information. 165 | \item {\bf Loraley}: The is an alternative distributed open source IOT data network, about to be 166 | launched in the coming months, see \url{www.loraley.org} for more information. 167 | \end{itemize} 168 | Please feel free to use one or more of the preinstalled routers or direct the data to your 169 | own private network. Note that, in the future, these url's may change and thus this may require 170 | further attention. Consult the websites of the organisations you want to make 171 | use of first. 172 | 173 | \subsection{The Gateway ID} 174 | If the gateway is part a larger network (when not operated privately) it must identify itself 175 | using an eight byte {\bf worldwide} unique identifier. The device comes with such a number 176 | preconfigured, starting with `1DEE'. This number is stored in the files \url{gatewayID} 177 | and in \url{local_conf.json} located in the directory that also contain the executables. 178 | 179 | It is possible to change this identifier manually if 180 | needed, just by editing these files (see below how). However, if the device is to be operated on 181 | other networks such as The Things Network, we 182 | advise not to do so, or to make sure to choose an identifier that is guaranteed to be globally 183 | unique. In practice the only reliable way to ensure this is to construct it based on machine generated 184 | random numbers. In any case do {\bf not} choose something based on any name, simple sequences 12345 185 | or something alike. At this moment there are not a lot of gateway's active around the world, 186 | so it may not lead to problems immediately, but this will certainly change in the near future. 187 | Dataloss or impossibility to reach your nodes may be the consequence. 188 | 189 | 190 | \subsection{Configuration parameters} 191 | Depending on the packet forwarder you run (per default, the poly forwarder is running), 192 | you can set several parameters. Below find an overview, together with their meaning and 193 | default setting. There are more, but these are beyond the scope of this manual. The 194 | relevant ones are: 195 | 196 | \smaller[2] 197 | \begin{verbatim} 198 | /* Devices */ 199 | "gps" : true /* Indicate if you want to include (static) gps coordinates in the stream. */ 200 | "monitor" : false /* If you have monitor software running, activate connection. */ 201 | "upstream" : true /* Set to true if you want to be able to receive data from the nodes. */ 202 | "downstream" : true /* Set to true if you want to be able to send data to the nodes. */ 203 | "ghoststream" : false /* Set to true if you have a fake packet generator running */ 204 | "radiostream" : true /* Set to true if you have a concentrator connected */ 205 | "statusstream": true /* Set to true if you want to include status updates */ 206 | 207 | /* Set a globally unique ID */ 208 | "gateway_ID": "1DEE000000000000" /* This number is globally unique for each device. */ 209 | 210 | /* node server for basic packet server, used by basic packet server or when no other are available */ 211 | "server_address": "iot.semtech.com" /* domain name or ip server of netwerk server */ 212 | "serv_port_up" : 1680 /* port for upstream data */ 213 | "serv_port_down": 1680 /* port for downstream data */ 214 | 215 | /* node servers for poly packet server (max 4 enabled), read by poly packet server only */ 216 | "servers": 217 | [ { "server_address": "croft.thingsnetwork.org" /* domain name or ip server of first netwerk server */ 218 | "serv_port_up" : 1700 /* port for upstream data */ 219 | "serv_port_down": 1701 /* port for downstream data */ 220 | "serv_enabled" : true } /* enable this server */ 221 | { "server_address": "amsterdam.loraley.org" /* domain name or ip server of second netwerk server */ 222 | "serv_port_up" : 1680 /* port for upstream data */ 223 | "serv_port_down": 1681 /* port for downstream data */ 224 | "serv_enabled" : true } ] /* enable this server */ 225 | 226 | /* GPS configuration */ 227 | "ref_latitude" : 0 /* Enter the latitude of the location your gateway is mounted */ 228 | "ref_longitude": 0 /* Enter the longitude of the location your gateway is mounted */ 229 | "ref_altitude" : 0 /* Enter the altitude of the location your gateway is mounted */ 230 | 231 | /* Ghost configuration */ 232 | "ghost_address": "127.0.0.1" /* domain name or ip server of the ghost data server */ 233 | "ghost_port" : 1918 /* connection port for fake packets */ 234 | 235 | /* Monitor configuration */ 236 | "monitor_address": "127.0.0.1" /* domain name or ip server of the ghost data server */ 237 | "monitor_port" : 2008 /* connection port for machine controle */ 238 | 239 | /* Informal data for status updates. */ 240 | "platform" : "*" /* Platform definition, put * for internal, max 24 chars. */ 241 | "contact_email" : "operator@gateway.tst" /* Email of gateway operator, max 40 chars */ 242 | "description" : "Update me" /* Public description of this device, max 64 chars */ 243 | 244 | 245 | \end{verbatim} 246 | \larger[2] 247 | 248 | These options can be set in different manners, see the section below for the possibilities. 249 | 250 | \subsection{Configuration with builtin the webserver} 251 | Planned for future versions, not available this release, please configure using SSH. 252 | 253 | \subsection{Configuration with SSH over the command line.} 254 | Per default a SSH service runs on the gateway, making is possible to login and modify the 255 | settings and software from the command line. The standard login credentials are: 256 | \begin{verbatim} 257 | account: root 258 | password: LorankAdmin 259 | \end{verbatim} 260 | You can login with ssh with the command ``{\bf ssh root@lorank8}'' or ``{\bf ssh root@[IP number]}''. 261 | The first action to take is to change the root password into something personal: 262 | \begin{verbatim} 263 | lorank8 # passwd 264 | (current) password: LorankAdmin 265 | Enter new password: *********** [Type something sensible] 266 | Retype new password: *********** [Retype your password] 267 | \end{verbatim} 268 | Please make {\bf sure} you remember or write down this password. If forgotten, the gateway 269 | cannot be enterend again, Ideetron does {\bf not} have any means of recovery. 270 | The only solution in that situation would be a complete 271 | reinstall of the Beagle Bone and subsequent installation of Lorank gateway 272 | software. This is a process requiring expert skills. See \url{http://beagleboard.org} 273 | and \url{https://github.com/Ideetron} for more information. 274 | 275 | The Lorank software is located in the root directory for convenience. Usually there are 276 | three directories. One build directory, something like `lorank-v1.0.4', a system directory 277 | called `Lorank', and a platform dependent working directory that contains the executables and 278 | setting files for your platform. This is called `Lorank8v1' or something alike. The work 279 | directory contains the executables needed to run the gateway as well as its configuration files. 280 | These files are called \url{global_conf.json} and \url{local_conf.json}. Entries in the 281 | latter file supersede the ones in the former. Although the files end in `.json', they are 282 | not JSON files in a strikt sense. However, if you do edit these files, make sure you 283 | adhere to the format used, for otherwise the forwarder will not be able to run. 284 | Standard editing tools like \url{nano} and \url{vi} are available on the platform, 285 | for example 286 | \begin{verbatim} 287 | nano global_conf.json 288 | \end{verbatim} 289 | Make your changes using the arrow keys (mouse does not work) and save with \^{}O 290 | (control-O), exit with \^{}X (control-X). 291 | 292 | Per default, the poly forwarder is running in the background. Output is send to the 293 | system logger. If you want to experiment, it is better to test the forwarder in the 294 | foreground. In that case, the background must be stopped first. The configuration files are 295 | only read at the start of the forwarder. 296 | 297 | The background forwarder can managed using the following commands: 298 | \begin{verbatim} 299 | systemctl start lorank.service 300 | systemctl stop lorank.service 301 | systemctl restart lorank.service 302 | systemctl status lorank.service 303 | \end{verbatim} 304 | 305 | To enable or disable the forwarder startup at boottime use the commands: 306 | \begin{verbatim} 307 | systemctl enable lorank.service 308 | systemctl disable lorank.service 309 | \end{verbatim} 310 | 311 | 312 | 313 | To test a forwarder in the foreground, for example after you have changed 314 | some configuration parameters, simply stop the background forwarder en 315 | start the new forwarder in the foreground like this: 316 | \begin{verbatim} 317 | systemctl stop lorank.service 318 | ./poly_pkt_fwd 319 | \end{verbatim} 320 | The output will be put directly on screen, so you can see if the new configuration 321 | performs as expected. If so, stop it with \^{}C (control-C) and reactivate the 322 | background forwarder. 323 | \begin{verbatim} 324 | ^C 325 | systemctl start lorank.service 326 | \end{verbatim} 327 | 328 | All logging of the service is written to \url{/var/log/syslog}, so 329 | to see what is happening under the hood, check, for example the last 330 | 200 lines in this file with: 331 | \begin{verbatim} 332 | tail -n 200 /var/log/syslog 333 | \end{verbatim} 334 | 335 | 336 | \subsection{Via SSH using PuTTY.} 337 | No version of Windows OS contain the SSH utility out of the box. So the 338 | best way to log into the gateway is making use of PuTTY, which can be 339 | found here: \url{http://www.putty.org/}. 340 | 341 | 342 | \section{Hardware} 343 | The gateway is build upon the Concentrator Board of IMST iC880A and a 344 | recent Beagle Bone Board. The latter is completely open source hard- and software, 345 | see \url{http://beagleboard.org} for more information. In 346 | between a connection board has been placed. The Beagle Bord's usb is accessible 347 | from the outside and may not be loaded with more that 500 mA. 348 | 349 | 350 | \section{Software} 351 | 352 | \subsection{Location} 353 | All software is opensource and can be found on the Github of Ideetron: 354 | \url{https://github.com/Ideetron}. There are three main repositories 355 | that are relevant 356 | \begin{verbatim} 357 | https://github.com/Ideetron/Lorank 358 | https://github.com/Ideetron/packet_forwarder 359 | https://github.com/Ideetron/lora_gateway 360 | \end{verbatim} 361 | Beware however, that at the time of reading these may have different names, be moved 362 | or there may be added repositories. Please read the latest README's in the 363 | repositories. 364 | 365 | \subsection{Installation} 366 | The gateway come preinstalled. However it can be necessary to reinstall or upgrade 367 | the software. Complete reinstallation is a delicate procedure that requirers 368 | experience with embedded systems. Although the command sequence is easy, differences 369 | between platforms may cause serious trouble. Therefore we strongly discourage this 370 | procedure in general, and is given here only for completeness. The least you should 371 | do before exercising this is read the scripts called. If there is anything in there 372 | you do not understand, please do not move forward. 373 | \begin{verbatim} 374 | ./Lorank/lorank8v1/wipe 375 | git clone https://github.com/Ideetron/Lorank.git; 376 | ./Lorank/install lorank8v1 1.2.3 377 | \end{verbatim} 378 | Note that \url{wipe} {\bf completely removes all Lorank software and settings}. 379 | Replace \url{1.2.3} with the software version you want to install. These can 380 | be found as releases on Github. 381 | 382 | \subsection{Upgrade} 383 | All executables are installed and build form source using git, so this can 384 | be used to upgrade as well. It is also possible, and a maybe safer if you are 385 | not comfortable with git to install a new version of the 386 | software. This does not remove your old version, so if something goes wrong, 387 | you can revert. Still, some level of expertise is needed here, should something 388 | go wrong. Basically the steps are (in the directory \url{/root}) 389 | \begin{verbatim} 390 | cp -r lorank8v1 lorank8v1.backup 391 | ./Lorank/lorank8v1/upgrade 1.2.3 392 | \end{verbatim} 393 | If no release version is provided the most recent code is used. Usually this is not 394 | a good idea, since this code is under heavy development. Please use the latest 395 | {\bf release version} as can be found on Github. The new version is installed in a 396 | separate directory and the executables are copied to the working directory. 397 | Since the former version stays on your system, you can revert by manually 398 | coping those back to the working directory. An other, simpler solution is to 399 | make a backup of the working directory, as is done above. 400 | When performing the upgrade, the \url{global_conf.json} is replaced, the old one 401 | saved as \url{global_conf_old.json} in the same directory. 402 | The \url{local_conf.json} is not touched because it contains your Gateway 403 | Unique Identifier. Usually some merging of the old en new \url{global_conf} file 404 | is needed. This must be performed by hand. Please first test the new software 405 | and its configuration before putting it into production. 406 | Should you be on an older version (prior to 0.1.5) that does not have the 407 | upgrade script yet, please update that first using git: 408 | \begin{verbatim} 409 | cd Lorank 410 | git checkout master 411 | git pull 412 | cd .. 413 | \end{verbatim} 414 | and then proceed as above. 415 | 416 | \section{Operation} 417 | 418 | \subsection{Antenna} 419 | {\bf\textcolor{red}{Warning}}: Never operate the gateway without a properly mounted antenna. 420 | If not mounted the energy meant for transmission reflects back into the 421 | device and immediately destroy the input stages. The gateway will be 422 | damaged beyond repair. 423 | 424 | \subsection{Always on} 425 | The Lorank is designed for 24/7 operation, provided a few precautions are 426 | taken. Do not place the device into direct sunlight (be aware of the 427 | change of sunlight during the day), near heaters or in conditions of 428 | condensing moisture. The Lorank is best mounted on a high location 429 | for optimal reception, away from metal objects. Mount the device such 430 | that the antenna points upwards. The casing should at least be free 431 | on two of the sides so that the heat produced is sufficiently drained. 432 | Other transmitters such as Lora Nodes, WiFi stations and cellphones 433 | should at least be at two meters distance from the Lorank to prevent 434 | damage to its highly sensitive input amplifiers. 435 | 436 | Occasionally the server that accepts your data may stop doing so, even 437 | while the packets are send from the gateway without interruption. 438 | This can happen for instance when a crash happens serverside or a firewall 439 | that is in the pathway is reinitialised. Unfortunately, the gateway is 440 | not informed of such an event, and the only option for now is to restart 441 | your gateway. See above how this can be done. We expected this 442 | problem to disappear as the software in the whole chain gets more 443 | mature over time. 444 | 445 | \subsection{Shutting down} 446 | The Lorank does not have a power switch, so it seems natural to simply 447 | `pull the plug' it when it has to be switched off. Although this is 448 | possible, and will not directly do harm it is better to login into 449 | the gateway via SSH, as described above and bring the gateway down 450 | in an orderly fashion. This can be done with the command: 451 | \begin{verbatim} 452 | shutdown -h now 453 | \end{verbatim} 454 | The gateway will start a shutdown procedure and after approximately 455 | 30 seconds all leds should be off. Restarting can be done by 456 | simply disconnecting and reconnecting the power cable. 457 | 458 | 459 | \section{Specifications} 460 | 461 | \begin{verbatim} 462 | Hardware: 463 | - Frequency band : 868 MHz 464 | - Sensitivity : -138 dBm 465 | - Maximum power : 27 dBm (500mW) 466 | - LoRa demodulators : 49 467 | - Simultaneous channels : 8 468 | - Max connected nodes : ~60 thousand (*) 469 | - Processor : 1GHz, ARM Cortex A8 470 | - OS : Debian / Angstrom Linux 471 | - Wifi : Optional (via usb) 472 | - Current : 1A 473 | - Max Current USB : 500mA [USB is internal] 474 | - Power Adapter : 5Volt= , 2Amp 475 | 476 | (*) This is a theoretical maximum, under the assumption that nodes 477 | only send once per hour. Due to collisions, resend packets, packet 478 | loss etc, the number of nodes that can effectively be handled is 479 | lower, typically 10..20 thousand. 480 | \end{verbatim} 481 | 482 | \begin{verbatim} 483 | Software: 484 | - Lora libraries : Semtech, with modifications from Beta Research BV 485 | - basic packet forwarder : Semtech, 486 | - poly packet forwarder : Beta Research BV, based on code from Semtech 487 | - Installation scripts : Beta Research BV 488 | - Beagle Bone : Various, see website beagle board. 489 | \end{verbatim} 490 | 491 | \section{Maintenance} 492 | The Lorank does not need special maintenance. In case the device fails, 493 | and this failure cannot be attributed to incorrect handling, please 494 | contact Ideetron. 495 | 496 | \section{Disposal} 497 | This is an electronic device, and disposal should be in accordance with 498 | local environmental regulations. 499 | 500 | \section{Legal} 501 | Ideetron can in no way be held responsible for 502 | malfunctions and/or damage resulting from the 503 | information presented in this document. 504 | 505 | 506 | \section{Questions and Answers.} 507 | 508 | \begin{description} 509 | 510 | \item[My gateway ID starts with 1DEE, why is that?] 511 | All gateways from Ideetron are preconfigured with an eight byte unique 512 | ID starting with `1DEE' augmented with six randomly chosen bytes. This is 513 | to make the gateway easily recognisable in the (long) list of gateways at 514 | for example Semtech. This prefix is not registered anywhere, and you are 515 | completely free to change it to your linking. If you keep the rest of 516 | the ID unchanged you can be reasonably sure the ID stays unique. 517 | 518 | \item[Are there any local tools to test my gateway?] 519 | The gateway comes with some precompiled tools from Semtech, which 520 | can be used for testing purposes. These can be found in the directories 521 | that match \url{/root/lorank8-[version_number]/lora_gateway/util_*}. Please see the 522 | \url{readme.md} file therein for further instructions. Ideetron cannot provide 523 | instructions for operation or guarantee for their quality of operation. 524 | 525 | \item[How do I setup a server within my network to catch packets?] 526 | If you want to receive packets on your own computer you need to set up 527 | a router backend yourself. Or maybe you want to simulate the existence 528 | of many node to test your setup. To that end download and compile the 529 | lora\_simulator tools on the github of The Things Network: 530 | \url{https://github.com/TheThingsNetwork/lora_simulator}. 531 | 532 | 533 | 534 | \end{description} 535 | 536 | 537 | \end{document} 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | 676 | -------------------------------------------------------------------------------- /lorank8v1/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Lorank 8 14 | 15 | 16 | 17 | 18 | 19 | 20 | 42 | 43 | 532 | 533 |
534 | 535 |
536 | 537 |
538 | 546 |
547 | 548 | 549 |
550 | 551 |
552 |
Disk Usage
553 |
554 |
Waiting ....
555 |
556 |
557 |
558 |
Work Load
559 |
560 |
Waiting ....
561 |
562 |
563 |
564 |
Local Time
565 |
Waiting ...
566 |
567 |
568 |
569 |
System Uptime
570 |
Waiting ...
571 |
572 |
573 | 574 | 575 | 697 | 698 | 699 | 725 | 726 | 727 | 767 | 768 | 769 | 871 | 872 | 873 | 892 | 893 | 894 | 933 | 934 | 935 | 1005 | 1006 | 1007 |
1008 | 1009 |
1010 | 1011 | 1012 |
1013 | 1014 | 1015 | 1016 | 1017 | 1018 | --------------------------------------------------------------------------------