diff options
author | John Klug <john.klug@multitech.com> | 2020-11-11 18:48:27 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2020-11-11 18:48:27 -0600 |
commit | b00be59bbc49535097c450b6b8c5fc10c1efd6dd (patch) | |
tree | 25cf0e14f66c5fca1cfe41b31bf862d60a36cf12 /recipes-connectivity/lora | |
parent | db088915be6dca3f09dedbcdaa7264d9271b1c74 (diff) | |
download | meta-mlinux-b00be59bbc49535097c450b6b8c5fc10c1efd6dd.tar.gz meta-mlinux-b00be59bbc49535097c450b6b8c5fc10c1efd6dd.tar.bz2 meta-mlinux-b00be59bbc49535097c450b6b8c5fc10c1efd6dd.zip |
Merge multiarch project to: added missing index file 2020 June 11GitosisMultiarch
Diffstat (limited to 'recipes-connectivity/lora')
13 files changed, 253 insertions, 102 deletions
diff --git a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-disable-device-mode.patch b/recipes-connectivity/lora/lora-basic-station/lora-basic-station-disable-device-mode.patch deleted file mode 100644 index d81d041..0000000 --- a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-disable-device-mode.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/sx1301conf.c b/src/sx1301conf.c -index bca649c..c2681a4 100644 ---- a/src/sx1301conf.c -+++ b/src/sx1301conf.c -@@ -433,7 +433,10 @@ int sx1301conf_start (struct sx1301conf* sx1301conf, u4_t cca_region) { - } - - LOG(MOD_RAL|INFO, "Station device: %s (PPS capture %sabled)", sx1301conf->device, sx1301conf->pps ? "en":"dis"); -+ -+#ifndef CFG_prod - lgwx_device_mode = sys_deviceMode; -+#endif - int err = lgw_start(); - if( err == LGW_HAL_SUCCESS ) { - lgw_reg_w(LGW_GPS_EN, sx1301conf->pps ? 1 : 0); diff --git a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-fix-clksrc-0.patch b/recipes-connectivity/lora/lora-basic-station/lora-basic-station-fix-clksrc-0.patch deleted file mode 100644 index c534460..0000000 --- a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-fix-clksrc-0.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/sx1301conf.c b/src/sx1301conf.c -index bca649c..fe62351 100644 ---- a/src/sx1301conf.c -+++ b/src/sx1301conf.c -@@ -193,7 +193,8 @@ static void parse_sx1301_conf (ujdec_t* D, struct sx1301conf* sx1301conf) { - break; - } - case J_clksrc: { - sx1301conf->boardconf.clksrc = uj_intRange(D, 0, LGW_RF_CHAIN_NB-1); -+ sx1301conf->boardconf.clksrc = 0; - break; - } - case J_tx_gain_lut: { - diff --git a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-sys-linux-log-fix.patch b/recipes-connectivity/lora/lora-basic-station/lora-basic-station-sys-linux-log-fix.patch deleted file mode 100644 index 83be080..0000000 --- a/recipes-connectivity/lora/lora-basic-station/lora-basic-station-sys-linux-log-fix.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src-linux/sys_linux.c b/src-linux/sys_linux.c -index f8286c8..7afc073 100644 ---- a/src-linux/sys_linux.c -+++ b/src-linux/sys_linux.c -@@ -724,7 +724,7 @@ static int parseStationConf () { - case J_nodc: - case J_nodwell: - case J_device_mode: { -- LOG(MOD_S2E|WARNING, "Feature not supported in production level code (station.conf) - ignored: %s", D->field.name); -- uj_skipValue(D); -+ LOG(MOD_S2E|WARNING, "Feature not supported in production level code (station.conf) - ignored: %s", D.field.name); -+ uj_skipValue(&D); - break; - } diff --git a/recipes-connectivity/lora/lora-basic-station_2.0.3.bb b/recipes-connectivity/lora/lora-basic-station_2.0.5-1.bb index 2db6a14..f0df90b 100644 --- a/recipes-connectivity/lora/lora-basic-station_2.0.3.bb +++ b/recipes-connectivity/lora/lora-basic-station_2.0.5-1.bb @@ -9,16 +9,13 @@ DEPENDS = "lora-gateway logrotate lora-logging mbedtls" RDEPENDS_${PN} += "bash" PR = "r1" -SRCREV = "v${PV}" +SRCREV = "${PV}" -SRC_URI = "git://github.com/lorabasics/basicstation.git;protocol=git \ +SRC_URI = "git://github.com/MultiTechSystems/basicstation.git;protocol=git;branch=master \ file://setup.gmk \ file://lora-basic-station.init \ file://lora-basic-station.default \ file://tc.uri \ - file://lora-basic-station-disable-device-mode.patch \ - file://lora-basic-station-sys-linux-log-fix.patch \ - file://lora-basic-station-fix-clksrc-0.patch \ " diff --git a/recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb b/recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb index 403670a..511a8b3 100644 --- a/recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb +++ b/recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb @@ -27,6 +27,9 @@ do_compile() { } do_install() { +} + +do_install_append_mtcdt() { install -d ${D}${includedir}/lora install -d ${D}${libdir}/lora install -m 0644 mlinux4/libsx1301ar/* ${D}${includedir}/lora diff --git a/recipes-connectivity/lora/lora-gateway_5.0.1.bb b/recipes-connectivity/lora/lora-gateway_5.0.1.bb index faec985..1ad47d2 100644 --- a/recipes-connectivity/lora/lora-gateway_5.0.1.bb +++ b/recipes-connectivity/lora/lora-gateway_5.0.1.bb @@ -7,23 +7,16 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" DEPENDS = "libgps24" RDEPENDS_${PN} = "libgps24" -PR = "r12" -SRCREV = "v${PV}" +PR = "r24" +SRCREV = "dea57d6f29246434173c33c56850708c51fc5b23" -SRC_URI = "git://github.com/Lora-net/lora_gateway.git;protocol=git \ - file://lora-gateway-add-fpga-version-28-31-33.patch \ + +SRC_URI = "git://git.multitech.net/lora_gateway_mtac_full;branch=master;protocol=git \ file://library_4.0.cfg \ - file://lora-gateway-add-spi-path-function.patch \ file://ln-lora-spi-dev.sh \ - file://lora-gateway-change-util-tx-continuous-clksrc.patch \ - file://lora-gateway-v28-skip-IQ-invert.patch \ - file://lora-gateway-spectral-scan-skip-fpga-reset.patch \ - file://lora-gateway-gpsd.patch \ " -SRC_URI[md5sum] = "9e06a3733a9fea39a3d61f77b412badf" -SRC_URI[sha256sum] = "28fbfe098013908794b32e51d1fed4427f20dd6c8adbbca78df2e1800f5c84dc" S = "${WORKDIR}/git" @@ -74,4 +67,3 @@ FILES_${PN}-staticdev = "${libdir}/lora/libloragw.a" do_rm_work() { echo "skipping" } - 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 61b6e2b..5e2f085 100755 --- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init +++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init @@ -38,6 +38,12 @@ lora_mtcap_id="MTCAP-LORA" lora_mtcap_id868="MTCAP-LORA-868" lora_mtcap_id915="MTCAP-LORA-915" +mtcdt3_id="MTCDT3" +lora_mtcdt3_id="MTCDT3-LORA" +lora_mtcdt3_id868="MTCDT3-LORA-868" +lora_mtcdt3_id915="MTCDT3-LORA-915" + + lora_mtac_g_id="MTAC-LORA-G" lora_mtac_g16_id868="MTAC-LORA-G16-868" lora_mtac_g16_id915="MTAC-LORA-G16-915" @@ -49,6 +55,8 @@ dual_cards_installed=false gps_path="/dev/gps0" read_lora_hw_info() { + hw_id=$(mts-io-sysfs show product-id 2> /dev/null) + # product-id of first lora card lora_id=$(mts-io-sysfs show lora/product-id 2> /dev/null) lora_eui=$(mts-io-sysfs show lora/eui 2> /dev/null) @@ -69,8 +77,22 @@ read_lora_hw_info() { fi } +setup_mtcdt3() { + dual_cards_installed=true + ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd + ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd_2 + + lora_eui=$(mts-io-sysfs show lora/eui) + lora_2_eui=$(mts-io-sysfs show lora-2/eui) + + lora_2_hw=$lora_hw + lora_2_id=$lora_id +} + hardware_found() { - if [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then + if [[ "$hw_id" =~ "$mtcdt3_id" ]]; then + setup_mtcdt3 + elif [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then setup_mtcdt_2_1 elif [[ "$lora_id" =~ "$lora_mtac_id" ]]; then setup_mtcdt @@ -181,16 +203,30 @@ do_start() { if hardware_found; then echo "Found $lora_id with $lora_hw hardware" - mts-io-sysfs store lora/reset 0 - if [ "$dual_cards_installed" == true ]; then - mts-io-sysfs store lora-2/reset 0 - fi - sleep 0.25 - mts-io-sysfs store lora/reset 1 - if [ "$dual_cards_installed" == true ]; then - mts-io-sysfs store lora-2/reset 1 + + if [[ "$hw_id" =~ "$mtcdt3_id" ]]; then + mts-io-sysfs store lora/reset 0 + mts-io-sysfs store lora-2/reset 0 + sleep 0.25 + mts-io-sysfs store lora/reset 1 + mts-io-sysfs store lora-2/reset 1 + sleep 0.25 + elif [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then + echo Resetting 2.1 LoRa + /usr/sbin/mts-util-lora2-reset -g -f >/dev/null 2>&1 + sleep 0.25 + else + mts-io-sysfs store lora/reset 0 + if [ "$dual_cards_installed" == true ]; then + mts-io-sysfs store lora-2/reset 0 + fi + sleep 0.25 + mts-io-sysfs store lora/reset 1 + if [ "$dual_cards_installed" == true ]; then + mts-io-sysfs store lora-2/reset 1 + fi + sleep 0.25 fi - sleep 0.25 else echo "$0: Lora hardware not detected" # Use MAC Address for lora eui @@ -208,28 +244,33 @@ do_start() { echo -n "Starting $NAME: " # start network server start-stop-daemon --start --background --make-pidfile \ - --pidfile $net_server_pidfile --startas /bin/bash -- -c "exec $angel $net_server \ + --pidfile $net_server_pidfile --startas /bin/bash -- -c "exec $net_server \ -c $conf_file --lora-eui $lora_eui --lora-hw-1 $lora_hw --lora-prod-1 $lora_id $lora_2_args \ --lora-path $run_dir \ --noconsole 2>&1" if [ "$no_lora_hw" != "true" ]; then # start packet forwarder - sleep 4 + if [[ "$hw_id" =~ "$mtcdt3_id" ]]; then + sleep 0.5 + else + sleep 4 + fi /usr/sbin/start-stop-daemon --chdir $run_dir/1 --start --background --make-pidfile \ --pidfile $pkt_fwd_pidfile --startas /bin/bash \ - -- -c "exec $angel $pkt_fwd $pkt_fwd_options 2>&1" + -- -c "exec $pkt_fwd $pkt_fwd_options 2>&1" if [ "$dual_cards_installed" == "true" ]; then /usr/sbin/start-stop-daemon --chdir $run_dir/2 --start --background --make-pidfile \ --pidfile $pkt_fwd_2_pidfile --startas /bin/bash \ - -- -c "exec $angel $pkt_fwd_2 $pkt_fwd_options 2>&1" + -- -c "exec $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log" fi fi - renice -n -20 -p $(pgrep lora-network-se) - renice -n -20 -p $(pgrep $(basename $pkt_fwd)) - + if [[ ! "$hw_id" =~ "$mtcdt3_id" ]]; then + renice -n -20 -p $(pgrep lora-network-se) + renice -n -20 -p $(pgrep $(basename $pkt_fwd)) + fi echo "OK" } @@ -239,6 +280,7 @@ do_stop() { echo -n "Stopping $NAME: " start-stop-daemon --stop --quiet --oknodo --pidfile $net_server_pidfile --retry TERM/60/KILL/5 start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_pidfile --retry 5 + start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_2_pidfile --retry 5 rm -f $net_server_pidfile $pkt_fwd_pidfile echo "OK" } @@ -249,12 +291,12 @@ if [ "$ENABLED" != "yes" ]; then exit fi -force_stop() { - do_stop - rm -fr $LOCK -} - -function try_lock() { +force_stop() { + do_stop + rm -fr $LOCK +} + +function try_lock() { if mkdir $LOCK; then trap "rm -fr $LOCK" EXIT else diff --git a/recipes-connectivity/lora/lora-network-server_2.3.9.bb b/recipes-connectivity/lora/lora-network-server_2.4.0.bb index 7e63635..3b00dc9 100644 --- a/recipes-connectivity/lora/lora-network-server_2.3.9.bb +++ b/recipes-connectivity/lora/lora-network-server_2.4.0.bb @@ -13,8 +13,8 @@ SRC_URI = "http://multitech.net/downloads/lora-network-server_${PV}.tar.gz \ file://lora-network-server.default \ " -SRC_URI[md5sum] = "88110a6a04b7c8ed02ee30102ba31e49" -SRC_URI[sha256sum] = "a2f0305b0eb48d55a53b1dc358bde4618688ccf952c79f5d9d2e2d7474f28042" +SRC_URI[md5sum] = "36c7bf1f457df064253c4491d4887b2a" +SRC_URI[sha256sum] = "437694fef6ee384792250ecfca2a1a66854ab446f806c128cca7e5a6bc96bdf5" # binaries are already stripped, so suppress warning INSANE_SKIP_${PN} = "already-stripped" diff --git a/recipes-connectivity/lora/lora-packet-forwarder-geolocation_5.1.0.bb b/recipes-connectivity/lora/lora-packet-forwarder-geolocation_5.1.0.bb index fa5232a..b42bd31 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder-geolocation_5.1.0.bb +++ b/recipes-connectivity/lora/lora-packet-forwarder-geolocation_5.1.0.bb @@ -41,6 +41,9 @@ do_compile() { } do_install() { +} + +do_install_append_mtcdt() { install -d ${D}${LORA_DIR} install -m 755 mlinux4/pkt_forwarder ${D}${LORA_DIR}/ install -m 755 ${WORKDIR}/global_conf.json.MTAC_LORA_2_1* ${D}${LORA_DIR}/ 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 5821e1e..c514e18 100755 --- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init +++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init @@ -12,11 +12,17 @@ opt_conf_dir=/opt/lora conf_dir=/var/config/lora conf_file=$conf_dir/global_conf.json conf_file_local=$conf_dir/local_conf.json +conf_file_2=$conf_dir/global_conf_2.json +conf_file_local_2=$conf_dir/local_conf_2.json pkt_fwd=$run_dir/1/lora_pkt_fwd pkt_fwd_log=/var/log/lora-pkt-fwd-1.log pkt_fwd_pidfile=$run_dir/lora-pkt-fwd-1.pid +pkt_fwd_2=$run_dir/2/lora_pkt_fwd +pkt_fwd_2_log=/var/log/lora-pkt-fwd-2.log +pkt_fwd_2_pidfile=$run_dir/lora-pkt-fwd-2.pid + port1=/sys/devices/platform/mts-io/ap1 port2=/sys/devices/platform/mts-io/ap2 @@ -30,11 +36,23 @@ lora_mtac_id915="MTAC-LORA-915" lora_mtac_id868="MTAC-LORA-868" lora_mtac_h_id915="MTAC-LORA-H-915" lora_mtac_h_id868="MTAC-LORA-H-868" +mtac_spi_device="/dev/spidev0.0" +mtac_spi_device_2="spidev32765.2" + +# spidev32765.2 spidev32766.2 lora_mtcap_id="MTCAP-LORA" lora_mtcap_id868="MTCAP-LORA-868" lora_mtcap_id915="MTCAP-LORA-915" +mtcdt3_id="MTCDT3" +lora_mtcdt3_id="MTCDT3-LORA" +lora_mtcdt3_id868="MTCDT3-LORA-868" +lora_mtcdt3_id915="MTCDT3-LORA-915" +mtcdt3_spi_device="/dev/spidev0.0" +mtcdt3_spi_device_2="/dev/spidev1.0" + + lora_mtac_g_id="MTAC-LORA-G" lora_mtac_g16_id868="MTAC-LORA-G16-868" lora_mtac_g16_id915="MTAC-LORA-G16-915" @@ -46,14 +64,32 @@ pkt_fwd_options="" gps_path="/dev/gps0" read_lora_hw_info() { + hw_id=$(mts-io-sysfs show product-id 2> /dev/null) + + # product-id of first lora card lora_id=$(mts-io-sysfs show lora/product-id 2> /dev/null) - lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null) lora_eui=$(mts-io-sysfs show lora/eui 2> /dev/null) - lora_eui_raw=${lora_eui//:/} + # remove all colons + lora_eui_raw=${lora_eui//:} + lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null) + if [ -d $port2 ] && [[ $(cat $port2/hw-version) =~ "LORA-1.5" ]]; then + # product-id of first lora card + lora_2_id=$(mts-io-sysfs show lora-2/product-id 2> /dev/null) + lora_2_hw=$(mts-io-sysfs show lora-2/hw-version 2> /dev/null) + lora_2_eui=$(mts-io-sysfs show lora-2/eui 2> /dev/null) + # remove all colons + lora_2_eui_raw=${lora_2_eui//:} + fi + + if [ -d $port1 ] && [[ $(cat $port1/hw-version) =~ "LORA-1.5" ]] && [ -d $port2 ] && [[ $(cat $port2/hw-version) =~ "LORA-1.5" ]]; then + dual_cards_installed=true + fi } hardware_found() { - if [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then + if [[ "$hw_id" =~ "$mtcdt3_id" ]]; then + setup_mtcdt3 + elif [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then setup_mtcdt_2_1 elif [[ "$lora_id" =~ "$lora_mtcap_id" ]]; then setup_mtcap @@ -65,6 +101,45 @@ hardware_found() { return 0 } +setup_mtcdt3() { + dual_cards_installed=true + ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd + ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd_2 + + lora_eui=$(mts-io-sysfs show lora/eui) + lora_2_eui=$(mts-io-sysfs show lora-2/eui) + lora_eui_raw=${lora_eui//:} + lora_2_eui_raw=${lora_2_eui//:} + + lora_id=$(mts-io-sysfs show lora/product-id) + lora_2_id=$(mts-io-sysfs show lora-2/product-id) + + lora_hw=$(mts-io-sysfs show lora/hw-version) + lora_2_hw=$(mts-io-sysfs show lora-2/hw-version) + + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_5.US915 + + if [[ "$lora_id" =~ "868" ]]; then + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_5.EU868 + fi + + ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd + ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd_2 + + opt_conf_file=$opt_conf_dir/global_conf.json + opt_conf_file_local=$opt_conf_dir/local_conf.json + + cp $GLOBAL_CONF $opt_conf_file + + if ! [ -f $conf_file ]; then + mkdir -p /var/config/lora/ + cp $opt_conf_file $conf_file + cp $opt_conf_file_local $conf_file_local + cp $opt_conf_file $conf_file_2 + cp $opt_conf_file_local $conf_file_local_2 + fi +} + setup_mtcdt() { if [ -d $port1 ] && [[ $(cat $port1/hw-version) = $lora_hw ]]; then ln -sf /dev/spidev32766.2 /dev/spidev0.0 @@ -92,6 +167,7 @@ setup_mtcdt() { exit 1 fi ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd + ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd_2 fi opt_conf_file=$opt_conf_dir/global_conf.json @@ -103,6 +179,8 @@ setup_mtcdt() { mkdir -p /var/config/lora/ cp $opt_conf_file $conf_file cp $opt_conf_file_local $conf_file_local + cp $opt_conf_file $conf_file_2 + cp $opt_conf_file_local $conf_file_local_2 fi } @@ -173,10 +251,38 @@ do_start() { mkdir -p $run_dir/1 rm -rf $run_dir/1/* + mkdir -p $run_dir/2 + rm -rf $run_dir/2/* + read_lora_hw_info if hardware_found; then echo "Found $lora_id with $lora_hw hardware. Configuring" + + if [[ "$hw_id" =~ "$mtcdt3_id" ]]; then + mts-io-sysfs store lora/reset 0 + mts-io-sysfs store lora-2/reset 0 + sleep 0.25 + mts-io-sysfs store lora/reset 1 + mts-io-sysfs store lora-2/reset 1 + sleep 0.25 + elif [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then + echo Resetting 2.1 LoRa + /usr/sbin/mts-util-lora2-reset -g -f >/dev/null 2>&1 + sleep 0.25 + else + mts-io-sysfs store lora/reset 0 + if [ "$dual_cards_installed" == true ]; then + mts-io-sysfs store lora-2/reset 0 + fi + sleep 0.25 + mts-io-sysfs store lora/reset 1 + if [ "$dual_cards_installed" == true ]; then + mts-io-sysfs store lora-2/reset 1 + fi + sleep 0.25 + fi + else echo "$0: LORA card not detected" exit 1 @@ -198,15 +304,34 @@ do_start() { sed -i.bak "s/\(.*gateway_ID\"\s*\:\s*\"\)<.*>[^\"]*\(.*\)/\1${lora_eui_raw}\2/g" /var/run/lora/1/global_conf.json + if [ "$dual_cards_installed" == "true" ]; then + cp $conf_file_2 $run_dir/2/global_conf.json + if [ -f $conf_file_local_2 ]; then + cp $conf_file_local_2 $run_dir/2/local_conf.json + sed -i.bak "s/\(.*gateway_ID\"\s*\:\s*\"\)<.*>[^\"]*\(.*\)/\1${lora_2_eui_raw}\2/g" /var/run/lora/2/local_conf.json + fi + + sed -i.bak "s/\(.*gateway_ID\"\s*\:\s*\"\)<.*>[^\"]*\(.*\)/\1${lora_2_eui_raw}\2/g" /var/run/lora/2/global_conf.json + fi + # # start packet forwarder # echo -n "Starting $NAME: " /usr/sbin/start-stop-daemon --chdir $run_dir/1 --background --start --make-pidfile \ - --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "exec $pkt_fwd $pkt_fwd_options" + --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "exec $pkt_fwd $pkt_fwd_options -l $pkt_fwd_log" + - renice -n -20 -p $(pgrep $(basename $pkt_fwd)) + if [ "$dual_cards_installed" == "true" ]; then + /usr/sbin/start-stop-daemon --chdir $run_dir/2 --start --background --make-pidfile \ + --pidfile $pkt_fwd_2_pidfile --startas /bin/bash \ + -- -c "exec $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log" + fi + + if [[ ! "$hw_id" =~ "$mtcdt3_id" ]]; then + renice -n -20 -p $(pgrep $(basename $pkt_fwd)) + fi echo "OK" } @@ -215,6 +340,7 @@ do_start() { do_stop() { echo -n "Stopping $NAME: " start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_pidfile --retry 5 + start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_2_pidfile --retry 5 rm -f $pkt_fwd_pidfile echo "OK" } diff --git a/recipes-connectivity/lora/lora-packet-forwarder/mtcdt3/lora-packet-forwarder.default b/recipes-connectivity/lora/lora-packet-forwarder/mtcdt3/lora-packet-forwarder.default new file mode 100644 index 0000000..0f92640 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/mtcdt3/lora-packet-forwarder.default @@ -0,0 +1,2 @@ +# set to "yes" or "no" to control starting on boot +ENABLED="no" diff --git a/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb b/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb index ce75f25..06302f5 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb +++ b/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb @@ -5,13 +5,14 @@ SECTION = "console/utils" # Semtech license is a modified BSD-style license LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45" -DEPENDS = "lora-gateway logrotate lora-logging" +DEPENDS = "lora-gateway logrotate lora-logging libgps24" RDEPENDS_${PN} += "bash" -PR = "r19" +FILESEXTRAPATHS_append_mtcdt3hs := ":${THISDIR}/lora-packet-forwarder/mtcdt3" +PR = "r23" +SRCREV = "28b9dff2eb06fb88421cf32771d380a178079fce" +PACKAGE_ARCH = "${MACHINE_ARCH}" -SRCREV = "v${PV}" - -SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \ +SRC_URI = "git://git.multitech.net/packet_forwarder_mtac_full;branch=master;protocol=git \ file://README.md \ file://lora-packet-forwarder.init \ file://lora-packet-forwarder.default \ @@ -43,12 +44,6 @@ SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \ file://global_conf.json.MTCAP2-LORA-1.5.RU864 \ file://global_conf.json.MTCAP2-LORA-1.5.US915 \ file://local_conf.json \ - file://lora-packet-forwarder-add-spi-dev-path.patch \ - file://lora-packet-forwarder-remove-jit-power-check.patch \ - file://lora-packet-forwarder-gpsd.patch \ - file://lora-packet-forwarder-beacon-rfu-fix.patch \ - file://lora-packet-forwarder-jit-queue-increase-peek-and-remove-sort-from-dequeue.patch \ - file://lora-packet-forwarder-dedup-rx.patch \ " @@ -121,6 +116,39 @@ do_install_append_mtcap() { install -m 755 ${WORKDIR}/global_conf.json.MTCAP2-LORA-1.5.IN865 ${D}${LORA_DIR}/global_conf.json.MTCAP2_LORA_1_5.IN865 } +do_install_append_mtcdt3() { + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 +} + +do_install_append_mtcdt3hs() { + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AS923-LBT + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.KR920-LBT + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.IN865 +} + + FILES_${PN} += "${LORA_DIR}" FILES_${PN}-dbg += "${LORA_DIR}/.debug ${LORA_DIR}/forwarder-utils/.debug" diff --git a/recipes-connectivity/lora/lora-query_1.0.4.bb b/recipes-connectivity/lora/lora-query_1.0.6.bb index 730266f..60bcc42 100644 --- a/recipes-connectivity/lora/lora-query_1.0.4.bb +++ b/recipes-connectivity/lora/lora-query_1.0.6.bb @@ -3,7 +3,8 @@ HOMEPAGE = "http://www.multitech.net/" LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "jsoncpp libmts" -PR = "r1" +RDEPENDS_${PN} += "jsoncpp" +PR = "r2" SRCREV = "${PV}" |