From 2ea1a64b0043e425e9048c4ec405271b1c12d5bb Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Thu, 27 Oct 2016 17:21:24 -0500 Subject: feat: add lora utils: util_tx_continuous & util_lbt_test --- recipes-connectivity/lora/lora-gateway_4.0.1.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-connectivity/lora/lora-gateway_4.0.1.bb b/recipes-connectivity/lora/lora-gateway_4.0.1.bb index b2c52cf..25f0f03 100644 --- a/recipes-connectivity/lora/lora-gateway_4.0.1.bb +++ b/recipes-connectivity/lora/lora-gateway_4.0.1.bb @@ -45,6 +45,8 @@ do_install() { install -m 0755 util_spectral_scan/util_spectral_scan ${D}/opt/lora/gateway-utils/ install -m 0755 util_spi_stress/util_spi_stress ${D}/opt/lora/gateway-utils/ install -m 0755 util_tx_test/util_tx_test ${D}/opt/lora/gateway-utils/ + install -m 0755 util_tx_continuous/util_tx_continuous ${D}/opt/lora/gateway-utils/ + install -m 0755 util_lbt_test/util_lbt_test ${D}/opt/lora/gateway-utils/ } PACKAGES += "${PN}-utils ${PN}-utils-dbg" -- cgit v1.2.3 From 05db091dfcd1499a24087752806f994b3ba6b3c3 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Fri, 28 Oct 2016 09:31:40 -0500 Subject: bump lora-gateway recipe revision --- recipes-connectivity/lora/lora-gateway_4.0.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-connectivity/lora/lora-gateway_4.0.1.bb b/recipes-connectivity/lora/lora-gateway_4.0.1.bb index 25f0f03..9f1fa07 100644 --- a/recipes-connectivity/lora/lora-gateway_4.0.1.bb +++ b/recipes-connectivity/lora/lora-gateway_4.0.1.bb @@ -6,7 +6,7 @@ SECTION = "console/utils" LICENSE = "SEMTECH" LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" DEPENDS = "" -PR = "r4" +PR = "r5" SRCREV = "v${PV}" SRC_URI = "git://github.com/Lora-net/lora_gateway.git;protocol=git \ -- cgit v1.2.3 From 2e67432120b62215596fb2cf1a9e1c921e6d4207 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Tue, 1 Nov 2016 09:41:25 -0500 Subject: mtp: add nodejs to debug image --- recipes-core/images/mlinux-picocell-debug-image.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes-core/images/mlinux-picocell-debug-image.bb b/recipes-core/images/mlinux-picocell-debug-image.bb index 9ae7ea7..7975b8d 100644 --- a/recipes-core/images/mlinux-picocell-debug-image.bb +++ b/recipes-core/images/mlinux-picocell-debug-image.bb @@ -6,5 +6,8 @@ require mlinux-picocell-image.bb IMAGE_INSTALL += "lora-network-server-mtp \ lora-gateway-utils \ lora-query \ - mosquitto mosquitto-clients" + mosquitto mosquitto-clients \ + nodejs + nodejs-npm + " -- cgit v1.2.3 From a4442e19bdf376f043521eee6b71e1f4e506e3fc Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Tue, 1 Nov 2016 09:55:50 -0500 Subject: mtp:fix: image syntax --- recipes-core/images/mlinux-picocell-debug-image.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-core/images/mlinux-picocell-debug-image.bb b/recipes-core/images/mlinux-picocell-debug-image.bb index 7975b8d..f77685b 100644 --- a/recipes-core/images/mlinux-picocell-debug-image.bb +++ b/recipes-core/images/mlinux-picocell-debug-image.bb @@ -7,7 +7,7 @@ IMAGE_INSTALL += "lora-network-server-mtp \ lora-gateway-utils \ lora-query \ mosquitto mosquitto-clients \ - nodejs - nodejs-npm + nodejs \ + nodejs-npm \ " -- cgit v1.2.3 From 8bfdc8e9ed02f5c11ce9f98aeb0b24ca44431ac5 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Tue, 1 Nov 2016 10:08:03 -0500 Subject: mtp: set lora antenna gain to 0 --- .../lora/lora-network-server-mtp/lora-network-server.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.conf b/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.conf index b018478..71c12c1 100644 --- a/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.conf +++ b/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.conf @@ -4,8 +4,9 @@ "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": 14, /* Max Tx power (dBm), -6 to 26 */ - "frequencyEU": 867500000 /* center freq for extra EU channels (Hz) */ + "maxTxPower": 26, /* Max Tx power (dBm), -6 to 26 */ + "frequencyEU": 867500000, /* center freq for extra EU channels (Hz) */ + "antennaGain": 0 }, "udp": { "appPortUp": 1784, /* port for user-developed application use */ -- cgit v1.2.3 From 2e60f2c0e343f90ea7dc1701091b2aecc84e59ce Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Tue, 1 Nov 2016 10:17:46 -0500 Subject: mtp:style: fix lora-network-server.conf whitespace --- .../lora-network-server.conf | 66 +++++++++++----------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.conf b/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.conf index 71c12c1..448b3db 100644 --- a/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.conf +++ b/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.conf @@ -1,36 +1,36 @@ { - "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) */ + "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": 0 - }, - "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 - } + }, + "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 + } } -- cgit v1.2.3 From 961165c078505e47405a974bd771032557072776 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Tue, 1 Nov 2016 16:05:17 -0500 Subject: mtcap: rename machine type mtp to mtcap --- .../lora/lora-network-server-mtcap/local_conf.json | 7 ++ .../lora-network-server.conf | 36 ++++++++++ .../lora-network-server.default | 2 + .../lora-network-server.init | 80 ++++++++++++++++++++++ .../lora-network-server.logrotate.conf | 7 ++ .../lora/lora-network-server-mtcap_1.0.14.bb | 49 +++++++++++++ .../lora/lora-network-server-mtp/local_conf.json | 7 -- .../lora-network-server.conf | 36 ---------- .../lora-network-server.default | 2 - .../lora-network-server.init | 80 ---------------------- .../lora-network-server.logrotate.conf | 7 -- .../lora/lora-network-server-mtp_1.0.14.bb | 49 ------------- .../lora/lora-packet-forwarder_3.0.0.bb | 2 +- .../usb-gadget-mode/usb-gadget-mode.bb | 6 +- recipes-core/base-files/base-files/mtcap/fstab | 9 +++ recipes-core/base-files/base-files/mtp/fstab | 9 --- recipes-core/base-files/base-files_3.0.14.bbappend | 2 +- recipes-core/images/mlinux-mtcap-debug-image.bb | 13 ++++ recipes-core/images/mlinux-mtcap-image.bb | 52 ++++++++++++++ recipes-core/images/mlinux-picocell-debug-image.bb | 13 ---- recipes-core/images/mlinux-picocell-image.bb | 52 -------------- recipes-core/udev/udev-182/mtcap/mtcap.rules | 8 +++ recipes-core/udev/udev-182/mtp/mtp.rules | 8 --- 23 files changed, 268 insertions(+), 268 deletions(-) create mode 100644 recipes-connectivity/lora/lora-network-server-mtcap/local_conf.json create mode 100644 recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.conf create mode 100644 recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.default create mode 100755 recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init create mode 100644 recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.logrotate.conf create mode 100644 recipes-connectivity/lora/lora-network-server-mtcap_1.0.14.bb delete mode 100644 recipes-connectivity/lora/lora-network-server-mtp/local_conf.json delete mode 100644 recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.conf delete mode 100644 recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.default delete mode 100755 recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.init delete mode 100644 recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.logrotate.conf delete mode 100644 recipes-connectivity/lora/lora-network-server-mtp_1.0.14.bb create mode 100644 recipes-core/base-files/base-files/mtcap/fstab delete mode 100644 recipes-core/base-files/base-files/mtp/fstab create mode 100644 recipes-core/images/mlinux-mtcap-debug-image.bb create mode 100644 recipes-core/images/mlinux-mtcap-image.bb delete mode 100644 recipes-core/images/mlinux-picocell-debug-image.bb delete mode 100644 recipes-core/images/mlinux-picocell-image.bb create mode 100644 recipes-core/udev/udev-182/mtcap/mtcap.rules delete mode 100644 recipes-core/udev/udev-182/mtp/mtp.rules diff --git a/recipes-connectivity/lora/lora-network-server-mtcap/local_conf.json b/recipes-connectivity/lora/lora-network-server-mtcap/local_conf.json new file mode 100644 index 0000000..3c2af80 --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server-mtcap/local_conf.json @@ -0,0 +1,7 @@ +{ + "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 new file mode 100644 index 0000000..448b3db --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.conf @@ -0,0 +1,36 @@ +{ + "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": 0 + }, + "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 new file mode 100644 index 0000000..be7dcd5 --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.default @@ -0,0 +1,2 @@ +# 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 new file mode 100755 index 0000000..86d731b --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init @@ -0,0 +1,80 @@ +#!/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 new file mode 100644 index 0000000..d2b6c9a --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.logrotate.conf @@ -0,0 +1,7 @@ +/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_1.0.14.bb b/recipes-connectivity/lora/lora-network-server-mtcap_1.0.14.bb new file mode 100644 index 0000000..8b81b74 --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server-mtcap_1.0.14.bb @@ -0,0 +1,49 @@ +# 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" +RDEPENDS_${PN} += "lora-packet-forwarder logrotate" +PR = "r1" + +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] = "6cbae4e82503c5b5078b4ffadcda05a0" +SRC_URI[sha256sum] = "707e919b02f1f7d3ef8ed66f26b7e8749f4d0db55288062f1aa4c04e5ceccf34" + +# 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-mtp/local_conf.json b/recipes-connectivity/lora/lora-network-server-mtp/local_conf.json deleted file mode 100644 index 3c2af80..0000000 --- a/recipes-connectivity/lora/lora-network-server-mtp/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-mtp/lora-network-server.conf b/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.conf deleted file mode 100644 index 448b3db..0000000 --- a/recipes-connectivity/lora/lora-network-server-mtp/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": 0 - }, - "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-mtp/lora-network-server.default b/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.default deleted file mode 100644 index be7dcd5..0000000 --- a/recipes-connectivity/lora/lora-network-server-mtp/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-mtp/lora-network-server.init b/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.init deleted file mode 100755 index 86d731b..0000000 --- a/recipes-connectivity/lora/lora-network-server-mtp/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-mtp/lora-network-server.logrotate.conf b/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.logrotate.conf deleted file mode 100644 index d2b6c9a..0000000 --- a/recipes-connectivity/lora/lora-network-server-mtp/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-mtp_1.0.14.bb b/recipes-connectivity/lora/lora-network-server-mtp_1.0.14.bb deleted file mode 100644 index 2f5e0bf..0000000 --- a/recipes-connectivity/lora/lora-network-server-mtp_1.0.14.bb +++ /dev/null @@ -1,49 +0,0 @@ -# THIS RECIPE FOR PICOCELL USES PATCHED LORA NETWORK SERVER THAT SUPPORTS -# MTP 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" -RDEPENDS_${PN} += "lora-packet-forwarder logrotate" -PR = "r1" - -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] = "6cbae4e82503c5b5078b4ffadcda05a0" -SRC_URI[sha256sum] = "707e919b02f1f7d3ef8ed66f26b7e8749f4d0db55288062f1aa4c04e5ceccf34" - -# 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-packet-forwarder_3.0.0.bb b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb index 8042d50..c5c9f64 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb +++ b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb @@ -44,7 +44,7 @@ do_install() { install -m 755 ${WORKDIR}/README.md ${D}${LORA_DIR}/ } -do_install_append_mtp() { +do_install_append_mtcap() { install -d ${D}${sysconfdir}/default install -m 0644 ${WORKDIR}/lora-packet-forwarder.default ${D}${sysconfdir}/default/lora-packet-forwarder install -d ${D}${sysconfdir}/init.d diff --git a/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb b/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb index 6887089..32f3fdf 100644 --- a/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb +++ b/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb @@ -1,5 +1,5 @@ # Copyright Matthias Hentges (c) 2007 -# License: MIT (see http://www.opensource.org/licenses/mit-license.php +# License: MIT (see http://www.opensource.org/licenses/mit-license.php # for a copy of the license) # # Filename: usb-gadget-mode.bb @@ -29,8 +29,8 @@ do_install() { install -m 0755 ${WORKDIR}/usb-gadget ${D}${bindir} } -# disbale usb-gadget for mtp hardware -do_install_append_mtp() { +# disbale usb-gadget for mtcap hardware +do_install_append_mtcap() { sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/usb-gadget } diff --git a/recipes-core/base-files/base-files/mtcap/fstab b/recipes-core/base-files/base-files/mtcap/fstab new file mode 100644 index 0000000..01b5f38 --- /dev/null +++ b/recipes-core/base-files/base-files/mtcap/fstab @@ -0,0 +1,9 @@ +rootfs / auto defaults 1 1 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbdevfs /proc/bus/usb usbdevfs noauto 0 0 +tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0 +tmpfs /var/volatile tmpfs defaults 0 0 + +/dev/mtdblock6 /var/config jffs2 defaults 0 0 +/dev/mtdblock7 /var/oem jffs2 defaults,ro 0 0 diff --git a/recipes-core/base-files/base-files/mtp/fstab b/recipes-core/base-files/base-files/mtp/fstab deleted file mode 100644 index 01b5f38..0000000 --- a/recipes-core/base-files/base-files/mtp/fstab +++ /dev/null @@ -1,9 +0,0 @@ -rootfs / auto defaults 1 1 -proc /proc proc defaults 0 0 -devpts /dev/pts devpts mode=0620,gid=5 0 0 -usbdevfs /proc/bus/usb usbdevfs noauto 0 0 -tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0 -tmpfs /var/volatile tmpfs defaults 0 0 - -/dev/mtdblock6 /var/config jffs2 defaults 0 0 -/dev/mtdblock7 /var/oem jffs2 defaults,ro 0 0 diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend b/recipes-core/base-files/base-files_3.0.14.bbappend index f1ab005..0f0ae4f 100644 --- a/recipes-core/base-files/base-files_3.0.14.bbappend +++ b/recipes-core/base-files/base-files_3.0.14.bbappend @@ -1,7 +1,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}" media_card="/media/card" -media_card_mtp="" +media_card_mtcap="" # add SD card dir dirs755_append = " ${media_card}" diff --git a/recipes-core/images/mlinux-mtcap-debug-image.bb b/recipes-core/images/mlinux-mtcap-debug-image.bb new file mode 100644 index 0000000..48009ae --- /dev/null +++ b/recipes-core/images/mlinux-mtcap-debug-image.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "mLinux Conduit Access Point debug image" + +require mlinux-mtcap-image.bb + +# Extra stuff to install +IMAGE_INSTALL += "lora-network-server-mtcap \ + lora-gateway-utils \ + lora-query \ + mosquitto mosquitto-clients \ + nodejs \ + nodejs-npm \ + " + diff --git a/recipes-core/images/mlinux-mtcap-image.bb b/recipes-core/images/mlinux-mtcap-image.bb new file mode 100644 index 0000000..ad60705 --- /dev/null +++ b/recipes-core/images/mlinux-mtcap-image.bb @@ -0,0 +1,52 @@ +DESCRIPTION = "mLinux Conduit Access Point image" + +require mlinux-minimal-image.bb + +FILESYSTEM_FEATURES = "dosfstools \ + cifs-utils \ + lsof \ + " + +NETWORKING_FEATURES += "bridge-utils \ + inetutils-ftp \ + openssl \ + rsync \ + iperf \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + " + +TIME_FEATURES = "tzdata tzdata-africa tzdata-americas tzdata-antarctica tzdata-arctic \ + tzdata-asia tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific \ + tzdata-misc \ + cronie \ + ntpdate \ + " + +MULTITECH_FEATURES += " \ + u-boot-linux-utils \ + mlinux-scripts \ + reset-handler \ + radio-cmd radio-query \ + jsparser \ + " + +LORA_FEATURES = "lora-packet-forwarder \ + lora-packet-forwarder-dbg \ + lora-gateway-utils" + +MISC_FEATURES = "minicom lrzsz nano" + +# Extra stuff to install +IMAGE_INSTALL += " \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${LORA_FEATURES} \ + ${MISC_FEATURES} \ + " + +# Multi-Tech SMS Utility (see http://git.multitech.net) +IMAGE_INSTALL += "sms-utils" diff --git a/recipes-core/images/mlinux-picocell-debug-image.bb b/recipes-core/images/mlinux-picocell-debug-image.bb deleted file mode 100644 index f77685b..0000000 --- a/recipes-core/images/mlinux-picocell-debug-image.bb +++ /dev/null @@ -1,13 +0,0 @@ -DESCRIPTION = "mLinux PicoCell debug image" - -require mlinux-picocell-image.bb - -# Extra stuff to install -IMAGE_INSTALL += "lora-network-server-mtp \ - lora-gateway-utils \ - lora-query \ - mosquitto mosquitto-clients \ - nodejs \ - nodejs-npm \ - " - diff --git a/recipes-core/images/mlinux-picocell-image.bb b/recipes-core/images/mlinux-picocell-image.bb deleted file mode 100644 index 49670a9..0000000 --- a/recipes-core/images/mlinux-picocell-image.bb +++ /dev/null @@ -1,52 +0,0 @@ -DESCRIPTION = "mLinux PicoCell image" - -require mlinux-minimal-image.bb - -FILESYSTEM_FEATURES = "dosfstools \ - cifs-utils \ - lsof \ - " - -NETWORKING_FEATURES += "bridge-utils \ - inetutils-ftp \ - openssl \ - rsync \ - iperf \ - mii-diag \ - tcpdump \ - netcat \ - wget \ - strongswan \ - " - -TIME_FEATURES = "tzdata tzdata-africa tzdata-americas tzdata-antarctica tzdata-arctic \ - tzdata-asia tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific \ - tzdata-misc \ - cronie \ - ntpdate \ - " - -MULTITECH_FEATURES += " \ - u-boot-linux-utils \ - mlinux-scripts \ - reset-handler \ - radio-cmd radio-query \ - jsparser \ - " - -LORA_FEATURES = "lora-packet-forwarder \ - lora-packet-forwarder-dbg \ - lora-gateway-utils" - -MISC_FEATURES = "minicom lrzsz nano" - -# Extra stuff to install -IMAGE_INSTALL += " \ - ${FILESYSTEM_FEATURES} \ - ${TIME_FEATURES} \ - ${LORA_FEATURES} \ - ${MISC_FEATURES} \ - " - -# Multi-Tech SMS Utility (see http://git.multitech.net) -IMAGE_INSTALL += "sms-utils" diff --git a/recipes-core/udev/udev-182/mtcap/mtcap.rules b/recipes-core/udev/udev-182/mtcap/mtcap.rules new file mode 100644 index 0000000..a0dc9fb --- /dev/null +++ b/recipes-core/udev/udev-182/mtcap/mtcap.rules @@ -0,0 +1,8 @@ +ACTION=="remove", GOTO="mlinux_end" +SUBSYSTEM!="tty", GOTO="mlinux_end" +KERNEL!="ttyXRUSB[0-9]*", GOTO="mlinux_end" + +SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" +ENV{ID_IFACE}=="", GOTO="mlinux_end" + +LABEL="mlinux_end" diff --git a/recipes-core/udev/udev-182/mtp/mtp.rules b/recipes-core/udev/udev-182/mtp/mtp.rules deleted file mode 100644 index a0dc9fb..0000000 --- a/recipes-core/udev/udev-182/mtp/mtp.rules +++ /dev/null @@ -1,8 +0,0 @@ -ACTION=="remove", GOTO="mlinux_end" -SUBSYSTEM!="tty", GOTO="mlinux_end" -KERNEL!="ttyXRUSB[0-9]*", GOTO="mlinux_end" - -SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" -ENV{ID_IFACE}=="", GOTO="mlinux_end" - -LABEL="mlinux_end" -- cgit v1.2.3 From 5e1da7aeca498961c20147c356990752a4cb2d87 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Thu, 3 Nov 2016 09:34:32 -0500 Subject: fix: remove lora-network-server-usb from build --- recipes-core/images/mlinux-factory-image.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/images/mlinux-factory-image.bb b/recipes-core/images/mlinux-factory-image.bb index 9cf9b06..2a3bef4 100644 --- a/recipes-core/images/mlinux-factory-image.bb +++ b/recipes-core/images/mlinux-factory-image.bb @@ -20,7 +20,7 @@ IMAGE_INSTALL += "autossh" IMAGE_INSTALL += "monit" # LoRa support (MTAC-LORA accessory card) -IMAGE_INSTALL += "lora-gateway-utils lora-gateway-usb-utils lora-network-server lora-query lora-packet-forwarder-usb" +IMAGE_INSTALL += "lora-gateway-utils lora-gateway-usb-utils lora-network-server lora-query lora-packet-forwarder" # MQTT server IMAGE_INSTALL += "mosquitto mosquitto-clients" -- cgit v1.2.3 From 4d6aefceec69079f3069440f6a9d2f3ea30aee89 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Wed, 26 Oct 2016 15:40:35 -0500 Subject: feat: add annex-client --- recipes-core/annex-client/annex-client-from-src.bb | 27 ++++++++++++++ recipes-core/annex-client/annex-client.bb | 29 +++++++++++++++ .../annex-client/annex-client/annex-client.init | 43 ++++++++++++++++++++++ recipes-core/annex-proto/annex-proto.bb | 24 ++++++++++++ recipes-core/images/mlinux-base-image.bb | 1 + recipes-core/images/mlinux-mtcap-image.bb | 2 + 6 files changed, 126 insertions(+) create mode 100644 recipes-core/annex-client/annex-client-from-src.bb create mode 100644 recipes-core/annex-client/annex-client.bb create mode 100644 recipes-core/annex-client/annex-client/annex-client.init create mode 100644 recipes-core/annex-proto/annex-proto.bb diff --git a/recipes-core/annex-client/annex-client-from-src.bb b/recipes-core/annex-client/annex-client-from-src.bb new file mode 100644 index 0000000..ee7dee9 --- /dev/null +++ b/recipes-core/annex-client/annex-client-from-src.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "Provides the Multi-Tech MDM client" +SECTION = "remote-management" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +PROVIDES = "annex-client-from-src" +DEPENDS = "jsoncpp curl protobuf cyrus-sasl protobuf-native annex-proto mts-io" + +PR = "r0" +SRCREV = "a696a7660bf153fec126cf971442c60961c51782" + +SRC_URI = "git://git@${MTS_INTERNAL_GIT}/multitech/annex-client.git;protocol=ssh;branch=master" + +S = "${WORKDIR}/git" + +do_compile() { + echo "directory: `pwd`" + mkdir -p annex_pb + cp ${STAGING_DIR_NATIVE}/annex.proto annex_pb/ + make all CFLAGS+="-DMLINUX_BUILD" +} + +# IMPORTANT NOTE: +# this recipe is only used for the annex-client Jenkin's job to build IPK. +# annex-client.bb is used to install the binary in an image +do_install() { + oe_runmake install DESTDIR=${D} SUBDIRS="src" +} diff --git a/recipes-core/annex-client/annex-client.bb b/recipes-core/annex-client/annex-client.bb new file mode 100644 index 0000000..1a0544a --- /dev/null +++ b/recipes-core/annex-client/annex-client.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Provides the Multi-Tech MDM client" +SECTION = "remote-management" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +PROVIDES = "annex-client" + +# NOTE: annex-client binary is built with Jenkin's job using annex-client-from-src.bb +# To update this, manually copy ipk from Jenkin's job to .net/downloads/ +PR = "r0" +SRC_URI = "http://multitech.net/downloads/annex-client-from-src_${PV}-${PR}.0_${TUNE_PKGARCH}.ipk \ + file://annex-client.init \ +" + +SRC_URI[md5sum] = "b17462ba3883df6a06b226b37a523eba" +SRC_URI[sha256sum] = "be903e7e27ad34832cb8045ef805f4e226aa6e254a3c995c5e61a0a9197a95b0" + +#inherit update-rc.d +# +#INITSCRIPT_NAME = "annex-client" +#INITSCRIPT_PARAMS = "defaults 95 1" +S = "${WORKDIR}" + +do_install() { + install -d ${D}${sbindir} + install -m 755 sbin/annexcd ${D}${sbindir} + + install -d ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/annex-client.init ${D}${sysconfdir}/init.d/annex-client +} diff --git a/recipes-core/annex-client/annex-client/annex-client.init b/recipes-core/annex-client/annex-client/annex-client.init new file mode 100644 index 0000000..4a5dc4b --- /dev/null +++ b/recipes-core/annex-client/annex-client/annex-client.init @@ -0,0 +1,43 @@ +#!/bin/bash + +MONITOR="/sbin/monitor-annexcd" +CLIENT="annexcd" + +start() { + if [[ $(pidof -x $MONITOR) ]]; then + echo "RM client is already running" + else + echo "Starting RM client" + $MONITOR & + fi +} + +stop() { + MONITOR_PID=$(pidof -x $MONITOR) + CLIENT_PID=$(pidof $CLIENT) + if [[ $MONITOR_PID ]]; then + echo "Stopping RM client" + kill $MONITOR_PID $CLIENT_PID + else + echo "RM client is not running" + fi +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; + *) + echo "Usage: /etc/init.d/annex-client {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-core/annex-proto/annex-proto.bb b/recipes-core/annex-proto/annex-proto.bb new file mode 100644 index 0000000..cbb6fb2 --- /dev/null +++ b/recipes-core/annex-proto/annex-proto.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Provides the Multi-Tech MDM client protobuffer definitions" +SECTION = "remote-management" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +PR = "r20" +PROVIDES = "annex_proto" +DEPENDS = "protobuf" +SRCREV = "7ad3f17a59d3fe564da099518310d61ad1304913" + +SRC_URI = "git://git@${MTS_INTERNAL_GIT}/annex/proto.git;protocol=ssh;branch=master \ +" +S = "${WORKDIR}/git" + +# don't use cli here +do_compile() { + echo "directory: `pwd`" +} + +do_install() { + install annex.proto ${STAGING_DIR_NATIVE} +} + + + diff --git a/recipes-core/images/mlinux-base-image.bb b/recipes-core/images/mlinux-base-image.bb index b90903a..84cead8 100644 --- a/recipes-core/images/mlinux-base-image.bb +++ b/recipes-core/images/mlinux-base-image.bb @@ -51,6 +51,7 @@ MULTITECH_FEATURES += " \ reset-handler \ radio-cmd radio-query \ jsparser \ + annex-client \ " MISC_FEATURES = "minicom lrzsz nano" diff --git a/recipes-core/images/mlinux-mtcap-image.bb b/recipes-core/images/mlinux-mtcap-image.bb index ad60705..610fe08 100644 --- a/recipes-core/images/mlinux-mtcap-image.bb +++ b/recipes-core/images/mlinux-mtcap-image.bb @@ -32,6 +32,8 @@ MULTITECH_FEATURES += " \ reset-handler \ radio-cmd radio-query \ jsparser \ + protobuf \ + annex-client \ " LORA_FEATURES = "lora-packet-forwarder \ -- cgit v1.2.3 From d0d3744a7c18ad2bc9632671571c9f0e36475b19 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 4 Nov 2016 17:20:09 -0500 Subject: Create new development image level 3.2.1 --- conf/distro/mlinux.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index bdc9165..9be1ca1 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,8 +1,8 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "3.2" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0" -DISTRO_CODENAME = "" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.1dev1" +DISTRO_CODENAME = "dev1" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" -- cgit v1.2.3 From e3376e7c8bb110735b9fbdf0325f75dcaeaa7b36 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Mon, 7 Nov 2016 17:02:49 -0600 Subject: mtcap:fix: use lora eui in eeprom for global_conf.json --- .../lora/lora-packet-forwarder/lora-packet-forwarder.init | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init index 259243e..8c0894a 100755 --- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init +++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init @@ -13,7 +13,13 @@ pkt_fwd_pidfile=$run_dir/lora-pkt-fwd-1.pid log_file=/var/log/lora-pkt-fwd.log do_start() { - echo -n "Starting $NAME: " + echo "Starting $NAME: " + + eui=$(mts-io-sysfs show lora/eui) + # Remove colons + clean_eui="${eui//:/}" + echo "Setting gateway_id in global_conf.json to $clean_eui" + sed -i "s/\"gateway_ID\": \".*\"/\"gateway_ID\": \"$clean_eui\"/" global_conf.json mkdir -p $run_dir -- cgit v1.2.3 From 5964212dc0249408e2cf944f17b489fe814bd52f Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Fri, 4 Nov 2016 08:29:07 -0500 Subject: lora-gateway: add patch for util_tx_continuous to use clksrc 0 --- .../lora-gateway-change-util-tx-continuous-clksrc.patch | 13 +++++++++++++ recipes-connectivity/lora/lora-gateway_4.0.1.bb | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 recipes-connectivity/lora/lora-gateway/lora-gateway-change-util-tx-continuous-clksrc.patch diff --git a/recipes-connectivity/lora/lora-gateway/lora-gateway-change-util-tx-continuous-clksrc.patch b/recipes-connectivity/lora/lora-gateway/lora-gateway-change-util-tx-continuous-clksrc.patch new file mode 100644 index 0000000..bdc05ad --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway/lora-gateway-change-util-tx-continuous-clksrc.patch @@ -0,0 +1,13 @@ +diff --git a/util_tx_continuous/src/util_tx_continuous.c b/util_tx_continuous/src/util_tx_continuous.c +index 31f45ac..f9cf033 100644 +--- a/util_tx_continuous/src/util_tx_continuous.c ++++ b/util_tx_continuous/src/util_tx_continuous.c +@@ -297,7 +297,7 @@ int main(int argc, char **argv) + /* Board config */ + memset(&boardconf, 0, sizeof(boardconf)); + boardconf.lorawan_public = true; +- boardconf.clksrc = 1; /* Radio B is source by default */ ++ boardconf.clksrc = 0; /* Radio B is source by default */ + lgw_board_setconf(boardconf); + + /* RF config */ diff --git a/recipes-connectivity/lora/lora-gateway_4.0.1.bb b/recipes-connectivity/lora/lora-gateway_4.0.1.bb index 9f1fa07..ce6dd89 100644 --- a/recipes-connectivity/lora/lora-gateway_4.0.1.bb +++ b/recipes-connectivity/lora/lora-gateway_4.0.1.bb @@ -6,13 +6,14 @@ SECTION = "console/utils" LICENSE = "SEMTECH" LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" DEPENDS = "" -PR = "r5" +PR = "r6" SRCREV = "v${PV}" SRC_URI = "git://github.com/Lora-net/lora_gateway.git;protocol=git \ file://lora-gateway-add-fpga-version-28.patch \ file://library_4.0.cfg \ file://lora-gateway-add-spi-path-function.patch \ + file://lora-gateway-change-util-tx-continuous-clksrc.patch \ " SRC_URI[md5sum] = "9e06a3733a9fea39a3d61f77b412badf" -- cgit v1.2.3 From f11702ca3ca8fc875ee85763710ab178cf7be364 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Wed, 9 Nov 2016 12:04:31 -0600 Subject: mtcap:feat: upgrade lora-network-server --- .../lora/lora-network-server-mtcap_1.0.14.bb | 49 ---------------------- .../lora/lora-network-server-mtcap_1.0.15.bb | 49 ++++++++++++++++++++++ 2 files changed, 49 insertions(+), 49 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-network-server-mtcap_1.0.14.bb create mode 100644 recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb diff --git a/recipes-connectivity/lora/lora-network-server-mtcap_1.0.14.bb b/recipes-connectivity/lora/lora-network-server-mtcap_1.0.14.bb deleted file mode 100644 index 8b81b74..0000000 --- a/recipes-connectivity/lora/lora-network-server-mtcap_1.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" -RDEPENDS_${PN} += "lora-packet-forwarder logrotate" -PR = "r1" - -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] = "6cbae4e82503c5b5078b4ffadcda05a0" -SRC_URI[sha256sum] = "707e919b02f1f7d3ef8ed66f26b7e8749f4d0db55288062f1aa4c04e5ceccf34" - -# 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-mtcap_1.0.15.bb b/recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb new file mode 100644 index 0000000..3eae827 --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb @@ -0,0 +1,49 @@ +# 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" +RDEPENDS_${PN} += "lora-packet-forwarder logrotate" +PR = "r2" + +SRC_URI = "http://multitech.net/downloads/lora-network-server_arm926ejste_1.0.15-2-g642a748.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] = "6cbae4e82503c5b5078b4ffadcda05a0" +SRC_URI[sha256sum] = "707e919b02f1f7d3ef8ed66f26b7e8749f4d0db55288062f1aa4c04e5ceccf34" + +# 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" -- cgit v1.2.3 From ed42d0818b12bc61e37fb274357e1b07c5fb50ce Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Wed, 9 Nov 2016 12:07:12 -0600 Subject: mtcap:fix: lora network server checksums --- recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb b/recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb index 3eae827..56fda88 100644 --- a/recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb +++ b/recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb @@ -17,8 +17,8 @@ SRC_URI = "http://multitech.net/downloads/lora-network-server_arm926ejste_1.0.15 file://local_conf.json \ " -SRC_URI[md5sum] = "6cbae4e82503c5b5078b4ffadcda05a0" -SRC_URI[sha256sum] = "707e919b02f1f7d3ef8ed66f26b7e8749f4d0db55288062f1aa4c04e5ceccf34" +SRC_URI[md5sum] = "28db13a45497d678e071a6062a1cc486" +SRC_URI[sha256sum] = "7558391a635f5c47723d6bd56831d3aa9420169572914b0c8fa6f01aa1730677" # binaries are already stripped, so suppress warning INSANE_SKIP_${PN} = "already-stripped" -- cgit v1.2.3 From 38ded95350a89cae973df774242e3c35e98784d8 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Wed, 9 Nov 2016 15:22:48 -0600 Subject: chore: change build parallelism to depend on number of cores --- contrib/local.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/local.conf b/contrib/local.conf index 66a1312..1e83060 100644 --- a/contrib/local.conf +++ b/contrib/local.conf @@ -32,8 +32,8 @@ BBMASK = "" # Make use of SMP: # PARALLEL_MAKE specifies how many concurrent compiler threads are spawned per bitbake process # BB_NUMBER_THREADS specifies how many concurrent bitbake tasks will be run -PARALLEL_MAKE = "-j4" -BB_NUMBER_THREADS = "4" +BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()*2}" +PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()*2}" # Don't generate the mirror tarball for SCM repos, the snapshot is enough BB_GENERATE_MIRROR_TARBALLS = "0" -- cgit v1.2.3