diff options
23 files changed, 197 insertions, 61 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" diff --git a/recipes-connectivity/lora/lora-network-server-mtp/local_conf.json b/recipes-connectivity/lora/lora-network-server-mtcap/local_conf.json index 3c2af80..3c2af80 100644 --- a/recipes-connectivity/lora/lora-network-server-mtp/local_conf.json +++ b/recipes-connectivity/lora/lora-network-server-mtcap/local_conf.json 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-mtp/lora-network-server.default b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.default index be7dcd5..be7dcd5 100644 --- a/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.default +++ b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.default diff --git a/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.init b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init index 86d731b..86d731b 100755 --- a/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.init +++ b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init diff --git a/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.logrotate.conf b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.logrotate.conf index d2b6c9a..d2b6c9a 100644 --- a/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.logrotate.conf +++ b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.logrotate.conf diff --git a/recipes-connectivity/lora/lora-network-server-mtp_1.0.14.bb b/recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb index 2f5e0bf..56fda88 100644 --- a/recipes-connectivity/lora/lora-network-server-mtp_1.0.14.bb +++ b/recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb @@ -1,5 +1,5 @@ # THIS RECIPE FOR PICOCELL USES PATCHED LORA NETWORK SERVER THAT SUPPORTS -# MTP HARDWARE AND V2 PACKET FORWARDER PROTOCOL +# MTCAP HARDWARE AND V2 PACKET FORWARDER PROTOCOL DESCRIPTION = "MultiTech LoRa Network Server" PRIORITY = "optional" SECTION = "console/utils" @@ -7,9 +7,9 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=7ffae4666a986c4ccf45e99e464f8402" DEPENDS = "jsoncpp libmts mosquitto sqlite3" RDEPENDS_${PN} += "lora-packet-forwarder logrotate" -PR = "r1" +PR = "r2" -SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ +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 \ @@ -17,8 +17,8 @@ SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${ 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" 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 b018478..0000000 --- a/recipes-connectivity/lora/lora-network-server-mtp/lora-network-server.conf +++ /dev/null @@ -1,35 +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": 14, /* Max Tx power (dBm), -6 to 26 */ - "frequencyEU": 867500000 /* center freq for extra EU channels (Hz) */ - }, - "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_1.0.15.bb b/recipes-connectivity/lora/lora-network-server_1.0.16.bb index b0adb07..7a3d27c 100644 --- a/recipes-connectivity/lora/lora-network-server_1.0.15.bb +++ b/recipes-connectivity/lora/lora-network-server_1.0.16.bb @@ -13,8 +13,8 @@ SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${ file://lora-network-server.logrotate.conf \ " -SRC_URI[md5sum] = "4afcfa7fd30fadf439b5fb6218d140bd" -SRC_URI[sha256sum] = "fc15d9e777959dc541c0fa5cd506c8c1047cfddd6b97c344361defc3f84a4098" +SRC_URI[md5sum] = "3169970ea9b96656847d7472a2cf1f0f" +SRC_URI[sha256sum] = "81b3c348911464fccbb70e3ff0c60dbcf77af69c2205aec3591fc2ceff7a5c52" # binaries are already stripped, so suppress warning INSANE_SKIP_${PN} = "already-stripped" 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 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 588795c..07ba4a8 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb +++ b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb @@ -49,7 +49,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 <devel@hentges.net> (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/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/base-files/base-files/mtp/fstab b/recipes-core/base-files/base-files/mtcap/fstab index 01b5f38..01b5f38 100644 --- a/recipes-core/base-files/base-files/mtp/fstab +++ b/recipes-core/base-files/base-files/mtcap/fstab 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-base-image.bb b/recipes-core/images/mlinux-base-image.bb index 35a58a9..6423237 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 rs9113" 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-picocell-image.bb b/recipes-core/images/mlinux-mtcap-image.bb index 49670a9..610fe08 100644 --- a/recipes-core/images/mlinux-picocell-image.bb +++ b/recipes-core/images/mlinux-mtcap-image.bb @@ -1,4 +1,4 @@ -DESCRIPTION = "mLinux PicoCell image" +DESCRIPTION = "mLinux Conduit Access Point image" require mlinux-minimal-image.bb @@ -32,6 +32,8 @@ MULTITECH_FEATURES += " \ reset-handler \ radio-cmd radio-query \ jsparser \ + protobuf \ + annex-client \ " LORA_FEATURES = "lora-packet-forwarder \ 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 9ae7ea7..0000000 --- a/recipes-core/images/mlinux-picocell-debug-image.bb +++ /dev/null @@ -1,10 +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" - diff --git a/recipes-core/udev/udev-182/mtp/mtp.rules b/recipes-core/udev/udev-182/mtcap/mtcap.rules index a0dc9fb..a0dc9fb 100644 --- a/recipes-core/udev/udev-182/mtp/mtp.rules +++ b/recipes-core/udev/udev-182/mtcap/mtcap.rules |