diff options
17 files changed, 2380 insertions, 362 deletions
diff --git a/recipes-connectivity/bluez5/bluez5.inc b/recipes-connectivity/bluez5/bluez5.inc index d178544..63cb92f 100644 --- a/recipes-connectivity/bluez5/bluez5.inc +++ b/recipes-connectivity/bluez5/bluez5.inc @@ -57,7 +57,7 @@ OLD_SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ " # Use GIT for blueZ source -SRC_URI = "git://git@gitlab.multitech.net/mlinux/bluez.git;protocol=ssh \ +SRC_URI = "git://git.kernel.org/pub/scm/bluetooth/bluez.git;branch=master;protocol=https \ file://init \ file://run-ptest \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \ diff --git a/recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-11.bb b/recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-16.bb index 4e48df3..4e48df3 100644 --- a/recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-11.bb +++ b/recipes-connectivity/lora/lora-basic-station-sx1303_2.0.6-16.bb diff --git a/recipes-connectivity/lora/lora-basic-station_2.0.6-11.bb b/recipes-connectivity/lora/lora-basic-station_2.0.6-16.bb index 7568330..7568330 100644 --- a/recipes-connectivity/lora/lora-basic-station_2.0.6-11.bb +++ b/recipes-connectivity/lora/lora-basic-station_2.0.6-16.bb diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.AS923 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.AS923 new file mode 100644 index 0000000..482bb1a --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.AS923 @@ -0,0 +1,261 @@ +{ + "SX130x_conf" : + { + "antenna_gain" : 3, + "chan_FSK" : + { + "bandwidth" : 125000, + "datarate" : 50000, + "enable" : true, + "freq_deviation" : 25000, + "if" : -200000, + "radio" : 0 + }, + "chan_Lora_std" : + { + "bandwidth" : 250000, + "enable" : true, + "if" : 0, + "implicit_coderate" : 1, + "implicit_crc_en" : false, + "implicit_hdr" : false, + "implicit_payload_length" : 17, + "radio" : 0, + "spread_factor" : 7 + }, + "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" : -400000, + "radio" : 1 + }, + "chan_multiSF_4" : + { + "enable" : true, + "if" : -200000, + "radio" : 1 + }, + "chan_multiSF_5" : + { + "enable" : true, + "if" : 0, + "radio" : 1 + }, + "chan_multiSF_6" : + { + "enable" : true, + "if" : 200000, + "radio" : 1 + }, + "chan_multiSF_7" : + { + "enable" : true, + "if" : 400000, + "radio" : 1 + }, + "chan_multiSF_All" : + { + "spreading_factor_enable" : + [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ] + }, + "clksrc" : 0, + "com_type" : "SPI", + "fine_timestamp" : + { + "enable" : false, + "mode" : "all_sf" + }, + "full_duplex" : false, + "lorawan_public" : true, + "radio_0" : + { + "enable" : true, + "freq" : 923600000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : true, + "tx_freq_max" : 928000000, + "tx_freq_min" : 915000000, + "tx_gain_lut" : + [ + { + "pa_gain" : 0, + "pwr_idx" : 14, + "rf_power" : 11 + }, + { + "pa_gain" : 0, + "pwr_idx" : 15, + "rf_power" : 12 + }, + { + "pa_gain" : 0, + "pwr_idx" : 16, + "rf_power" : 13 + }, + { + "pa_gain" : 0, + "pwr_idx" : 17, + "rf_power" : 15 + }, + { + "pa_gain" : 1, + "pwr_idx" : 0, + "rf_power" : 16 + }, + { + "pa_gain" : 1, + "pwr_idx" : 1, + "rf_power" : 17 + }, + { + "pa_gain" : 1, + "pwr_idx" : 2, + "rf_power" : 18 + }, + { + "pa_gain" : 1, + "pwr_idx" : 3, + "rf_power" : 19 + }, + { + "pa_gain" : 1, + "pwr_idx" : 4, + "rf_power" : 20 + }, + { + "pa_gain" : 1, + "pwr_idx" : 5, + "rf_power" : 21 + }, + { + "pa_gain" : 1, + "pwr_idx" : 6, + "rf_power" : 22 + }, + { + "pa_gain" : 1, + "pwr_idx" : 7, + "rf_power" : 23 + }, + { + "pa_gain" : 1, + "pwr_idx" : 8, + "rf_power" : 24 + }, + { + "pa_gain" : 1, + "pwr_idx" : 10, + "rf_power" : 25 + }, + { + "pa_gain" : 1, + "pwr_idx" : 12, + "rf_power" : 26 + }, + { + "pa_gain" : 1, + "pwr_idx" : 15, + "rf_power" : 27 + } + ], + "type" : "SX1250" + }, + "radio_1" : + { + "enable" : true, + "freq" : 922600000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : false, + "type" : "SX1250" + }, + "sx1261_conf" : + { + "lbt" : + { + "channels" : [], + "enable" : false, + "rssi_target" : -80 + }, + "rssi_offset" : 30, + "spectral_scan" : + { + "enable" : false, + "freq_start" : 903900000, + "nb_chan" : 8, + "nb_scan" : 2000, + "pace_s" : 10 + } + } + }, + "gateway_conf" : + { + "autoquit_threshold" : 0, + "beacon_bw_hz" : 125000, + "beacon_datarate" : 9, + "beacon_freq_hz" : 869525000, + "beacon_infodesc" : 0, + "beacon_period" : 0, + "beacon_power" : 14, + "duty_cycle_enabled" : false, + "forward_crc_disabled" : false, + "forward_crc_error" : false, + "forward_crc_valid" : true, + "gateway_ID" : "aa555a0000000000", + "gps" : true, + "gps_tty_path" : "/dev/gpspipe", + "keepalive_interval" : 10, + "max_tx_power" : 16, + "push_timeout_ms" : 100, + "ref_altitude" : 0, + "ref_latitude" : 0.0, + "ref_longitude" : 0.0, + "serv_port_down" : 1782, + "serv_port_up" : 1780, + "server_address" : "127.0.0.1", + "stat_interval" : 30, + "synch_word" : 52 + } +}
\ No newline at end of file diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.AS923-LBT b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.AS923-LBT new file mode 100644 index 0000000..2659f47 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.AS923-LBT @@ -0,0 +1,311 @@ +{ + "SX130x_conf" : + { + "antenna_gain" : 3, + "chan_FSK" : + { + "bandwidth" : 125000, + "datarate" : 50000, + "enable" : true, + "freq_deviation" : 25000, + "if" : -200000, + "radio" : 0 + }, + "chan_Lora_std" : + { + "bandwidth" : 250000, + "enable" : true, + "if" : 0, + "implicit_coderate" : 1, + "implicit_crc_en" : false, + "implicit_hdr" : false, + "implicit_payload_length" : 17, + "radio" : 0, + "spread_factor" : 7 + }, + "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" : -400000, + "radio" : 1 + }, + "chan_multiSF_4" : + { + "enable" : true, + "if" : -200000, + "radio" : 1 + }, + "chan_multiSF_5" : + { + "enable" : true, + "if" : 0, + "radio" : 1 + }, + "chan_multiSF_6" : + { + "enable" : true, + "if" : 200000, + "radio" : 1 + }, + "chan_multiSF_7" : + { + "enable" : true, + "if" : 400000, + "radio" : 1 + }, + "chan_multiSF_All" : + { + "spreading_factor_enable" : + [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ] + }, + "clksrc" : 0, + "com_type" : "SPI", + "fine_timestamp" : + { + "enable" : false, + "mode" : "all_sf" + }, + "full_duplex" : false, + "lorawan_public" : true, + "radio_0" : + { + "enable" : true, + "freq" : 923600000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : true, + "tx_freq_max" : 928000000, + "tx_freq_min" : 915000000, + "tx_gain_lut" : + [ + { + "pa_gain" : 0, + "pwr_idx" : 14, + "rf_power" : 11 + }, + { + "pa_gain" : 0, + "pwr_idx" : 15, + "rf_power" : 12 + }, + { + "pa_gain" : 0, + "pwr_idx" : 16, + "rf_power" : 13 + }, + { + "pa_gain" : 0, + "pwr_idx" : 17, + "rf_power" : 15 + }, + { + "pa_gain" : 1, + "pwr_idx" : 0, + "rf_power" : 16 + }, + { + "pa_gain" : 1, + "pwr_idx" : 1, + "rf_power" : 17 + }, + { + "pa_gain" : 1, + "pwr_idx" : 2, + "rf_power" : 18 + }, + { + "pa_gain" : 1, + "pwr_idx" : 3, + "rf_power" : 19 + }, + { + "pa_gain" : 1, + "pwr_idx" : 4, + "rf_power" : 20 + }, + { + "pa_gain" : 1, + "pwr_idx" : 5, + "rf_power" : 21 + }, + { + "pa_gain" : 1, + "pwr_idx" : 6, + "rf_power" : 22 + }, + { + "pa_gain" : 1, + "pwr_idx" : 7, + "rf_power" : 23 + }, + { + "pa_gain" : 1, + "pwr_idx" : 8, + "rf_power" : 24 + }, + { + "pa_gain" : 1, + "pwr_idx" : 10, + "rf_power" : 25 + }, + { + "pa_gain" : 1, + "pwr_idx" : 12, + "rf_power" : 26 + }, + { + "pa_gain" : 1, + "pwr_idx" : 15, + "rf_power" : 27 + } + ], + "type" : "SX1250" + }, + "radio_1" : + { + "enable" : true, + "freq" : 922600000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : false, + "type" : "SX1250" + }, + "sx1261_conf" : + { + "lbt" : + { + "channels" : + [ + { + "bandwidth" : 125000, + "freq_hz" : 923200000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 923400000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 923600000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 922200000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 922400000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 922600000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 922800000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 923000000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + } + ], + "enable" : true, + "rssi_target" : -80 + }, + "rssi_offset" : 30, + "spectral_scan" : + { + "enable" : false, + "freq_start" : 903900000, + "nb_chan" : 8, + "nb_scan" : 2000, + "pace_s" : 10 + } + } + }, + "gateway_conf" : + { + "autoquit_threshold" : 0, + "beacon_bw_hz" : 125000, + "beacon_datarate" : 9, + "beacon_freq_hz" : 869525000, + "beacon_infodesc" : 0, + "beacon_period" : 0, + "beacon_power" : 14, + "duty_cycle_enabled" : false, + "forward_crc_disabled" : false, + "forward_crc_error" : false, + "forward_crc_valid" : true, + "gateway_ID" : "aa555a0000000000", + "gps" : true, + "gps_tty_path" : "/dev/gpspipe", + "keepalive_interval" : 10, + "max_tx_power" : 16, + "push_timeout_ms" : 100, + "ref_altitude" : 0, + "ref_latitude" : 0.0, + "ref_longitude" : 0.0, + "serv_port_down" : 1782, + "serv_port_up" : 1780, + "server_address" : "127.0.0.1", + "stat_interval" : 30, + "synch_word" : 52 + } +}
\ No newline at end of file diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.AU915 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.AU915 new file mode 100644 index 0000000..784feb7 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.AU915 @@ -0,0 +1,259 @@ +{ + "SX130x_conf" : + { + "antenna_gain" : 3, + "chan_FSK" : + { + "bandwidth" : 125000, + "datarate" : 50000, + "enable" : false, + "if" : 0, + "radio" : 0 + }, + "chan_Lora_std" : + { + "bandwidth" : 500000, + "enable" : true, + "if" : 300000, + "implicit_coderate" : 1, + "implicit_crc_en" : false, + "implicit_hdr" : false, + "implicit_payload_length" : 17, + "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 + }, + "chan_multiSF_All" : + { + "spreading_factor_enable" : + [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ] + }, + "clksrc" : 0, + "com_type" : "SPI", + "fine_timestamp" : + { + "enable" : false, + "mode" : "all_sf" + }, + "full_duplex" : false, + "lorawan_public" : true, + "radio_0" : + { + "enable" : true, + "freq" : 917200000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : true, + "tx_freq_max" : 928000000, + "tx_freq_min" : 915000000, + "tx_gain_lut" : + [ + { + "pa_gain" : 0, + "pwr_idx" : 14, + "rf_power" : 11 + }, + { + "pa_gain" : 0, + "pwr_idx" : 15, + "rf_power" : 12 + }, + { + "pa_gain" : 0, + "pwr_idx" : 16, + "rf_power" : 13 + }, + { + "pa_gain" : 0, + "pwr_idx" : 17, + "rf_power" : 15 + }, + { + "pa_gain" : 1, + "pwr_idx" : 0, + "rf_power" : 16 + }, + { + "pa_gain" : 1, + "pwr_idx" : 1, + "rf_power" : 17 + }, + { + "pa_gain" : 1, + "pwr_idx" : 2, + "rf_power" : 18 + }, + { + "pa_gain" : 1, + "pwr_idx" : 3, + "rf_power" : 19 + }, + { + "pa_gain" : 1, + "pwr_idx" : 4, + "rf_power" : 20 + }, + { + "pa_gain" : 1, + "pwr_idx" : 5, + "rf_power" : 21 + }, + { + "pa_gain" : 1, + "pwr_idx" : 6, + "rf_power" : 22 + }, + { + "pa_gain" : 1, + "pwr_idx" : 7, + "rf_power" : 23 + }, + { + "pa_gain" : 1, + "pwr_idx" : 8, + "rf_power" : 24 + }, + { + "pa_gain" : 1, + "pwr_idx" : 10, + "rf_power" : 25 + }, + { + "pa_gain" : 1, + "pwr_idx" : 12, + "rf_power" : 26 + }, + { + "pa_gain" : 1, + "pwr_idx" : 15, + "rf_power" : 27 + } + ], + "type" : "SX1250" + }, + "radio_1" : + { + "enable" : true, + "freq" : 918000000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : false, + "type" : "SX1250" + }, + "sx1261_conf" : + { + "lbt" : + { + "channels" : [], + "enable" : false, + "rssi_target" : -80 + }, + "rssi_offset" : 30, + "spectral_scan" : + { + "enable" : false, + "freq_start" : 903900000, + "nb_chan" : 8, + "nb_scan" : 2000, + "pace_s" : 10 + } + } + }, + "gateway_conf" : + { + "autoquit_threshold" : 60, + "beacon_bw_hz" : 125000, + "beacon_datarate" : 9, + "beacon_freq_hz" : 869525000, + "beacon_infodesc" : 0, + "beacon_period" : 0, + "beacon_power" : 14, + "duty_cycle_enabled" : false, + "forward_crc_valid": true, + "forward_crc_error": false, + "forward_crc_disabled": false, + "gateway_ID" : "AA555A0000000000", + "gps" : true, + "gps_tty_path" : "/dev/gpspipe", + "keepalive_interval" : 10, + "push_timeout_ms" : 100, + "ref_altitude" : 0, + "ref_latitude" : 0.0, + "ref_longitude" : 0.0, + "serv_port_down" : 1782, + "serv_port_up" : 1780, + "server_address" : "127.0.0.1", + "stat_interval" : 20, + "synch_word" : 52 + } +}
\ No newline at end of file diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 index 593813b..3ccef94 100644 --- a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 @@ -1,120 +1,261 @@ { - "SX130x_conf": { - "com_type": "SPI", - "com_path": "/dev/spidev0.0", - "tmp102": 72, - "lorawan_public": true, - "clksrc": 0, - "antenna_gain": 0, /* antenna gain, in dBi */ - "full_duplex": false, - "fine_timestamp": { - "enable": false, - "mode": "all_sf" /* high_capacity or all_sf */ - }, - "sx1261_conf": { - "spi_path": "/dev/spidev0.1", - "rssi_offset": 0, /* dB */ - "spectral_scan": { - "enable": false, - "freq_start": 867100000, - "nb_chan": 8, - "nb_scan": 2000, - "pace_s": 10 - }, - "lbt": { - "enable": false, - "rssi_target": -70, /* dBm */ - "channels":[ /* 16 channels maximum */ - { "freq_hz": 867100000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, - { "freq_hz": 867300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, - { "freq_hz": 867500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, - { "freq_hz": 867700000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, - { "freq_hz": 867900000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, - { "freq_hz": 868100000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, - { "freq_hz": 868300000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, - { "freq_hz": 868500000, "bandwidth": 125000, "scan_time_us": 128, "transmit_time_ms": 400 }, - { "freq_hz": 869525000, "bandwidth": 125000, "scan_time_us": 5000, "transmit_time_ms": 4000 }, - { "freq_hz": 868300000, "bandwidth": 250000, "scan_time_us": 128, "transmit_time_ms": 400 } - ] - } - }, - "radio_0": { - "enable": true, - "type": "SX1250", - "freq": 867500000, - "rssi_offset": -215.4, - "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, - "tx_enable": true, - "tx_freq_min": 863000000, - "tx_freq_max": 870000000, - "tx_gain_lut":[ - {"rf_power": 12, "pa_gain": 0, "pwr_idx": 15}, - {"rf_power": 13, "pa_gain": 0, "pwr_idx": 16}, - {"rf_power": 14, "pa_gain": 0, "pwr_idx": 17}, - {"rf_power": 15, "pa_gain": 0, "pwr_idx": 19}, - {"rf_power": 16, "pa_gain": 0, "pwr_idx": 20}, - {"rf_power": 17, "pa_gain": 0, "pwr_idx": 22}, - {"rf_power": 18, "pa_gain": 1, "pwr_idx": 1}, - {"rf_power": 19, "pa_gain": 1, "pwr_idx": 2}, - {"rf_power": 20, "pa_gain": 1, "pwr_idx": 3}, - {"rf_power": 21, "pa_gain": 1, "pwr_idx": 4}, - {"rf_power": 22, "pa_gain": 1, "pwr_idx": 5}, - {"rf_power": 23, "pa_gain": 1, "pwr_idx": 6}, - {"rf_power": 24, "pa_gain": 1, "pwr_idx": 7}, - {"rf_power": 25, "pa_gain": 1, "pwr_idx": 9}, - {"rf_power": 26, "pa_gain": 1, "pwr_idx": 11}, - {"rf_power": 27, "pa_gain": 1, "pwr_idx": 14} - ] - }, - "radio_1": { - "enable": true, - "type": "SX1250", - "freq": 868500000, - "rssi_offset": -215.4, - "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, - "tx_enable": false - }, - "chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]}, - "chan_multiSF_0": {"enable": true, "radio": 1, "if": -400000}, - "chan_multiSF_1": {"enable": true, "radio": 1, "if": -200000}, - "chan_multiSF_2": {"enable": true, "radio": 1, "if": 0}, - "chan_multiSF_3": {"enable": true, "radio": 0, "if": -400000}, - "chan_multiSF_4": {"enable": true, "radio": 0, "if": -200000}, - "chan_multiSF_5": {"enable": true, "radio": 0, "if": 0}, - "chan_multiSF_6": {"enable": true, "radio": 0, "if": 200000}, - "chan_multiSF_7": {"enable": true, "radio": 0, "if": 400000}, - "chan_Lora_std": {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7, - "implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1}, - "chan_FSK": {"enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000} - }, - - "gateway_conf": { - "gateway_ID": "AA555A0000000000", - /* change with default server address/ports */ - "server_address": "localhost", - "serv_port_up": 1730, - "serv_port_down": 1730, - /* adjust the following parameters for your network */ - "keepalive_interval": 10, - "stat_interval": 30, - "push_timeout_ms": 100, - /* forward only valid packets */ - "forward_crc_valid": true, - "forward_crc_error": false, - "forward_crc_disabled": false, - /* GPS configuration */ - "gps" : true, - "gps_tty_path": "/dev/gps0", - /* GPS reference coordinates */ - "ref_latitude": 0.0, - "ref_longitude": 0.0, - "ref_altitude": 0, - /* Beaconing parameters */ - "beacon_period": 0, - "beacon_freq_hz": 869525000, - "beacon_datarate": 9, - "beacon_bw_hz": 125000, - "beacon_power": 14, - "beacon_infodesc": 0 - } -} + "SX130x_conf" : + { + "antenna_gain" : 3, + "chan_FSK" : + { + "bandwidth" : 125000, + "datarate" : 50000, + "enable" : false, + "freq_deviation" : 25000, + "if" : 300000, + "radio" : 0 + }, + "chan_Lora_std" : + { + "bandwidth" : 250000, + "enable" : true, + "if" : -200000, + "implicit_coderate" : 1, + "implicit_crc_en" : false, + "implicit_hdr" : false, + "implicit_payload_length" : 17, + "radio" : 0, + "spread_factor" : 7 + }, + "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" : -400000, + "radio" : 1 + }, + "chan_multiSF_4" : + { + "enable" : true, + "if" : -200000, + "radio" : 1 + }, + "chan_multiSF_5" : + { + "enable" : true, + "if" : 0, + "radio" : 1 + }, + "chan_multiSF_6" : + { + "enable" : true, + "if" : 200000, + "radio" : 1 + }, + "chan_multiSF_7" : + { + "enable" : true, + "if" : 400000, + "radio" : 1 + }, + "chan_multiSF_All" : + { + "spreading_factor_enable" : + [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ] + }, + "clksrc" : 0, + "com_type" : "SPI", + "fine_timestamp" : + { + "enable" : false, + "mode" : "all_sf" + }, + "full_duplex" : false, + "lorawan_public" : true, + "radio_0" : + { + "enable" : true, + "freq" : 868500000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : true, + "tx_freq_max" : 870000000, + "tx_freq_min" : 863000000, + "tx_gain_lut" : + [ + { + "pa_gain" : 0, + "pwr_idx" : 14, + "rf_power" : 11 + }, + { + "pa_gain" : 0, + "pwr_idx" : 15, + "rf_power" : 12 + }, + { + "pa_gain" : 0, + "pwr_idx" : 16, + "rf_power" : 13 + }, + { + "pa_gain" : 0, + "pwr_idx" : 17, + "rf_power" : 15 + }, + { + "pa_gain" : 1, + "pwr_idx" : 0, + "rf_power" : 16 + }, + { + "pa_gain" : 1, + "pwr_idx" : 1, + "rf_power" : 17 + }, + { + "pa_gain" : 1, + "pwr_idx" : 2, + "rf_power" : 18 + }, + { + "pa_gain" : 1, + "pwr_idx" : 3, + "rf_power" : 19 + }, + { + "pa_gain" : 1, + "pwr_idx" : 4, + "rf_power" : 20 + }, + { + "pa_gain" : 1, + "pwr_idx" : 5, + "rf_power" : 21 + }, + { + "pa_gain" : 1, + "pwr_idx" : 6, + "rf_power" : 22 + }, + { + "pa_gain" : 1, + "pwr_idx" : 7, + "rf_power" : 23 + }, + { + "pa_gain" : 1, + "pwr_idx" : 8, + "rf_power" : 24 + }, + { + "pa_gain" : 1, + "pwr_idx" : 10, + "rf_power" : 25 + }, + { + "pa_gain" : 1, + "pwr_idx" : 12, + "rf_power" : 26 + }, + { + "pa_gain" : 1, + "pwr_idx" : 15, + "rf_power" : 27 + } + ], + "tx_notch_freq" : 129000, + "type" : "SX1250" + }, + "radio_1" : + { + "enable" : true, + "freq" : 867500000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : false, + "type" : "SX1250" + }, + "sx1261_conf" : + { + "lbt" : + { + "channels" : [], + "enable" : false, + "rssi_target" : -80 + }, + "rssi_offset" : 30, + "spectral_scan" : + { + "enable" : false, + "freq_start" : 903900000, + "nb_chan" : 8, + "nb_scan" : 2000, + "pace_s" : 10 + } + } + }, + "gateway_conf" : + { + "autoquit_threshold" : 0, + "beacon_bw_hz" : 125000, + "beacon_datarate" : 9, + "beacon_freq_hz" : 869525000, + "beacon_infodesc" : 0, + "beacon_period" : 0, + "beacon_power" : 14, + "duty_cycle_enabled" : false, + "forward_crc_disabled" : false, + "forward_crc_error" : false, + "forward_crc_valid" : true, + "gateway_ID" : "aa555a0000000000", + "gps" : true, + "gps_tty_path" : "/dev/gpspipe", + "keepalive_interval" : 10, + "push_timeout_ms" : 100, + "ref_altitude" : 0, + "ref_latitude" : 0.0, + "ref_longitude" : 0.0, + "serv_port_down" : 1782, + "serv_port_up" : 1780, + "server_address" : "127.0.0.1", + "stat_interval" : 30, + "synch_word" : 52 + } +}
\ No newline at end of file diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.IN865 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.IN865 new file mode 100644 index 0000000..de72baa --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.IN865 @@ -0,0 +1,261 @@ +{ + "SX130x_conf" : + { + "antenna_gain" : 3, + "chan_FSK" : + { + "bandwidth" : 125000, + "datarate" : 50000, + "enable" : true, + "freq_deviation" : 25000, + "if" : 0, + "radio" : 0 + }, + "chan_Lora_std" : + { + "bandwidth" : 250000, + "enable" : false, + "if" : 300000, + "implicit_coderate" : 1, + "implicit_crc_en" : false, + "implicit_hdr" : false, + "implicit_payload_length" : 17, + "radio" : 0, + "spread_factor" : 7 + }, + "chan_multiSF_0" : + { + "enable" : true, + "if" : -137500, + "radio" : 0 + }, + "chan_multiSF_1" : + { + "enable" : true, + "if" : 202500, + "radio" : 0 + }, + "chan_multiSF_2" : + { + "enable" : true, + "if" : 32500, + "radio" : 0 + }, + "chan_multiSF_3" : + { + "enable" : true, + "if" : -400000, + "radio" : 1 + }, + "chan_multiSF_4" : + { + "enable" : true, + "if" : -200000, + "radio" : 1 + }, + "chan_multiSF_5" : + { + "enable" : true, + "if" : 0, + "radio" : 1 + }, + "chan_multiSF_6" : + { + "enable" : true, + "if" : 200000, + "radio" : 1 + }, + "chan_multiSF_7" : + { + "enable" : true, + "if" : 400000, + "radio" : 1 + }, + "chan_multiSF_All" : + { + "spreading_factor_enable" : + [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ] + }, + "clksrc" : 0, + "com_type" : "SPI", + "fine_timestamp" : + { + "enable" : false, + "mode" : "all_sf" + }, + "full_duplex" : false, + "lorawan_public" : true, + "radio_0" : + { + "enable" : true, + "freq" : 865200000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : true, + "tx_freq_max" : 867000000, + "tx_freq_min" : 865000000, + "tx_gain_lut" : + [ + { + "pa_gain" : 0, + "pwr_idx" : 14, + "rf_power" : 11 + }, + { + "pa_gain" : 0, + "pwr_idx" : 15, + "rf_power" : 12 + }, + { + "pa_gain" : 0, + "pwr_idx" : 16, + "rf_power" : 13 + }, + { + "pa_gain" : 0, + "pwr_idx" : 17, + "rf_power" : 15 + }, + { + "pa_gain" : 1, + "pwr_idx" : 0, + "rf_power" : 16 + }, + { + "pa_gain" : 1, + "pwr_idx" : 1, + "rf_power" : 17 + }, + { + "pa_gain" : 1, + "pwr_idx" : 2, + "rf_power" : 18 + }, + { + "pa_gain" : 1, + "pwr_idx" : 3, + "rf_power" : 19 + }, + { + "pa_gain" : 1, + "pwr_idx" : 4, + "rf_power" : 20 + }, + { + "pa_gain" : 1, + "pwr_idx" : 5, + "rf_power" : 21 + }, + { + "pa_gain" : 1, + "pwr_idx" : 6, + "rf_power" : 22 + }, + { + "pa_gain" : 1, + "pwr_idx" : 7, + "rf_power" : 23 + }, + { + "pa_gain" : 1, + "pwr_idx" : 8, + "rf_power" : 24 + }, + { + "pa_gain" : 1, + "pwr_idx" : 10, + "rf_power" : 25 + }, + { + "pa_gain" : 1, + "pwr_idx" : 12, + "rf_power" : 26 + }, + { + "pa_gain" : 1, + "pwr_idx" : 15, + "rf_power" : 27 + } + ], + "tx_notch_freq" : 129000, + "type" : "SX1250" + }, + "radio_1" : + { + "enable" : true, + "freq" : 866385000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : false, + "type" : "SX1250" + }, + "sx1261_conf" : + { + "lbt" : + { + "channels" : [], + "enable" : false, + "rssi_target" : -80 + }, + "rssi_offset" : 30, + "spectral_scan" : + { + "enable" : false, + "freq_start" : 903900000, + "nb_chan" : 8, + "nb_scan" : 2000, + "pace_s" : 10 + } + } + }, + "gateway_conf" : + { + "autoquit_threshold" : 0, + "beacon_bw_hz" : 125000, + "beacon_datarate" : 9, + "beacon_freq_hz" : 869525000, + "beacon_infodesc" : 0, + "beacon_period" : 0, + "beacon_power" : 14, + "duty_cycle_enabled" : false, + "forward_crc_disabled" : false, + "forward_crc_error" : false, + "forward_crc_valid" : true, + "gateway_ID" : "aa555a0000000000", + "gps" : true, + "gps_tty_path" : "/dev/gpspipe", + "keepalive_interval" : 10, + "push_timeout_ms" : 100, + "ref_altitude" : 0, + "ref_latitude" : 0.0, + "ref_longitude" : 0.0, + "serv_port_down" : 1782, + "serv_port_up" : 1780, + "server_address" : "127.0.0.1", + "stat_interval" : 30, + "synch_word" : 52 + } +}
\ No newline at end of file diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.KR920-LBT b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.KR920-LBT new file mode 100644 index 0000000..105215a --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.KR920-LBT @@ -0,0 +1,310 @@ +{ + "SX130x_conf" : + { + "antenna_gain" : 3, + "chan_FSK" : + { + "bandwidth" : 125000, + "datarate" : 50000, + "enable" : false, + "if" : 0, + "radio" : 0 + }, + "chan_Lora_std" : + { + "bandwidth" : 500000, + "enable" : false, + "if" : 300000, + "implicit_coderate" : 1, + "implicit_crc_en" : false, + "implicit_hdr" : false, + "implicit_payload_length" : 17, + "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" : -400000, + "radio" : 1 + }, + "chan_multiSF_4" : + { + "enable" : true, + "if" : -200000, + "radio" : 1 + }, + "chan_multiSF_5" : + { + "enable" : true, + "if" : 0, + "radio" : 1 + }, + "chan_multiSF_6" : + { + "enable" : true, + "if" : 200000, + "radio" : 1 + }, + "chan_multiSF_7" : + { + "enable" : true, + "if" : 400000, + "radio" : 1 + }, + "chan_multiSF_All" : + { + "spreading_factor_enable" : + [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ] + }, + "clksrc" : 0, + "com_type" : "SPI", + "fine_timestamp" : + { + "enable" : false, + "mode" : "all_sf" + }, + "full_duplex" : false, + "lorawan_public" : true, + "radio_0" : + { + "enable" : true, + "freq" : 922500000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : true, + "tx_freq_max" : 923300000, + "tx_freq_min" : 920900000, + "tx_gain_lut" : + [ + { + "pa_gain" : 0, + "pwr_idx" : 14, + "rf_power" : 11 + }, + { + "pa_gain" : 0, + "pwr_idx" : 15, + "rf_power" : 12 + }, + { + "pa_gain" : 0, + "pwr_idx" : 16, + "rf_power" : 13 + }, + { + "pa_gain" : 0, + "pwr_idx" : 17, + "rf_power" : 15 + }, + { + "pa_gain" : 1, + "pwr_idx" : 0, + "rf_power" : 16 + }, + { + "pa_gain" : 1, + "pwr_idx" : 1, + "rf_power" : 17 + }, + { + "pa_gain" : 1, + "pwr_idx" : 2, + "rf_power" : 18 + }, + { + "pa_gain" : 1, + "pwr_idx" : 3, + "rf_power" : 19 + }, + { + "pa_gain" : 1, + "pwr_idx" : 4, + "rf_power" : 20 + }, + { + "pa_gain" : 1, + "pwr_idx" : 5, + "rf_power" : 21 + }, + { + "pa_gain" : 1, + "pwr_idx" : 6, + "rf_power" : 22 + }, + { + "pa_gain" : 1, + "pwr_idx" : 7, + "rf_power" : 23 + }, + { + "pa_gain" : 1, + "pwr_idx" : 8, + "rf_power" : 24 + }, + { + "pa_gain" : 1, + "pwr_idx" : 10, + "rf_power" : 25 + }, + { + "pa_gain" : 1, + "pwr_idx" : 12, + "rf_power" : 26 + }, + { + "pa_gain" : 1, + "pwr_idx" : 15, + "rf_power" : 27 + } + ], + "type" : "SX1250" + }, + "radio_1" : + { + "enable" : true, + "freq" : 922900000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : false, + "type" : "SX1250" + }, + "sx1261_conf" : + { + "lbt" : + { + "channels" : + [ + { + "bandwidth" : 125000, + "freq_hz" : 922100000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 922300000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 922500000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 922700000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 922900000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 923100000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 923300000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + }, + { + "bandwidth" : 125000, + "freq_hz" : 921900000, + "scan_time_us" : 5000, + "transmit_time_ms" : 4000 + } + ], + "enable" : true, + "rssi_target" : -80 + }, + "rssi_offset" : 30, + "spectral_scan" : + { + "enable" : false, + "freq_start" : 903900000, + "nb_chan" : 8, + "nb_scan" : 2000, + "pace_s" : 10 + } + } + }, + "gateway_conf" : + { + "autoquit_threshold" : 0, + "beacon_bw_hz" : 125000, + "beacon_datarate" : 9, + "beacon_freq_hz" : 869525000, + "beacon_infodesc" : 0, + "beacon_period" : 0, + "beacon_power" : 14, + "duty_cycle_enabled" : false, + "forward_crc_disabled" : false, + "forward_crc_error" : false, + "forward_crc_valid" : true, + "gateway_ID" : "aa555a0000000000", + "gps" : true, + "gps_tty_path" : "/dev/gpspipe", + "keepalive_interval" : 10, + "max_tx_power" : 23, + "push_timeout_ms" : 100, + "ref_altitude" : 0, + "ref_latitude" : 0.0, + "ref_longitude" : 0.0, + "serv_port_down" : 1782, + "serv_port_up" : 1780, + "server_address" : "127.0.0.1", + "stat_interval" : 30, + "synch_word" : 52 + } +}
\ No newline at end of file diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.RU864 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.RU864 new file mode 100644 index 0000000..9a99075 --- /dev/null +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.RU864 @@ -0,0 +1,261 @@ +{ + "SX130x_conf" : + { + "antenna_gain" : 3, + "chan_FSK" : + { + "bandwidth" : 125000, + "datarate" : 50000, + "enable" : true, + "freq_deviation" : 25000, + "if" : 0, + "radio" : 0 + }, + "chan_Lora_std" : + { + "bandwidth" : 250000, + "enable" : true, + "if" : -200000, + "implicit_coderate" : 1, + "implicit_crc_en" : false, + "implicit_hdr" : false, + "implicit_payload_length" : 17, + "radio" : 0, + "spread_factor" : 7 + }, + "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" : -400000, + "radio" : 1 + }, + "chan_multiSF_4" : + { + "enable" : true, + "if" : -200000, + "radio" : 1 + }, + "chan_multiSF_5" : + { + "enable" : true, + "if" : 0, + "radio" : 1 + }, + "chan_multiSF_6" : + { + "enable" : true, + "if" : 200000, + "radio" : 1 + }, + "chan_multiSF_7" : + { + "enable" : true, + "if" : 400000, + "radio" : 0 + }, + "chan_multiSF_All" : + { + "spreading_factor_enable" : + [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ] + }, + "clksrc" : 0, + "com_type" : "SPI", + "fine_timestamp" : + { + "enable" : false, + "mode" : "all_sf" + }, + "full_duplex" : false, + "lorawan_public" : true, + "radio_0" : + { + "enable" : true, + "freq" : 869100000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : true, + "tx_freq_max" : 870000000, + "tx_freq_min" : 864000000, + "tx_gain_lut" : + [ + { + "pa_gain" : 0, + "pwr_idx" : 14, + "rf_power" : 11 + }, + { + "pa_gain" : 0, + "pwr_idx" : 15, + "rf_power" : 12 + }, + { + "pa_gain" : 0, + "pwr_idx" : 16, + "rf_power" : 13 + }, + { + "pa_gain" : 0, + "pwr_idx" : 17, + "rf_power" : 15 + }, + { + "pa_gain" : 1, + "pwr_idx" : 0, + "rf_power" : 16 + }, + { + "pa_gain" : 1, + "pwr_idx" : 1, + "rf_power" : 17 + }, + { + "pa_gain" : 1, + "pwr_idx" : 2, + "rf_power" : 18 + }, + { + "pa_gain" : 1, + "pwr_idx" : 3, + "rf_power" : 19 + }, + { + "pa_gain" : 1, + "pwr_idx" : 4, + "rf_power" : 20 + }, + { + "pa_gain" : 1, + "pwr_idx" : 5, + "rf_power" : 21 + }, + { + "pa_gain" : 1, + "pwr_idx" : 6, + "rf_power" : 22 + }, + { + "pa_gain" : 1, + "pwr_idx" : 7, + "rf_power" : 23 + }, + { + "pa_gain" : 1, + "pwr_idx" : 8, + "rf_power" : 24 + }, + { + "pa_gain" : 1, + "pwr_idx" : 10, + "rf_power" : 25 + }, + { + "pa_gain" : 1, + "pwr_idx" : 12, + "rf_power" : 26 + }, + { + "pa_gain" : 1, + "pwr_idx" : 15, + "rf_power" : 27 + } + ], + "tx_notch_freq" : 129000, + "type" : "SX1250" + }, + "radio_1" : + { + "enable" : true, + "freq" : 868100000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : false, + "type" : "SX1250" + }, + "sx1261_conf" : + { + "lbt" : + { + "channels" : [], + "enable" : false, + "rssi_target" : -80 + }, + "rssi_offset" : 30, + "spectral_scan" : + { + "enable" : false, + "freq_start" : 903900000, + "nb_chan" : 8, + "nb_scan" : 2000, + "pace_s" : 10 + } + } + }, + "gateway_conf" : + { + "autoquit_threshold" : 0, + "beacon_bw_hz" : 125000, + "beacon_datarate" : 9, + "beacon_freq_hz" : 869525000, + "beacon_infodesc" : 0, + "beacon_period" : 0, + "beacon_power" : 14, + "duty_cycle_enabled" : false, + "forward_crc_disabled" : false, + "forward_crc_error" : false, + "forward_crc_valid" : true, + "gateway_ID" : "aa555a0000000000", + "gps" : true, + "gps_tty_path" : "/dev/gpspipe", + "keepalive_interval" : 10, + "push_timeout_ms" : 100, + "ref_altitude" : 0, + "ref_latitude" : 0.0, + "ref_longitude" : 0.0, + "serv_port_down" : 1782, + "serv_port_up" : 1780, + "server_address" : "127.0.0.1", + "stat_interval" : 30, + "synch_word" : 52 + } +}
\ No newline at end of file diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 index 3be6a33..220c56f 100644 --- a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 +++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 @@ -1,107 +1,259 @@ { - "SX130x_conf": { - "com_type": "SPI", - "com_path": "/dev/spidev0.0", - "tmp102": 72, - "lorawan_public": true, - "clksrc": 0, - "antenna_gain": 0, /* antenna gain, in dBi */ - "full_duplex": false, - "fine_timestamp": { - "enable": false, - "mode": "all_sf" /* high_capacity or all_sf */ - }, - "sx1261_conf": { - "spi_path": "/dev/spidev0.1", - "rssi_offset": 0, /* dB */ - "spectral_scan": { - "enable": false, - "freq_start": 903900000, - "nb_chan": 8, - "nb_scan": 2000, - "pace_s": 10 - }, - "lbt": { - "enable": false /* LBT for 500 Khz channels is not supported */ - } - }, - "radio_0": { - "enable": true, - "type": "SX1250", - "freq": 904300000, - "rssi_offset": -215.4, - "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, - "tx_enable": true, - "tx_freq_min": 923000000, - "tx_freq_max": 928000000, - "tx_gain_lut":[ - {"rf_power": 12, "pa_gain": 0, "pwr_idx": 15}, - {"rf_power": 13, "pa_gain": 0, "pwr_idx": 16}, - {"rf_power": 14, "pa_gain": 0, "pwr_idx": 17}, - {"rf_power": 15, "pa_gain": 0, "pwr_idx": 19}, - {"rf_power": 16, "pa_gain": 0, "pwr_idx": 20}, - {"rf_power": 17, "pa_gain": 0, "pwr_idx": 22}, - {"rf_power": 18, "pa_gain": 1, "pwr_idx": 1}, - {"rf_power": 19, "pa_gain": 1, "pwr_idx": 2}, - {"rf_power": 20, "pa_gain": 1, "pwr_idx": 3}, - {"rf_power": 21, "pa_gain": 1, "pwr_idx": 4}, - {"rf_power": 22, "pa_gain": 1, "pwr_idx": 5}, - {"rf_power": 23, "pa_gain": 1, "pwr_idx": 6}, - {"rf_power": 24, "pa_gain": 1, "pwr_idx": 7}, - {"rf_power": 25, "pa_gain": 1, "pwr_idx": 9}, - {"rf_power": 26, "pa_gain": 1, "pwr_idx": 11}, - {"rf_power": 27, "pa_gain": 1, "pwr_idx": 14} - ] - }, - "radio_1": { - "enable": true, - "type": "SX1250", - "freq": 905000000, - "rssi_offset": -215.4, - "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0}, - "tx_enable": false - }, - "chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]}, - "chan_multiSF_0": {"enable": true, "radio": 0, "if": -400000}, /* Freq : 903.9 MHz*/ - "chan_multiSF_1": {"enable": true, "radio": 0, "if": -200000}, /* Freq : 904.1 MHz*/ - "chan_multiSF_2": {"enable": true, "radio": 0, "if": 0}, /* Freq : 904.3 MHz*/ - "chan_multiSF_3": {"enable": true, "radio": 0, "if": 200000}, /* Freq : 904.5 MHz*/ - "chan_multiSF_4": {"enable": true, "radio": 1, "if": -300000}, /* Freq : 904.7 MHz*/ - "chan_multiSF_5": {"enable": true, "radio": 1, "if": -100000}, /* Freq : 904.9 MHz*/ - "chan_multiSF_6": {"enable": true, "radio": 1, "if": 100000}, /* Freq : 905.1 MHz*/ - "chan_multiSF_7": {"enable": true, "radio": 1, "if": 300000}, /* Freq : 905.3 MHz*/ - "chan_Lora_std": {"enable": true, "radio": 0, "if": 300000, "bandwidth": 500000, "spread_factor": 8, /* Freq : 904.6 MHz*/ - "implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1}, - "chan_FSK": {"enable": false, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000} /* Freq : 868.8 MHz*/ - }, - - "gateway_conf": { - "gateway_ID": "AA555A0000000000", - /* change with default server address/ports */ - "server_address": "localhost", - "serv_port_up": 1730, - "serv_port_down": 1730, - /* adjust the following parameters for your network */ - "keepalive_interval": 10, - "stat_interval": 30, - "push_timeout_ms": 100, - /* forward only valid packets */ - "forward_crc_valid": true, - "forward_crc_error": false, - "forward_crc_disabled": false, - /* GPS configuration */ - "gps" : true, - "gps_tty_path": "/dev/gps0", - /* GPS reference coordinates */ - "ref_latitude": 0.0, - "ref_longitude": 0.0, - "ref_altitude": 0, - /* Beaconing parameters */ - "beacon_period": 0, /* disable class B beacon */ - "beacon_freq_hz": 869525000, - "beacon_datarate": 9, - "beacon_bw_hz": 125000, - "beacon_power": 14, - "beacon_infodesc": 0 - } -} + "SX130x_conf" : + { + "antenna_gain" : 3, + "chan_FSK" : + { + "bandwidth" : 125000, + "datarate" : 50000, + "enable" : false, + "if" : 0, + "radio" : 0 + }, + "chan_Lora_std" : + { + "bandwidth" : 500000, + "enable" : true, + "if" : 300000, + "implicit_coderate" : 1, + "implicit_crc_en" : false, + "implicit_hdr" : false, + "implicit_payload_length" : 17, + "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 + }, + "chan_multiSF_All" : + { + "spreading_factor_enable" : + [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ] + }, + "clksrc" : 0, + "com_type" : "SPI", + "fine_timestamp" : + { + "enable" : false, + "mode" : "all_sf" + }, + "full_duplex" : false, + "lorawan_public" : true, + "radio_0" : + { + "enable" : true, + "freq" : 902700000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : true, + "tx_freq_max" : 928000000, + "tx_freq_min" : 902000000, + "tx_gain_lut" : + [ + { + "pa_gain" : 0, + "pwr_idx" : 14, + "rf_power" : 11 + }, + { + "pa_gain" : 0, + "pwr_idx" : 15, + "rf_power" : 12 + }, + { + "pa_gain" : 0, + "pwr_idx" : 16, + "rf_power" : 13 + }, + { + "pa_gain" : 0, + "pwr_idx" : 17, + "rf_power" : 15 + }, + { + "pa_gain" : 1, + "pwr_idx" : 0, + "rf_power" : 16 + }, + { + "pa_gain" : 1, + "pwr_idx" : 1, + "rf_power" : 17 + }, + { + "pa_gain" : 1, + "pwr_idx" : 2, + "rf_power" : 18 + }, + { + "pa_gain" : 1, + "pwr_idx" : 3, + "rf_power" : 19 + }, + { + "pa_gain" : 1, + "pwr_idx" : 4, + "rf_power" : 20 + }, + { + "pa_gain" : 1, + "pwr_idx" : 5, + "rf_power" : 21 + }, + { + "pa_gain" : 1, + "pwr_idx" : 6, + "rf_power" : 22 + }, + { + "pa_gain" : 1, + "pwr_idx" : 7, + "rf_power" : 23 + }, + { + "pa_gain" : 1, + "pwr_idx" : 8, + "rf_power" : 24 + }, + { + "pa_gain" : 1, + "pwr_idx" : 10, + "rf_power" : 25 + }, + { + "pa_gain" : 1, + "pwr_idx" : 12, + "rf_power" : 26 + }, + { + "pa_gain" : 1, + "pwr_idx" : 15, + "rf_power" : 27 + } + ], + "type" : "SX1250" + }, + "radio_1" : + { + "enable" : true, + "freq" : 903500000, + "rssi_offset" : -215, + "rssi_tcomp" : + { + "coeff_a" : 0, + "coeff_b" : 0, + "coeff_c" : 20.41, + "coeff_d" : 2162.5599999999999, + "coeff_e" : 0 + }, + "tx_enable" : false, + "type" : "SX1250" + }, + "sx1261_conf" : + { + "lbt" : + { + "channels" : [], + "enable" : false, + "rssi_target" : -80 + }, + "rssi_offset" : 30, + "spectral_scan" : + { + "enable" : false, + "freq_start" : 903900000, + "nb_chan" : 8, + "nb_scan" : 2000, + "pace_s" : 10 + } + } + }, + "gateway_conf" : + { + "autoquit_threshold" : 0, + "beacon_bw_hz" : 125000, + "beacon_datarate" : 9, + "beacon_freq_hz" : 869525000, + "beacon_infodesc" : 0, + "beacon_period" : 0, + "beacon_power" : 14, + "duty_cycle_enabled" : false, + "forward_crc_disabled" : false, + "forward_crc_error" : false, + "forward_crc_valid" : true, + "gateway_ID" : "aa555a0000000000", + "gps" : true, + "gps_tty_path" : "/dev/gpspipe", + "keepalive_interval" : 10, + "push_timeout_ms" : 100, + "ref_altitude" : 0, + "ref_latitude" : 0.0, + "ref_longitude" : 0.0, + "serv_port_down" : 1782, + "serv_port_up" : 1780, + "server_address" : "127.0.0.1", + "stat_interval" : 30, + "synch_word" : 52 + } +}
\ No newline at end of file diff --git a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.42.bb b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.44.bb index 68a6322..ccb4ee7 100644 --- a/recipes-connectivity/lora/lora-gateway-sx1303_2.0.42.bb +++ b/recipes-connectivity/lora/lora-gateway-sx1303_2.0.44.bb @@ -15,13 +15,19 @@ SRCREV = "V${PV}" SRC_URI = "git://github.com/MultiTechSystems/sx1302_hal.git;protocol=https;branch=master \ file://reset_lgw.sh \ + file://global_conf.json.MTAC_003_0_0.AS923 \ + file://global_conf.json.MTAC_003_0_0.AS923-LBT \ + file://global_conf.json.MTAC_003_0_0.AU915 \ file://global_conf.json.MTAC_003_0_0.EU868 \ + file://global_conf.json.MTAC_003_0_0.IN865 \ + file://global_conf.json.MTAC_003_0_0.KR920-LBT \ + file://global_conf.json.MTAC_003_0_0.RU864 \ file://global_conf.json.MTAC_003_0_0.US915 \ file://global_conf.json.MTCAP3.EU868 \ file://global_conf.json.MTCAP3.US915 \ " -SRC_URI[sha256sum] = "dbfebdee1292e891d32bca52a9ef78b350557383d4d86c96c198e182249aa30f" +SRC_URI[sha256sum] = "595798b4d2952f1a12019ac221e656a80a9da2379eba8dcb20dafa780ff715f1" S = "${WORKDIR}/git" @@ -62,7 +68,13 @@ do_install() { } do_install_append_mtcdt() { + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.AS923 ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.AS923-LBT ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.AU915 ${D}${LORA_DIR}/ install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.IN865 ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.KR920-LBT ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.RU864 ${D}${LORA_DIR}/ install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/ } @@ -75,7 +87,13 @@ do_install_append_mtcap3() { } do_install_append_mtcpmhs() { + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.AS923 ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.AS923-LBT ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.AU915 ${D}${LORA_DIR}/ install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.EU868 ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.IN865 ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.KR920-LBT ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.RU864 ${D}${LORA_DIR}/ install -m 755 ${WORKDIR}/global_conf.json.MTAC_003_0_0.US915 ${D}${LORA_DIR}/ } 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 8e2e729..c5f94cb 100755 --- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init +++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init @@ -8,7 +8,8 @@ ENABLED="yes" [ -f /etc/default/$NAME ] && source /etc/default/$NAME - +daemon_start="/usr/sbin/start-stop-daemon --start --background" +daemon_stop="/usr/sbin/start-stop-daemon --stop --quiet --oknodo" run_dir=/var/run/lora conf_dir=/var/config/lora conf_file=$conf_dir/lora-network-server.conf @@ -31,6 +32,7 @@ port2=/sys/devices/platform/mts-io/ap2 lora_1_0_hw="MTAC-LORA-1.0" lora_1_5_h_hw="MTAC-LORA-1.5" lora_2_1_hw="MTAC-LORA-2.1" +lora_2g4_hw="MTAC-LORA-2G4-0.0" lora_mtac_id="MTAC-LORA" lora_mtac_003_id="MTAC-003" @@ -41,15 +43,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_mtcap3_id="MTCAP3" lora_mtcap3_id868="MTCAP3-003E00" lora_mtcap3_id915="MTCAP3-003U00" +lora_mtac_2g4_id="MTAC-LORA-2G4" + lora_mtac_g_id="MTAC-LORA-G" lora_mtac_g16_id868="MTAC-LORA-G16-868" lora_mtac_g16_id915="MTAC-LORA-G16-915" @@ -61,19 +60,33 @@ dual_cards_installed=false gps_path="/dev/gps0" read_lora_hw_info() { - hw_id=$(mts-io-sysfs show product-id 2> /dev/null) + set +e + + hw_id=$(mts-io-sysfs show hw-version) # product-id of first lora card lora_id=$(mts-io-sysfs show lora/product-id 2> /dev/null) + if [ $? -ne 0 ]; then + lora_id="NONE" + fi lora_eui=$(mts-io-sysfs show lora/eui 2> /dev/null) + if [ $? -ne 0 ]; then + lora_eui=$(mts-io-sysfs show mac-eth) + lora_eui=${lora_eui:0:8}":FF:FF"${lora_eui:8:16} + fi # remove all colons lora_eui_raw=${lora_eui//:} lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null) + if [ $? -ne 0 ]; then + lora_hw="NONE" + 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 elif [ -d $port1 ] && [[ $(cat $port1/hw-version) =~ "MTAC-003" ]] && [ -d $port2 ] && [[ $(cat $port2/hw-version) =~ "MTAC-003" ]]; then dual_cards_installed=true + elif [ -d $port1 ] && [[ $(cat $port1/hw-version) =~ "LORA-2G4" ]] && [ -d $port2 ] && [[ $(cat $port2/hw-version) =~ "LORA-2G4" ]]; then + dual_cards_installed=true fi if [[ "$dual_cards_installed" = "true" ]] && [ -d $port2 ] && [[ $(cat $port2/hw-version) =~ "LORA-1.5" || $(cat $port2/hw-version) =~ "LORA-2G4" || $(cat $port2/hw-version) =~ "MTAC-003" ]]; then @@ -85,34 +98,18 @@ read_lora_hw_info() { lora_2_eui_raw=${lora_2_eui//:} 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 -} + set -e -hardware_found() { - if [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then - setup_mtcdt_2_1 - elif [[ "$lora_id" =~ "$lora_mtac_2g4_id" ]]; then - setup_mtcdt_2g4 - elif [[ "$lora_id" =~ "$lora_mtac_003_id" ]]; then - setup_mtcdt003 - elif [[ "$lora_id" =~ "$lora_mtac_id" ]]; then - setup_mtcdt - elif [[ "$lora_id" =~ "$lora_mtcap3_id" ]]; then - setup_mtcap3 - elif [[ "$lora_id" =~ "$lora_mtcap_id" ]]; then - setup_mtcap - else + # Check USB id for Semtech Card + if [[ $(lsusb | grep 05c9:5740) =~ "05c9:5740" ]] && [[ ! "$lora_id" =~ "$lora_mtac_2g4_id" ]]; then + lora_id=$lora_mtac_2g4_id + lora_hw=$lora_2g4_hw + lora_eui=$(mts-io-sysfs show mac-eth) + lora_eui=${lora_eui:0:8}":FF:FF"${lora_eui:8:16} + LORA_CAPABLE=true + # Check USB id for Semtech Card in Bootloader mode + elif [[ $(lsusb | grep 0483:df11) =~ "0483:df11" ]]; then + echo "Semtech 2g4 MTAC card detected in Bootloader Mode, remove power from Conduit and restore" return 1 fi } @@ -235,18 +232,12 @@ setup_mtcap() { GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.EU868 else GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP2_LORA_1_5.EU868 - if [ "$hw" = "MTCAP-0.3" ]; then - cp /opt/lora/temp_lut.json.MTCAP2.EU868 /var/run/lora/1/temp_lut.json - fi fi elif [ "$lora_id" = "$lora_mtcap_id915" ]; then if [ "$hw" = "MTCAP-0.1" ]; then GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.US915 else GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP2_LORA_1_5.US915 - if [ "$hw" = "MTCAP-0.3" ]; then - cp /opt/lora/temp_lut.json.MTCAP2.US915 /var/run/lora/1/temp_lut.json - fi fi else return 1 @@ -264,11 +255,34 @@ setup_mtcap() { return 0 } + +hardware_found() { + if [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then + setup_mtcdt_2_1 + elif [[ "$lora_id" =~ "$lora_mtac_2g4_id" ]]; then + setup_mtcdt_2g4 + elif [[ "$lora_id" =~ "$lora_mtac_003_id" ]]; then + setup_mtcdt003 + elif [[ "$lora_id" =~ "$lora_mtac_id" ]]; then + setup_mtcdt + elif [[ "$lora_id" =~ "$lora_mtcap3_id" ]]; then + setup_mtcap3 + elif [[ "$lora_id" =~ "$lora_mtcap_id" ]]; then + setup_mtcap + else + return 1 + fi +} + do_start() { # create run directory mkdir -p $run_dir/1 mkdir -p $run_dir/2 + # remove any existing json configs from other init scripts + rm -rf $run_dir/1/*.json + rm -rf $run_dir/2/*.json + read_lora_hw_info if ! [ -f $conf_file ]; then @@ -311,30 +325,39 @@ 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 $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" + + lns_exec="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" + $daemon_start --make-pidfile --pidfile $net_server_pidfile --startas /bin/bash -- -c "$lns_exec" + + echo "check process lora-network-server with pidfile $net_server_pidfile + program start = \"$daemon_start --make-pidfile --pidfile $net_server_pidfile --startas /bin/bash -- -c '$lns_exec'\" + program stop = \"$daemon_stop --pidfile $net_server_pidfile --retry TERM/60/KILL/5\"" > /etc/monit.d/lora-network-server if [ "$no_lora_hw" != "true" ]; then # start packet forwarder sleep 4 + pkf_exec="exec $pkt_fwd $pkt_fwd_options -l $pkt_fwd_log" - /usr/sbin/start-stop-daemon --chdir $run_dir/1 --start --background --make-pidfile \ - --pidfile $pkt_fwd_pidfile --startas /bin/bash \ - -- -c "exec $pkt_fwd $pkt_fwd_options 2>&1" + $daemon_start --chdir $run_dir/1 --make-pidfile --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "$pkf_exec" + + echo "check process lora-pkt-fwd-1 with pidfile $pkt_fwd_pidfile + program start = \"$daemon_start --chdir $run_dir/1 --make-pidfile --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c '$pkf_exec'\" + program stop = \"$daemon_stop --pidfile $pkt_fwd_pidfile --retry 5\"" > /etc/monit.d/lora-pkt-fwd-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 $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log" + pkf_2_exec="exec $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log" + $daemon_start --chdir $run_dir/2 --make-pidfile --pidfile $pkt_fwd_2_pidfile --startas /bin/bash -- -c "$pkf_2_exec" + echo "check process lora-pkt-fwd-2 with pidfile $pkt_fwd_2_pidfile + program start = \"$daemon_start --chdir $run_dir/2 --make-pidfile --pidfile $pkt_fwd_2_pidfile --startas /bin/bash -- -c '$pkf_2_exec'\" + program stop = \"$daemon_stop --pidfile $pkt_fwd_2_pidfile --retry 5\"" > /etc/monit.d/lora-pkt-fwd-2 fi fi renice -n -20 -p $(pgrep lora-network-se) renice -n -20 -p $(pgrep $(basename $pkt_fwd)) + monit reload echo "OK" } @@ -342,10 +365,24 @@ do_start() { 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 + if monit summary lora-network-server > /dev/null 2>&1; then + monit unmonitor lora-network-server + start-stop-daemon --stop --quiet --oknodo --pidfile $net_server_pidfile --retry TERM/60/KILL/5 + rm -f $net_server_pidfile + fi + if monit summary lora-pkt-fwd-1 > /dev/null 2>&1; then + monit unmonitor lora-pkt-fwd-1 + start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_pidfile --retry 5 + rm -f $pkt_fwd_pidfile + fi + if monit summary lora-pkt-fwd-2 > /dev/null 2>&1; then + monit unmonitor lora-pkt-fwd-2 + start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_2_pidfile --retry 5 + rm -f $pkt_fwd_2_pidfile + fi + rm -rf /etc/monit.d/lora* + monit reload + echo "OK" } diff --git a/recipes-connectivity/lora/lora-network-server_2.6.21.bb b/recipes-connectivity/lora/lora-network-server_2.6.38.bb index c7d043b..cbc5ceb 100644 --- a/recipes-connectivity/lora/lora-network-server_2.6.21.bb +++ b/recipes-connectivity/lora/lora-network-server_2.6.38.bb @@ -13,8 +13,8 @@ SRC_URI = "https://multitech.net/downloads/lora-network-server_${PV}.tar.gz \ file://lora-network-server.default \ " -SRC_URI[md5sum] = "592fb4e735cb3926dad9f6c989399eb5" -SRC_URI[sha256sum] = "715d477155acd76218d09236837ccf4cf83a4ef3981c079ce032ea05418fe7f6" +SRC_URI[md5sum] = "bd5ba59bb40bb39fb65eefeb237c3fe4" +SRC_URI[sha256sum] = "e2580fc5407029d870f2971f9c28239d66e443ce371b5909dfdea20a2fec9203" # 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 6aaf26f..dbc1cb7 100755 --- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init +++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init @@ -2,11 +2,14 @@ NAME="lora-packet-forwarder" +LOCK="/var/lock/$NAME" ENABLED="yes" [ -f /etc/default/$NAME ] && source /etc/default/$NAME +daemon_start="/usr/sbin/start-stop-daemon --start --background" +daemon_stop="/usr/sbin/start-stop-daemon --stop --quiet --oknodo" run_dir=/var/run/lora opt_conf_dir=/opt/lora conf_dir=/var/config/lora @@ -26,21 +29,16 @@ 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 -lora_mtac_id="MTAC-LORA" lora_1_0_hw="MTAC-LORA-1.0" lora_1_5_h_hw="MTAC-LORA-1.5" lora_2_1_hw="MTAC-LORA-2.1" +lora_2g4_hw="MTAC-LORA-2G4-0.0" lora_mtac_id="MTAC-LORA" 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_mtac_003_id="MTAC-003" lora_mtac_003_id868="MTAC-003E00" lora_mtac_003_id915="MTAC-003U00" @@ -53,13 +51,7 @@ lora_mtcap3_id="MTCAP3" lora_mtcap3_id868="MTCAP3-003E00" lora_mtcap3_id915="MTCAP3-003U00" -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_2g4_id="MTAC-LORA-2G4" lora_mtac_g_id="MTAC-LORA-G" lora_mtac_g16_id868="MTAC-LORA-G16-868" @@ -68,23 +60,37 @@ lora_mtac_g64_id868="MTAC-LORA-G64-868" lora_mtac_g64_id915="MTAC-LORA-G64-915" pkt_fwd_options="" - +dual_cards_installed=false gps_path="/dev/gps0" read_lora_hw_info() { - hw_id=$(mts-io-sysfs show product-id 2> /dev/null) + set +e + + hw_id=$(mts-io-sysfs show hw-version) # product-id of first lora card lora_id=$(mts-io-sysfs show lora/product-id 2> /dev/null) + if [ $? -ne 0 ]; then + lora_id="NONE" + fi lora_eui=$(mts-io-sysfs show lora/eui 2> /dev/null) + if [ $? -ne 0 ]; then + lora_eui=$(mts-io-sysfs show mac-eth) + lora_eui=${lora_eui:0:8}":FF:FF"${lora_eui:8:16} + fi # remove all colons lora_eui_raw=${lora_eui//:} lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null) + if [ $? -ne 0 ]; then + lora_hw="NONE" + 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 elif [ -d $port1 ] && [[ $(cat $port1/hw-version) =~ "MTAC-003" ]] && [ -d $port2 ] && [[ $(cat $port2/hw-version) =~ "MTAC-003" ]]; then dual_cards_installed=true + elif [ -d $port1 ] && [[ $(cat $port1/hw-version) =~ "LORA-2G4" ]] && [ -d $port2 ] && [[ $(cat $port2/hw-version) =~ "LORA-2G4" ]]; then + dual_cards_installed=true fi if [[ "$dual_cards_installed" = "true" ]] && [ -d $port2 ] && [[ $(cat $port2/hw-version) =~ "LORA-1.5" || $(cat $port2/hw-version) =~ "LORA-2G4" || $(cat $port2/hw-version) =~ "MTAC-003" ]]; then @@ -96,13 +102,28 @@ read_lora_hw_info() { lora_2_eui_raw=${lora_2_eui//:} fi + set -e + + # Check USB id for Semtech Card + if [[ $(lsusb | grep 05c9:5740) =~ "05c9:5740" ]] && [[ ! "$lora_id" =~ "$lora_mtac_2g4_id" ]]; then + lora_id=$lora_mtac_2g4_id + lora_hw=$lora_2g4_hw + lora_eui=$(mts-io-sysfs show mac-eth) + lora_eui=${lora_eui:0:8}":FF:FF"${lora_eui:8:16} + LORA_CAPABLE=true + # Check USB id for Semtech Card in Bootloader mode + elif [[ $(lsusb | grep 0483:df11) =~ "0483:df11" ]]; then + echo "Semtech 2g4 MTAC card detected in Bootloader Mode, remove power from Conduit and restore" + return 1 + fi } + hardware_found() { - if [[ "$hw_id" =~ "$mtcdt3_id" ]]; then - setup_mtcdt3 - elif [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then + if [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then setup_mtcdt_2_1 + elif [[ "$lora_id" =~ "$lora_mtac_2g4_id" ]]; then + setup_mtcdt_2g4 elif [[ "$lora_id" =~ "$lora_mtac_003_id" ]]; then setup_mtcdt003 elif [[ "$lora_id" =~ "$lora_mtac_id" ]]; then @@ -114,46 +135,6 @@ hardware_found() { else return 1 fi - 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_mtcdt003() { @@ -253,18 +234,12 @@ setup_mtcap() { GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.EU868 else GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP2_LORA_1_5.EU868 - if [ "$hw" = "MTCAP-0.3" ]; then - cp /opt/lora/temp_lut.json.MTCAP2.EU868 /var/run/lora/1/temp_lut.json - fi fi elif [ "$lora_id" = "$lora_mtcap_id915" ]; then if [ "$hw" = "MTCAP-0.1" ]; then GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.US915 else GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP2_LORA_1_5.US915 - if [ "$hw" = "MTCAP-0.3" ]; then - cp /opt/lora/temp_lut.json.MTCAP2.US915 /var/run/lora/1/temp_lut.json - fi fi else return 1 @@ -386,19 +361,25 @@ do_start() { # 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 -l $pkt_fwd_log" + pkf_exec="exec $pkt_fwd $pkt_fwd_options -l $pkt_fwd_log" + + $daemon_start --chdir $run_dir/1 --make-pidfile --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "$pkf_exec" + echo "check process lora-pkt-fwd-1 with pidfile $pkt_fwd_pidfile + program start = \"$daemon_start --chdir $run_dir/1 --make-pidfile --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c '$pkf_exec'\" + program stop = \"$daemon_stop --pidfile $pkt_fwd_pidfile --retry 5\"" > /etc/monit.d/lora-pkt-fwd-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 $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log" + pkt_fwd_options=" -p 2" + pkf_2_exec="exec $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log" + $daemon_start --chdir $run_dir/2 --make-pidfile --pidfile $pkt_fwd_2_pidfile --startas /bin/bash -- -c "$pkf_2_exec" + echo "check process lora-pkt-fwd-2 with pidfile $pkt_fwd_2_pidfile + program start = \"$daemon_start --chdir $run_dir/2 --make-pidfile --pidfile $pkt_fwd_2_pidfile --startas /bin/bash -- -c '$pkf_2_exec'\" + program stop = \"$daemon_stop --pidfile $pkt_fwd_2_pidfile --retry 5\"" > /etc/monit.d/lora-pkt-fwd-2 fi - if [[ ! "$hw_id" =~ "$mtcdt3_id" ]]; then - renice -n -20 -p $(pgrep $(basename $pkt_fwd)) - fi + renice -n -20 -p $(pgrep $(basename $pkt_fwd)) + monit reload echo "OK" } @@ -406,12 +387,36 @@ 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 + + if monit summary lora-pkt-fwd-1 > /dev/null 2>&1; then + monit unmonitor lora-pkt-fwd-1 + start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_pidfile --retry 5 + rm -f $pkt_fwd_pidfile + fi + if monit summary lora-pkt-fwd-2 > /dev/null 2>&1; then + monit unmonitor lora-pkt-fwd-2 + start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_2_pidfile --retry 5 + rm -f $pkt_fwd_2_pidfile + fi + rm -rf /etc/monit.d/lora* + monit reload + echo "OK" } +force_stop() { + do_stop + rm -fr $LOCK +} + +function try_lock() { + if mkdir $LOCK; then + trap "rm -fr $LOCK" EXIT + else + echo "Lora Packet Forwarder lock not acquired, resource in use" + exit 1 + fi +} if [ "$ENABLED" != "yes" ]; then echo "$NAME: disabled in /etc/default" @@ -421,14 +426,16 @@ fi case "$1" in "start") + try_lock do_start ;; "stop") - do_stop + force_stop ;; "restart") - ## Stop the service and regardless of whether it was + ## Stop the service and regardless of whether it was ## running or not, start it again. + try_lock do_stop do_start ;; diff --git a/recipes-extended/monit/monit/monit.default b/recipes-extended/monit/monit/monit.default index 0f92640..be7dcd5 100644 --- a/recipes-extended/monit/monit/monit.default +++ b/recipes-extended/monit/monit/monit.default @@ -1,2 +1,2 @@ # set to "yes" or "no" to control starting on boot -ENABLED="no" +ENABLED="yes" diff --git a/recipes-support/multitech/libmts-io_1.0.34.bb b/recipes-support/multitech/libmts-io_1.0.35.bb index a50f96e..a50f96e 100644 --- a/recipes-support/multitech/libmts-io_1.0.34.bb +++ b/recipes-support/multitech/libmts-io_1.0.35.bb |