diff options
Diffstat (limited to 'recipes-connectivity/lora/lora-packet-forwarder')
10 files changed, 1106 insertions, 13 deletions
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.AS923 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.AS923 new file mode 100644 index 0000000..fd3800b --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.AS923 @@ -0,0 +1,117 @@ +{ + "SX1301_conf": { + "antenna_gain": 0, + "chan_FSK": { + "bandwidth": 125000, + "datarate": 50000, + "enable": true, + "freq_deviation": 25000, + "if": 300000, + "radio": 0 + }, + "chan_Lora_std": { + "bandwidth": 250000, + "enable": true, + "if": -200000, + "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 + }, + "clksrc": 0, + "lbt_cfg": { + "chan_cfg": [ + ], + "enable": false, + "rssi_target": -80, + "sx127x_rssi_offset": -4 + }, + "lorawan_public": true, + "radio_0": { + "enable": true, + "freq": 923600000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 928000000, + "tx_freq_min": 920000000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 922600000, + "rssi_offset": -162, + "tx_enable": false, + "type": "SX1257" + }, + "tx_lut_0":{"dig_gain":0,"mix_gain":12,"pa_gain":1,"rf_power":10}, + "tx_lut_1":{"dig_gain":3,"mix_gain":11,"pa_gain":2,"rf_power":11}, + "tx_lut_2":{"dig_gain":0,"mix_gain":14,"pa_gain":1,"rf_power":12}, + "tx_lut_3":{"dig_gain":0,"mix_gain":9,"pa_gain":2,"rf_power":13}, + "tx_lut_4":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":14}, + "tx_lut_5":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":15}, + "tx_lut_6":{"dig_gain":0,"mix_gain":11,"pa_gain":2,"rf_power":16}, + "tx_lut_7":{"dig_gain":3,"mix_gain":9,"pa_gain":3,"rf_power":17}, + "tx_lut_8":{"dig_gain":1,"mix_gain":8,"pa_gain":3,"rf_power":20}, + "tx_lut_9":{"dig_gain":0,"mix_gain":8,"pa_gain":3,"rf_power":21}, + "tx_lut_10":{"dig_gain":2,"mix_gain":10,"pa_gain":3,"rf_power":23}, + "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":24}, + "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":25}, + "tx_lut_13":{"dig_gain":2,"mix_gain":12,"pa_gain":3,"rf_power":26}, + "tx_lut_14":{"dig_gain":0,"mix_gain":13,"pa_gain":3,"rf_power":28}, + "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":29} + }, + "gateway_conf": { + "gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + "forward_crc_valid": true, + "forward_crc_error": true, + "forward_crc_disabled": false, + "synch_word": 52, + "autoquit_threshold": 60 + } +} + + diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.AS923-LBT b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.AS923-LBT new file mode 100644 index 0000000..c5f9308 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.AS923-LBT @@ -0,0 +1,149 @@ +{ + "SX1301_conf": { +"antenna_gain": 0, + "chan_FSK": { + "bandwidth": 125000, + "datarate": 50000, + "enable": true, + "freq_deviation": 25000, + "if": 300000, + "radio": 0 + }, + "chan_Lora_std": { + "bandwidth": 250000, + "enable": true, + "if": -200000, + "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 + }, + "clksrc": 0, + "lbt_cfg": { + "chan_cfg": [ + { + "freq_hz": 923200000, + "scan_time_us": 5000 + }, + { + "freq_hz": 923400000, + "scan_time_us": 5000 + }, + { + "freq_hz": 923600000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922200000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922400000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922600000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922800000, + "scan_time_us": 5000 + }, + { + "freq_hz": 923000000, + "scan_time_us": 5000 + } + ], + "enable": true, + "rssi_target": -80, + "sx127x_rssi_offset": -4 + }, + "lorawan_public": true, + "radio_0": { + "enable": true, + "freq": 923600000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 928000000, + "tx_freq_min": 920000000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 922600000, + "rssi_offset": -162, + "tx_enable": false, + "type": "SX1257" + }, + "tx_lut_0":{"dig_gain":0,"mix_gain":12,"pa_gain":1,"rf_power":10}, + "tx_lut_1":{"dig_gain":3,"mix_gain":11,"pa_gain":2,"rf_power":11}, + "tx_lut_2":{"dig_gain":0,"mix_gain":14,"pa_gain":1,"rf_power":12}, + "tx_lut_3":{"dig_gain":0,"mix_gain":9,"pa_gain":2,"rf_power":13}, + "tx_lut_4":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":14}, + "tx_lut_5":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":15}, + "tx_lut_6":{"dig_gain":0,"mix_gain":11,"pa_gain":2,"rf_power":16}, + "tx_lut_7":{"dig_gain":3,"mix_gain":9,"pa_gain":3,"rf_power":17}, + "tx_lut_8":{"dig_gain":1,"mix_gain":8,"pa_gain":3,"rf_power":20}, + "tx_lut_9":{"dig_gain":0,"mix_gain":8,"pa_gain":3,"rf_power":21}, + "tx_lut_10":{"dig_gain":2,"mix_gain":10,"pa_gain":3,"rf_power":23}, + "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":24}, + "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":25}, + "tx_lut_13":{"dig_gain":2,"mix_gain":12,"pa_gain":3,"rf_power":26}, + "tx_lut_14":{"dig_gain":0,"mix_gain":13,"pa_gain":3,"rf_power":28}, + "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":29} + }, + "gateway_conf": { + "gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + "forward_crc_valid": true, + "forward_crc_error": true, + "forward_crc_disabled": false, + "synch_word": 52, + "autoquit_threshold": 60 + } +} + + diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.AU915 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.AU915 new file mode 100644 index 0000000..ff8ec89 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.AU915 @@ -0,0 +1,115 @@ +{ + "SX1301_conf": { + "lorawan_public": true, + "antenna_gain": 0, + "clksrc": 0, + "radio_0": { + "enable": true, + "freq": 915600000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 928000000, + "tx_freq_min": 902000000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 916400000, + "rssi_offset": -162, + "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":{"dig_gain":0,"mix_gain":12,"pa_gain":1,"rf_power":10}, + "tx_lut_1":{"dig_gain":3,"mix_gain":11,"pa_gain":2,"rf_power":11}, + "tx_lut_2":{"dig_gain":0,"mix_gain":14,"pa_gain":1,"rf_power":12}, + "tx_lut_3":{"dig_gain":0,"mix_gain":9,"pa_gain":2,"rf_power":13}, + "tx_lut_4":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":14}, + "tx_lut_5":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":15}, + "tx_lut_6":{"dig_gain":0,"mix_gain":11,"pa_gain":2,"rf_power":16}, + "tx_lut_7":{"dig_gain":3,"mix_gain":9,"pa_gain":3,"rf_power":17}, + "tx_lut_8":{"dig_gain":1,"mix_gain":8,"pa_gain":3,"rf_power":20}, + "tx_lut_9":{"dig_gain":0,"mix_gain":8,"pa_gain":3,"rf_power":21}, + "tx_lut_10":{"dig_gain":2,"mix_gain":10,"pa_gain":3,"rf_power":23}, + "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":24}, + "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":25}, + "tx_lut_13":{"dig_gain":2,"mix_gain":12,"pa_gain":3,"rf_power":26}, + "tx_lut_14":{"dig_gain":0,"mix_gain":13,"pa_gain":3,"rf_power":28}, + "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":29} + }, + "gateway_conf": { + "gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + "forward_crc_valid": true, + "forward_crc_error": true, + "forward_crc_disabled": false, + "synch_word": 52, + "autoquit_threshold": 60 + } +} + + diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.EU868 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.EU868 new file mode 100644 index 0000000..ee56dd4 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.EU868 @@ -0,0 +1,60 @@ +{ + "SX1301_conf": { + "lorawan_public": true, + "clksrc": 0, + "lbt_cfg": { + "enable": false, + "rssi_target": 160, + "nb_channel": 1, + "start_freq": 869525000, + "scan_time_us": 5000, + "tx_delay_1ch_us": 4000000, + "tx_delay_2ch_us": 4000000 + }, + "antenna_gain": 0, + "radio_0": { "enable": true, "type": "SX1257", "freq": 867500000, "rssi_offset": -162, "tx_enable": true, "tx_freq_min": 863000000, "tx_freq_max": 870000000 }, + "radio_1": { "enable": true, "type": "SX1257", "freq": 868500000, "rssi_offset": -162, "tx_enable": false }, + "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 }, + "chan_FSK": { "enable": true, "radio": 1, "if": 300000, "bandwidth": 125000, "datarate": 50000 }, + "tx_lut_0":{"dig_gain":0,"mix_gain":12,"pa_gain":1,"rf_power":10}, + "tx_lut_1":{"dig_gain":3,"mix_gain":11,"pa_gain":2,"rf_power":11}, + "tx_lut_2":{"dig_gain":0,"mix_gain":14,"pa_gain":1,"rf_power":12}, + "tx_lut_3":{"dig_gain":0,"mix_gain":9,"pa_gain":2,"rf_power":13}, + "tx_lut_4":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":14}, + "tx_lut_5":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":15}, + "tx_lut_6":{"dig_gain":0,"mix_gain":11,"pa_gain":2,"rf_power":16}, + "tx_lut_7":{"dig_gain":3,"mix_gain":9,"pa_gain":3,"rf_power":17}, + "tx_lut_8":{"dig_gain":1,"mix_gain":8,"pa_gain":3,"rf_power":20}, + "tx_lut_9":{"dig_gain":0,"mix_gain":8,"pa_gain":3,"rf_power":21}, + "tx_lut_10":{"dig_gain":2,"mix_gain":10,"pa_gain":3,"rf_power":23}, + "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":24}, + "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":25}, + "tx_lut_13":{"dig_gain":2,"mix_gain":12,"pa_gain":3,"rf_power":26}, + "tx_lut_14":{"dig_gain":0,"mix_gain":13,"pa_gain":3,"rf_power":28}, + "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":29} + }, + "gateway_conf": { + "gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + "forward_crc_valid": true, + "forward_crc_error": true, + "forward_crc_disabled": false, + "synch_word": 52, + "autoquit_threshold": 60 + } +} + + diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.IN865 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.IN865 new file mode 100644 index 0000000..4c91d78 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.IN865 @@ -0,0 +1,118 @@ +{ + "SX1301_conf": { + "antenna_gain": 0, + "chan_FSK": { + "bandwidth": 125000, + "datarate": 50000, + "enable": true, + "freq_deviation": 25000, + "if": 300000, + "radio": 1 + }, + "chan_Lora_std": { + "bandwidth": 250000, + "enable": true, + "if": 0, + "radio": 0, + "spread_factor": 7 + }, + "chan_multiSF_": { + "radio": null + }, + "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 + }, + "clksrc": 0, + "lbt_cfg": { + "enable": false, + "rssi_target": 160 + }, + "lorawan_public": true, + "radio_0": { + "enable": true, + "freq": 865200000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 867000000, + "tx_freq_min": 865000000, + "tx_notch_freq": 129000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 866385000, + "rssi_offset": -162, + "tx_enable": false, + "type": "SX1257" + }, + "tx_lut_0":{"dig_gain":0,"mix_gain":12,"pa_gain":1,"rf_power":10}, + "tx_lut_1":{"dig_gain":3,"mix_gain":11,"pa_gain":2,"rf_power":11}, + "tx_lut_2":{"dig_gain":0,"mix_gain":14,"pa_gain":1,"rf_power":12}, + "tx_lut_3":{"dig_gain":0,"mix_gain":9,"pa_gain":2,"rf_power":13}, + "tx_lut_4":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":14}, + "tx_lut_5":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":15}, + "tx_lut_6":{"dig_gain":0,"mix_gain":11,"pa_gain":2,"rf_power":16}, + "tx_lut_7":{"dig_gain":3,"mix_gain":9,"pa_gain":3,"rf_power":17}, + "tx_lut_8":{"dig_gain":1,"mix_gain":8,"pa_gain":3,"rf_power":20}, + "tx_lut_9":{"dig_gain":0,"mix_gain":8,"pa_gain":3,"rf_power":21}, + "tx_lut_10":{"dig_gain":2,"mix_gain":10,"pa_gain":3,"rf_power":23}, + "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":24}, + "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":25}, + "tx_lut_13":{"dig_gain":2,"mix_gain":12,"pa_gain":3,"rf_power":26}, + "tx_lut_14":{"dig_gain":0,"mix_gain":13,"pa_gain":3,"rf_power":28}, + "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":29} + }, + "gateway_conf": { + "gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + "forward_crc_valid": true, + "forward_crc_error": true, + "forward_crc_disabled": false, + "synch_word": 52, + "autoquit_threshold": 60 + } +} + + diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.KR920-LBT b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.KR920-LBT new file mode 100644 index 0000000..397f7f7 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.KR920-LBT @@ -0,0 +1,148 @@ +{ + "SX1301_conf": { + "antenna_gain": 0, + "chan_FSK": { + "bandwidth": 125000, + "datarate": 50000, + "enable": false, + "if": 300000, + "radio": 0 + }, + "chan_Lora_std": { + "bandwidth": 250000, + "enable": false, + "if": -200000, + "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 + }, + "clksrc": 0, + "lbt_cfg": { + "chan_cfg": [ + { + "freq_hz": 922100000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922300000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922500000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922700000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922900000, + "scan_time_us": 5000 + }, + { + "freq_hz": 923100000, + "scan_time_us": 5000 + }, + { + "freq_hz": 923300000, + "scan_time_us": 5000 + }, + { + "freq_hz": 921900000, + "scan_time_us": 5000 + } + ], + "enable": true, + "rssi_target": -65, + "sx127x_rssi_offset": -4 + }, + "lorawan_public": true, + "radio_0": { + "enable": true, + "freq": 922500000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 923300000, + "tx_freq_min": 920900000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 922900000, + "rssi_offset": -162, + "tx_enable": false, + "type": "SX1257" + }, + "tx_lut_0":{"dig_gain":0,"mix_gain":12,"pa_gain":1,"rf_power":10}, + "tx_lut_1":{"dig_gain":3,"mix_gain":11,"pa_gain":2,"rf_power":11}, + "tx_lut_2":{"dig_gain":0,"mix_gain":14,"pa_gain":1,"rf_power":12}, + "tx_lut_3":{"dig_gain":0,"mix_gain":9,"pa_gain":2,"rf_power":13}, + "tx_lut_4":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":14}, + "tx_lut_5":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":15}, + "tx_lut_6":{"dig_gain":0,"mix_gain":11,"pa_gain":2,"rf_power":16}, + "tx_lut_7":{"dig_gain":3,"mix_gain":9,"pa_gain":3,"rf_power":17}, + "tx_lut_8":{"dig_gain":1,"mix_gain":8,"pa_gain":3,"rf_power":20}, + "tx_lut_9":{"dig_gain":0,"mix_gain":8,"pa_gain":3,"rf_power":21}, + "tx_lut_10":{"dig_gain":2,"mix_gain":10,"pa_gain":3,"rf_power":23}, + "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":24}, + "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":25}, + "tx_lut_13":{"dig_gain":2,"mix_gain":12,"pa_gain":3,"rf_power":26}, + "tx_lut_14":{"dig_gain":0,"mix_gain":13,"pa_gain":3,"rf_power":28}, + "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":29} + }, + "gateway_conf": { + "gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + "forward_crc_valid": true, + "forward_crc_error": true, + "forward_crc_disabled": false, + "synch_word": 52, + "autoquit_threshold": 60 + } +} + + diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.RU864 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.RU864 new file mode 100644 index 0000000..0bdf557 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.RU864 @@ -0,0 +1,118 @@ +{ + "SX1301_conf": { + "lorawan_public": true, + "clksrc": 0, + "lbt_cfg": { + "enable": false, + "rssi_target": 160, + "nb_channel": 1, + "start_freq": 869525000, + "scan_time_us": 5000, + "tx_delay_1ch_us": 4000000, + "tx_delay_2ch_us": 4000000 + }, + "antenna_gain": 0, + "radio_0": { + "enable": true, + "type": "SX1257", + "freq": 869100000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_min": 864000000, + "tx_freq_max": 870000000 + }, + "radio_1": { + "enable": true, + "type": "SX1257", + "freq": 868100000, + "rssi_offset": -162, + "tx_enable": false + }, + "chan_multiSF_0": { + "enable": true, + "radio": 0, + "if": -400000 + }, + "chan_multiSF_1": { + "enable": true, + "radio": 0, + "if": -200000 + }, + "chan_multiSF_2": { + "enable": true, + "radio": 0, + "if": 0 + }, + "chan_multiSF_3": { + "enable": true, + "radio": 1, + "if": -400000 + }, + "chan_multiSF_4": { + "enable": true, + "radio": 1, + "if": -200000 + }, + "chan_multiSF_5": { + "enable": true, + "radio": 1, + "if": 0 + }, + "chan_multiSF_6": { + "enable": true, + "radio": 1, + "if": 200000 + }, + "chan_multiSF_7": { + "enable": true, + "radio": 1, + "if": 400000 + }, + "chan_Lora_std": { + "enable": true, + "radio": 0, + "if": -200000, + "bandwidth": 250000, + "spread_factor": 7 + }, + "chan_FSK": { + "enable": true, + "radio": 1, + "if": 0, + "bandwidth": 125000, + "datarate": 50000 + }, + "tx_lut_0":{"dig_gain":0,"mix_gain":12,"pa_gain":1,"rf_power":10}, + "tx_lut_1":{"dig_gain":3,"mix_gain":11,"pa_gain":2,"rf_power":11}, + "tx_lut_2":{"dig_gain":0,"mix_gain":14,"pa_gain":1,"rf_power":12}, + "tx_lut_3":{"dig_gain":0,"mix_gain":9,"pa_gain":2,"rf_power":13}, + "tx_lut_4":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":14}, + "tx_lut_5":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":15}, + "tx_lut_6":{"dig_gain":0,"mix_gain":11,"pa_gain":2,"rf_power":16}, + "tx_lut_7":{"dig_gain":3,"mix_gain":9,"pa_gain":3,"rf_power":17}, + "tx_lut_8":{"dig_gain":1,"mix_gain":8,"pa_gain":3,"rf_power":20}, + "tx_lut_9":{"dig_gain":0,"mix_gain":8,"pa_gain":3,"rf_power":21}, + "tx_lut_10":{"dig_gain":2,"mix_gain":10,"pa_gain":3,"rf_power":23}, + "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":24}, + "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":25}, + "tx_lut_13":{"dig_gain":2,"mix_gain":12,"pa_gain":3,"rf_power":26}, + "tx_lut_14":{"dig_gain":0,"mix_gain":13,"pa_gain":3,"rf_power":28}, + "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":29} + }, + "gateway_conf": { + "gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + "forward_crc_valid": true, + "forward_crc_error": true, + "forward_crc_disabled": false, + "synch_word": 52, + "autoquit_threshold": 60 + } +} + + diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.US915 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.US915 new file mode 100644 index 0000000..223cc64 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.MTCAP2-LORA-1.5.US915 @@ -0,0 +1,131 @@ +{ + "SX1301_conf": { +"antenna_gain" : 0, + "chan_FSK" : + { + "bandwidth" : 125000, + "datarate" : 50000, + "enable" : false, + "if" : 300000, + "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 + }, + "clksrc" : 0, + "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 + }, + "lorawan_public" : true, + "radio_0" : + { + "enable" : true, + "freq" : 902700000, + "rssi_offset" : -162, + "tx_enable" : true, + "tx_freq_max" : 928000000, + "tx_freq_min" : 902000000, + "type" : "SX1257" + }, + "radio_1" : + { + "enable" : true, + "freq" : 903500000, + "rssi_offset" : -162, + "tx_enable" : false, + "type" : "SX1257" + }, + "tx_lut_0":{"dig_gain":0,"mix_gain":12,"pa_gain":1,"rf_power":10}, + "tx_lut_1":{"dig_gain":3,"mix_gain":11,"pa_gain":2,"rf_power":11}, + "tx_lut_2":{"dig_gain":0,"mix_gain":14,"pa_gain":1,"rf_power":12}, + "tx_lut_3":{"dig_gain":0,"mix_gain":9,"pa_gain":2,"rf_power":13}, + "tx_lut_4":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":14}, + "tx_lut_5":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":15}, + "tx_lut_6":{"dig_gain":0,"mix_gain":11,"pa_gain":2,"rf_power":16}, + "tx_lut_7":{"dig_gain":3,"mix_gain":9,"pa_gain":3,"rf_power":17}, + "tx_lut_8":{"dig_gain":1,"mix_gain":8,"pa_gain":3,"rf_power":20}, + "tx_lut_9":{"dig_gain":0,"mix_gain":8,"pa_gain":3,"rf_power":21}, + "tx_lut_10":{"dig_gain":2,"mix_gain":10,"pa_gain":3,"rf_power":23}, + "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":24}, + "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":25}, + "tx_lut_13":{"dig_gain":2,"mix_gain":12,"pa_gain":3,"rf_power":26}, + "tx_lut_14":{"dig_gain":0,"mix_gain":13,"pa_gain":3,"rf_power":28}, + "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":29} + }, + "gateway_conf": { + "gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + "forward_crc_valid": true, + "forward_crc_error": true, + "forward_crc_disabled": false, + "synch_word": 52, + "autoquit_threshold": 60 + } +} + + 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 99463f6..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 @@ -74,9 +149,9 @@ setup_mtcdt() { if [ "$lora_hw" = "$lora_1_0_hw" ] && [[ ! "$lora_id" =~ .*-SPI ]]; then if [ "$lora_id" = "$lora_mtac_id868" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTCDT_LORA_1_0.EU868 + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_0.EU868 elif [ "$lora_id" = "$lora_mtac_id915" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTCDT_LORA_1_0.US915 + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_0.US915 else echo "No valid configuration found for mtcdt exiting." exit 1 @@ -84,14 +159,15 @@ setup_mtcdt() { ln -sf /opt/lora/basic_pkt_fwd-usb $pkt_fwd else if [ "$lora_id" = "$lora_mtac_h_id868" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTCDT_LORA_1_5.EU868 + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_5.EU868 elif [ "$lora_id" = "$lora_mtac_h_id915" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTCDT_LORA_1_5.US915 + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_5.US915 else echo "No valid configuration found for mtcdt exiting." 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,17 +179,28 @@ 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 } setup_mtcap() { + hw=$(mts-io-sysfs show hw-version 2> /dev/null) + if [ "$lora_id" = "$lora_mtcap_id868" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.EU868 + if [ "$hw" = "MTCAP-0.2" ]; then + GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP2_LORA_1_5.EU868 + else + GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.EU868 + fi elif [ "$lora_id" = "$lora_mtcap_id915" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.US915 + if [ "$hw" = "MTCAP-0.2" ]; then + GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP2_LORA_1_5.US915 + else + GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.US915 + fi else - echo "No valid configuration found for mtcap exiting." - exit 1 + return 1 fi opt_conf_file=$opt_conf_dir/global_conf.json @@ -164,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 @@ -189,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" } @@ -206,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" |