diff options
author | Jason Reiss <jreiss@multitech.com> | 2017-05-25 14:18:48 -0500 |
---|---|---|
committer | Jason Reiss <jreiss@multitech.com> | 2017-05-25 14:18:48 -0500 |
commit | 92782f6ed4f50ae753534a9c095e09a8f89fa4d3 (patch) | |
tree | 27971772322474889a3403c20e70526bfb7152ec /recipes-connectivity | |
parent | 30945f752514a91c8563238e31d34e7c574b13d2 (diff) | |
download | meta-mlinux-92782f6ed4f50ae753534a9c095e09a8f89fa4d3.tar.gz meta-mlinux-92782f6ed4f50ae753534a9c095e09a8f89fa4d3.tar.bz2 meta-mlinux-92782f6ed4f50ae753534a9c095e09a8f89fa4d3.zip |
lora: network server update to 1.0.34, update global_conf files for 3.1.0 packet forwarder
Diffstat (limited to 'recipes-connectivity')
8 files changed, 233 insertions, 245 deletions
diff --git a/recipes-connectivity/lora/lora-network-server_1.0.32.bb b/recipes-connectivity/lora/lora-network-server_1.0.34.bb index 0ae96f6..3422b57 100644 --- a/recipes-connectivity/lora/lora-network-server_1.0.32.bb +++ b/recipes-connectivity/lora/lora-network-server_1.0.34.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] = "1cf05bddf4f56f190259b9a6569be953" -SRC_URI[sha256sum] = "1be5bcc311b5600aa36a969b057c76c2f16d3819f8abb791558ce697a801099a" +SRC_URI[md5sum] = "efc72db6ea064c6dcb867e83682d84d2" +SRC_URI[sha256sum] = "73f22ff5cadc5565450a2a3d1f2231b002552ecac254717b68b526d3f261986c" # binaries are already stripped, so suppress warning INSANE_SKIP_${PN} = "already-stripped" diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 deleted file mode 100644 index ab3597e..0000000 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 +++ /dev/null @@ -1,192 +0,0 @@ -{ - "SX1301_conf": { - "lorawan_public": true, - "antenna_gain": 0, - "clksrc": 0, - "radio_0": { - "enable": true, - "freq": 902600000, - "rssi_offset": -165, - "tx_enable": true, - "tx_freq_max": 902000000, - "tx_freq_min": 928000000, - "type": "SX1257" - }, - "radio_1": { - "enable": true, - "freq": 903400000, - "rssi_offset": -165, - "tx_enable": false, - "type": "SX1257" - }, - "chan_FSK": { - "enable": false, - "radio": 0 - }, - "chan_Lora_std": { - "bandwidth": 500000, - "enable": true, - "if": 400000, - "radio": 0, - "spread_factor": 8 - }, - "chan_multiSF_0": { - "enable": true, - "if": -300000, - "radio": 0 - }, - "chan_multiSF_1": { - "enable": true, - "if": -100000, - "radio": 0 - }, - "chan_multiSF_2": { - "enable": true, - "if": 100000, - "radio": 0 - }, - "chan_multiSF_3": { - "enable": true, - "if": 300000, - "radio": 0 - }, - "chan_multiSF_4": { - "enable": true, - "if": -300000, - "radio": 1 - }, - "chan_multiSF_5": { - "enable": true, - "if": -100000, - "radio": 1 - }, - "chan_multiSF_6": { - "enable": true, - "if": 100000, - "radio": 1 - }, - "chan_multiSF_7": { - "enable": true, - "if": 300000, - "radio": 1 - }, - "lbt_cfg": { - "enable": false, - "nb_channel": 1, - "rssi_target": 160, - "scan_time_us": 5000, - "start_freq": 869525000, - "tx_delay_1ch_us": 4000000, - "tx_delay_2ch_us": 4000000 - }, - "tx_lut_0": { - "pa_gain": 0, - "mix_gain": 8, - "rf_power": -6, - "dig_gain": 3 - }, - "tx_lut_1": { - "pa_gain": 0, - "mix_gain": 10, - "rf_power": -3, - "dig_gain": 3 - }, - "tx_lut_2": { - "pa_gain": 0, - "mix_gain": 12, - "rf_power": 0, - "dig_gain": 3 - }, - "tx_lut_3": { - "pa_gain": 1, - "mix_gain": 8, - "rf_power": 3, - "dig_gain": 3 - }, - "tx_lut_4": { - "pa_gain": 1, - "mix_gain": 10, - "rf_power": 6, - "dig_gain": 3 - }, - "tx_lut_5": { - "pa_gain": 1, - "mix_gain": 12, - "rf_power": 10, - "dig_gain": 3 - }, - "tx_lut_6": { - "pa_gain": 1, - "mix_gain": 12, - "rf_power": 11, - "dig_gain": 3 - }, - "tx_lut_7": { - "pa_gain": 2, - "mix_gain": 9, - "rf_power": 12, - "dig_gain": 3 - }, - "tx_lut_8": { - "pa_gain": 1, - "mix_gain": 15, - "rf_power": 13, - "dig_gain": 3 - }, - "tx_lut_9": { - "pa_gain": 2, - "mix_gain": 10, - "rf_power": 14, - "dig_gain": 3 - }, - "tx_lut_10": { - "pa_gain": 2, - "mix_gain": 11, - "rf_power": 16, - "dig_gain": 3 - }, - "tx_lut_11": { - "pa_gain": 3, - "mix_gain": 10, - "rf_power": 20, - "dig_gain": 3 - }, - "tx_lut_12": { - "pa_gain": 3, - "mix_gain": 11, - "rf_power": 23, - "dig_gain": 3 - }, - "tx_lut_13": { - "pa_gain": 3, - "mix_gain": 12, - "rf_power": 24, - "dig_gain": 3 - }, - "tx_lut_14": { - "pa_gain": 3, - "mix_gain": 13, - "rf_power": 25, - "dig_gain": 3 - }, - "tx_lut_15": { - "pa_gain": 3, - "mix_gain": 15, - "rf_power": 26, - "dig_gain": 3 - } - }, - "gateway_conf": { - "forward_crc_disabled": false, - "forward_crc_error": false, - "forward_crc_valid": true, - "gateway_ID": "<WILL-BE-REPLACED-WITH-LORA-EUI>", - "keepalive_interval": 12, - "push_timeout_ms": 120, - "serv_port_down": 1780, - "serv_port_up": 1780, - "server_address": "us01-iot.semtech.com", - "stat_interval": 20, - "synch_word": 52 - } -} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTAC_LORA_1_0.EU868.basic.clksrc0 index 5e8bec0..5e8bec0 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTAC_LORA_1_0.EU868.basic.clksrc0 diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTAC_LORA_1_0.US915.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTAC_LORA_1_0.US915.basic.clksrc0 new file mode 100644 index 0000000..e70b8ba --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTAC_LORA_1_0.US915.basic.clksrc0 @@ -0,0 +1,192 @@ +{ + "SX1301_conf": { + "lorawan_public": true, + "antenna_gain": 0, + "clksrc": 0, + "radio_0": { + "enable": true, + "freq": 902700000, + "rssi_offset": -165, + "tx_enable": true, + "tx_freq_max": 928000000, + "tx_freq_min": 902000000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 903500000, + "rssi_offset": -165, + "tx_enable": false, + "type": "SX1257" + }, + "chan_FSK": { + "enable": false, + "radio": 0 + }, + "chan_Lora_std": { + "bandwidth": 500000, + "enable": true, + "if": 300000, + "radio": 0, + "spread_factor": 8 + }, + "chan_multiSF_0": { + "enable": true, + "if": -400000, + "radio": 0 + }, + "chan_multiSF_1": { + "enable": true, + "if": -200000, + "radio": 0 + }, + "chan_multiSF_2": { + "enable": true, + "if": 0, + "radio": 0 + }, + "chan_multiSF_3": { + "enable": true, + "if": 200000, + "radio": 0 + }, + "chan_multiSF_4": { + "enable": true, + "if": -400000, + "radio": 1 + }, + "chan_multiSF_5": { + "enable": true, + "if": -200000, + "radio": 1 + }, + "chan_multiSF_6": { + "enable": true, + "if": 0, + "radio": 1 + }, + "chan_multiSF_7": { + "enable": true, + "if": 200000, + "radio": 1 + }, + "lbt_cfg": { + "enable": false, + "nb_channel": 1, + "rssi_target": 160, + "scan_time_us": 5000, + "start_freq": 869525000, + "tx_delay_1ch_us": 4000000, + "tx_delay_2ch_us": 4000000 + }, + "tx_lut_0": { + "pa_gain": 0, + "mix_gain": 8, + "rf_power": -6, + "dig_gain": 3 + }, + "tx_lut_1": { + "pa_gain": 0, + "mix_gain": 10, + "rf_power": -3, + "dig_gain": 3 + }, + "tx_lut_2": { + "pa_gain": 0, + "mix_gain": 12, + "rf_power": 0, + "dig_gain": 3 + }, + "tx_lut_3": { + "pa_gain": 1, + "mix_gain": 8, + "rf_power": 3, + "dig_gain": 3 + }, + "tx_lut_4": { + "pa_gain": 1, + "mix_gain": 10, + "rf_power": 6, + "dig_gain": 3 + }, + "tx_lut_5": { + "pa_gain": 1, + "mix_gain": 12, + "rf_power": 10, + "dig_gain": 3 + }, + "tx_lut_6": { + "pa_gain": 1, + "mix_gain": 12, + "rf_power": 11, + "dig_gain": 3 + }, + "tx_lut_7": { + "pa_gain": 2, + "mix_gain": 9, + "rf_power": 12, + "dig_gain": 3 + }, + "tx_lut_8": { + "pa_gain": 1, + "mix_gain": 15, + "rf_power": 13, + "dig_gain": 3 + }, + "tx_lut_9": { + "pa_gain": 2, + "mix_gain": 10, + "rf_power": 14, + "dig_gain": 3 + }, + "tx_lut_10": { + "pa_gain": 2, + "mix_gain": 11, + "rf_power": 16, + "dig_gain": 3 + }, + "tx_lut_11": { + "pa_gain": 3, + "mix_gain": 10, + "rf_power": 20, + "dig_gain": 3 + }, + "tx_lut_12": { + "pa_gain": 3, + "mix_gain": 11, + "rf_power": 23, + "dig_gain": 3 + }, + "tx_lut_13": { + "pa_gain": 3, + "mix_gain": 12, + "rf_power": 24, + "dig_gain": 3 + }, + "tx_lut_14": { + "pa_gain": 3, + "mix_gain": 13, + "rf_power": 25, + "dig_gain": 3 + }, + "tx_lut_15": { + "pa_gain": 3, + "mix_gain": 15, + "rf_power": 26, + "dig_gain": 3 + } + }, + "gateway_conf": { + "forward_crc_disabled": false, + "forward_crc_error": false, + "forward_crc_valid": true, + "gateway_ID": "<WILL-BE-REPLACED-WITH-LORA-EUI>", + "keepalive_interval": 12, + "push_timeout_ms": 120, + "serv_port_down": 1780, + "serv_port_up": 1780, + "server_address": "us01-iot.semtech.com", + "stat_interval": 20, + "synch_word": 52 + } +} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTAC_LORA_1_5.EU868.basic.clksrc0 index 4c388a4..4c388a4 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTAC_LORA_1_5.EU868.basic.clksrc0 diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTAC_LORA_1_5.US915.basic.clksrc0 index 2b3f8d2..68033d8 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTAC_LORA_1_5.US915.basic.clksrc0 @@ -5,16 +5,16 @@ "clksrc": 0, "radio_0": { "enable": true, - "freq": 902600000, + "freq": 902700000, "rssi_offset": -165, "tx_enable": true, - "tx_freq_max": 902000000, - "tx_freq_min": 928000000, + "tx_freq_max": 928000000, + "tx_freq_min": 902000000, "type": "SX1257" }, "radio_1": { "enable": true, - "freq": 903400000, + "freq": 903500000, "rssi_offset": -165, "tx_enable": false, "type": "SX1257" @@ -26,48 +26,48 @@ "chan_Lora_std": { "bandwidth": 500000, "enable": true, - "if": 400000, + "if": 300000, "radio": 0, "spread_factor": 8 }, "chan_multiSF_0": { "enable": true, - "if": -300000, + "if": -400000, "radio": 0 }, "chan_multiSF_1": { "enable": true, - "if": -100000, + "if": -200000, "radio": 0 }, "chan_multiSF_2": { "enable": true, - "if": 100000, + "if": 0, "radio": 0 }, "chan_multiSF_3": { "enable": true, - "if": 300000, + "if": 200000, "radio": 0 }, "chan_multiSF_4": { "enable": true, - "if": -300000, + "if": -400000, "radio": 1 }, "chan_multiSF_5": { "enable": true, - "if": -100000, + "if": -200000, "radio": 1 }, "chan_multiSF_6": { "enable": true, - "if": 100000, + "if": 0, "radio": 1 }, "chan_multiSF_7": { "enable": true, - "if": 300000, + "if": 200000, "radio": 1 }, "lbt_cfg": { diff --git a/recipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.init b/recipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.init index 396b291..fa4e1b4 100755 --- a/recipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.init +++ b/recipes-connectivity/lora/lora-packet-forwarder/mtcdt/lora-packet-forwarder.init @@ -9,6 +9,7 @@ ENABLED="yes" run_dir=/var/run/lora conf_dir=/var/config/lora +conf_file=$conf_dir/global_conf.json pkt_fwd=$run_dir/1/lora_pkt_fwd pkt_fwd_log=/var/log/lora-pkt-fwd-1.log @@ -33,38 +34,25 @@ read_card_info() { lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null) } -card_found() { - if [ -d $port1 ] && [[ $(cat $port1/hw-version) = $lora_hw ]]; then - ln -sf /dev/spidev32766.2 /dev/spidev0.0 +card_found() { + if [ -d $port1 ] && [[ $(cat $port1/hw-version) = $lora_hw ]]; then + ln -sf /dev/spidev32766.2 /dev/spidev0.0 elif [ -d $port2 ] && [[ $(cat $port2/hw-version) = $lora_hw ]]; then ln -sf /dev/spidev32765.2 /dev/spidev0.0 - fi - - if [[ "$lora_id" =~ "$lora_mtac_id" ]]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_0 + fi + + if [[ "$lora_id" =~ "$lora_mtac_id" ]]; then if [ "$lora_hw" = "$lora_1_0_hw" ] && [[ ! "$lora_id" =~ .*-SPI ]]; then - ln -sf /opt/lora/basic_pkt_fwd-usb $pkt_fwd - else - if [ "$lora_hw" = "$lora_1_5_h_hw" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_5 - fi + ln -sf /opt/lora/basic_pkt_fwd-usb $pkt_fwd + else ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd - fi - - # ignore error of diff command - set +e - diff $GLOBAL_CONF /opt/lora/global_conf.json 1>/dev/null - if [ $? -ne 0 ]; then - cp $GLOBAL_CONF /opt/lora/global_conf.json - fi - set -e - + fi + return 0 - else - echo MTAC_LORA not detected - return 1 - fi -} + else + return 1 + fi +} do_start() { diff --git a/recipes-connectivity/lora/lora-packet-forwarder_3.1.0.bb b/recipes-connectivity/lora/lora-packet-forwarder_3.1.0.bb index 880daff..bc5d8ec 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder_3.1.0.bb +++ b/recipes-connectivity/lora/lora-packet-forwarder_3.1.0.bb @@ -15,10 +15,10 @@ SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \ file://lora-packet-forwarder.init \ file://lora-packet-forwarder.default \ file://global_conf.json.3.0.0.PCB_E336.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 \ - file://global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 \ + file://global_conf.json.3.1.0.MTAC_LORA_1_0.EU868.basic.clksrc0 \ + file://global_conf.json.3.1.0.MTAC_LORA_1_0.US915.basic.clksrc0 \ + file://global_conf.json.3.1.0.MTAC_LORA_1_5.EU868.basic.clksrc0 \ + file://global_conf.json.3.1.0.MTAC_LORA_1_5.US915.basic.clksrc0 \ file://global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic \ file://global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic \ file://local_conf.json \ @@ -58,13 +58,13 @@ do_install() { } do_install_append_mtcdt() { - 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_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.1.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + install -m 755 ${WORKDIR}/global_conf.json.3.1.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.1.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.1.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.1.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.1.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.1.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 } do_install_append_mtcap() { |