summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recipes-connectivity/lora/lora-network-server-mtcap/local_conf.json7
-rw-r--r--recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.conf36
-rw-r--r--recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.default2
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init80
-rw-r--r--recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.logrotate.conf7
-rw-r--r--recipes-connectivity/lora/lora-network-server-mtcap_2.0.14.bb49
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init3
7 files changed, 1 insertions, 183 deletions
diff --git a/recipes-connectivity/lora/lora-network-server-mtcap/local_conf.json b/recipes-connectivity/lora/lora-network-server-mtcap/local_conf.json
deleted file mode 100644
index 3c2af80..0000000
--- a/recipes-connectivity/lora/lora-network-server-mtcap/local_conf.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "gateway_conf": {
- "server_address": "localhost",
- "serv_port_up": 1780,
- "serv_port_down": 1782
- }
-}
diff --git a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.conf b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.conf
deleted file mode 100644
index 5884078..0000000
--- a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.conf
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "lora": {
- "netID": "010203", /* netID for beacon packets */
- "frequencyBand": "868", /* US="915", EU="868" */
- "rx1DatarateOffset": 0, /* Datarate offset for mote rx window 1 sent in join response (0-3) */
- "rx2Datarate": 12, /* Datarate for mote rx window 2 sent in join response (7-12) */
- "maxTxPower": 26, /* Max Tx power (dBm), -6 to 26 */
- "frequencyEU": 867500000, /* center freq for extra EU channels (Hz) */
- "antennaGain": 1.4
- },
- "udp": {
- "appPortUp": 1784, /* port for user-developed application use */
- "appPortDown": 1786, /* port for user-developed application use */
- "upstreamPort": 1780, /* ports for LoRa network communication */
- "downstreamPort": 1782 /* ports for LoRa network communication */
- },
- "addressRange": {
- "start": "00:00:00:01", /* address range used for mDots */
- "end": "FF:FF:FF:FE"
- },
- "network": {
- "public": true, /* set to false for private LoRa network with mDots + Conduit */
- "leasetime": 0, /* time until mDot join expires (minutes) or 0 for no expiration */
- "name": "YOUR-NETWORK-NAME", /* configure network security */
- "passphrase": "YOUR-NETWORK-PASSPHRASE"
- },
- "log" : {
- "console" : true,
- "syslog" : false,
- "level" : 30, /* error=10, warn=20, info=30, debug=50, trace=60, max=100 */
- "path": "/var/log/lora-network-server.log"
- },
- "mqtt": {
- "enabled": true
- }
-}
diff --git a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.default b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.default
deleted file mode 100644
index be7dcd5..0000000
--- a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.default
+++ /dev/null
@@ -1,2 +0,0 @@
-# set to "yes" or "no" to control starting on boot
-ENABLED="yes"
diff --git a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init
deleted file mode 100755
index 86d731b..0000000
--- a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/bash
-
-NAME="lora-network-server"
-ENABLED="yes"
-
-START_STOP_DAEMON="/usr/sbin/start-stop-daemon"
-
-[ -f /etc/default/$NAME ] && source /etc/default/$NAME
-
-run_dir=/var/run/lora
-conf_dir=/var/config/lora
-conf_file=/opt/lora/lora-network-server.conf
-conf_db=$conf_dir/lora-network-server.db
-
-net_server=/opt/lora/lora-network-server
-net_server_log=/var/log/lora-network-server.log
-net_server_pidfile=$run_dir/$NAME.pid
-
-pkt_fwd=/opt/lora/lora_pkt_fwd
-pkt_fwd_pidfile=$run_dir/lora-pkt-fwd-1.pid
-
-do_start() {
- if ! [ -f $conf_file ]; then
- echo "$0: $conf_file missing"
- exit 1
- fi
-
- echo -n "Starting $NAME: "
- mkdir -p $run_dir/1
- # start network server
- $START_STOP_DAEMON --start --background --make-pidfile \
- --pidfile $net_server_pidfile --startas /bin/bash \
- --chdir "/opt/lora" -- -c "exec $net_server \
- -c $conf_file --lora-path $run_dir --db $conf_db \
- --noconsole -l $net_server_log >> $net_server_log 2>&1"
- sleep 2
- # start packet forwarder
- $START_STOP_DAEMON --start --background --make-pidfile \
- --pidfile $pkt_fwd_pidfile --exec $pkt_fwd --chdir "/opt/lora/"
-
- renice -n -20 -p $(pgrep lora-network-se)
- renice -n -20 -p $(pgrep $(basename $pkt_fwd))
-
- echo "OK"
-}
-
-do_stop() {
- echo -n "Stopping $NAME: "
- $START_STOP_DAEMON --stop --quiet --oknodo --pidfile $net_server_pidfile --retry 15
- $START_STOP_DAEMON --stop --quiet --oknodo --pidfile $pkt_fwd_pidfile --retry 5
- rm -f $net_server_pidfile $pkt_fwd_pidfile
- echo "OK"
-}
-
-if [ "$ENABLED" != "yes" ]; then
- echo "$NAME: disabled in /etc/default"
- exit
-fi
-
-case "$1" in
- "start")
- do_start
- ;;
- "stop")
- do_stop
- ;;
- "restart")
- ## Stop the service and regardless of whether it was
- ## running or not, start it again.
- do_stop
- do_start
- ;;
- *)
- ## If no parameters are given, print which are avaiable.
- echo "Usage: $0 {start|stop|restart}"
- exit 1
- ;;
-esac
-
-
diff --git a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.logrotate.conf b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.logrotate.conf
deleted file mode 100644
index d2b6c9a..0000000
--- a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.logrotate.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-/var/log/lora-pkt-fwd*.log /var/log/lora-network-server.log {
- size 512k
- rotate 4
- compress
- copytruncate
- missingok
-}
diff --git a/recipes-connectivity/lora/lora-network-server-mtcap_2.0.14.bb b/recipes-connectivity/lora/lora-network-server-mtcap_2.0.14.bb
deleted file mode 100644
index 9a6eda7..0000000
--- a/recipes-connectivity/lora/lora-network-server-mtcap_2.0.14.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-# THIS RECIPE FOR PICOCELL USES PATCHED LORA NETWORK SERVER THAT SUPPORTS
-# MTCAP HARDWARE AND V2 PACKET FORWARDER PROTOCOL
-DESCRIPTION = "MultiTech LoRa Network Server"
-PRIORITY = "optional"
-SECTION = "console/utils"
-LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=7ffae4666a986c4ccf45e99e464f8402"
-DEPENDS = "jsoncpp libmts mosquitto sqlite3 curl gnutls"
-RDEPENDS_${PN} += "lora-packet-forwarder logrotate bash"
-PR = "r3"
-
-SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \
- file://lora-network-server.conf \
- file://lora-network-server.init \
- file://lora-network-server.default \
- file://lora-network-server.logrotate.conf \
- file://local_conf.json \
- "
-
-SRC_URI[md5sum] = "17894d4d40374bf68052bcce38d1310c"
-SRC_URI[sha256sum] = "4baae18fdaef48278a004abfb16b5e0a20d9990c252d0bb9d8a592ffca9ff6d7"
-
-# binaries are already stripped, so suppress warning
-INSANE_SKIP_${PN} = "already-stripped"
-
-S = "${WORKDIR}"
-
-LORA_DIR = "/opt/lora"
-
-do_compile() {
-}
-
-do_install() {
- install -d ${D}${LORA_DIR}
- install -m 0755 lora-network-server ${D}${LORA_DIR}/
- install -m 0644 ${WORKDIR}/lora-network-server.conf ${D}${LORA_DIR}/
- install -m 0755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/
-
- install -d ${D}${sysconfdir}/default
- install -m 0644 ${WORKDIR}/lora-network-server.default ${D}${sysconfdir}/default/lora-network-server
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/lora-network-server.init ${D}${sysconfdir}/init.d/lora-network-server
- install -d ${D}${sysconfdir}/logrotate.d
- install -m 0644 ${WORKDIR}/lora-network-server.logrotate.conf ${D}${sysconfdir}/logrotate.d/lora-network-server.conf
-}
-
-CONFFILES_${PN} = "${sysconfdir}/default/lora-network-server"
-FILES_${PN} += "${LORA_DIR}"
-FILES_${PN}-dbg += "${LORA_DIR}/.debug"
diff --git a/recipes-connectivity/lora/lora-network-server/lora-network-server.init b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
index 032a0f7..dec846f 100755
--- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init
+++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
@@ -12,7 +12,6 @@ ENABLED="yes"
run_dir=/var/run/lora
conf_dir=/var/config/lora
conf_file=$conf_dir/lora-network-server.conf
-conf_db=$conf_dir/lora-network-server.db
net_server=/opt/lora/lora-network-server
@@ -119,7 +118,7 @@ do_start() {
start-stop-daemon --start --background --make-pidfile \
--pidfile $net_server_pidfile --startas /bin/bash -- -c "exec $net_server \
-c $conf_file --lora-eui $lora_eui --lora-prod-1 $lora_id --lora-hw-1 $lora_hw \
- --lora-path $run_dir --db $conf_db \
+ --lora-path $run_dir \
--noconsole -l $net_server_log >> $net_server_log 2>&1"
sleep 2
# start packet forwarder