diff options
Diffstat (limited to 'recipes-connectivity/lora/lora-basic-station')
6 files changed, 159 insertions, 3 deletions
diff --git a/recipes-connectivity/lora/lora-basic-station/lora-basic-station.init b/recipes-connectivity/lora/lora-basic-station/lora-basic-station.init index 45c6eee..80582d9 100755 --- a/recipes-connectivity/lora/lora-basic-station/lora-basic-station.init +++ b/recipes-connectivity/lora/lora-basic-station/lora-basic-station.init @@ -73,12 +73,22 @@ setup_mtcdt() { ln -sf /dev/spidev32765.2 /dev/spidev0.0 fi - ln -sf /opt/lora/station $pkt_fwd + ln -sf $opt_conf_dir/station $pkt_fwd } setup_mtcap() { - ln -sf /opt/lora/station $pkt_fwd + ln -sf $opt_conf_dir/station $pkt_fwd + + if [ "$lora_id" = "$lora_mtcap_id868" ]; then + if [ "$lora_hw" = "MTCAP-0.3" ]; then + cp $opt_conf_dir/temp_lut.json.MTCAP2.EU868 $run_dir/1/temp_lut.json + fi + elif [ "$lora_id" = "$lora_mtcap_id915" ]; then + if [ "$lora_hw" = "MTCAP-0.3" ]; then + cp $opt_conf_dir/temp_lut.json.MTCAP2.US915 $run_dir/1/temp_lut.json + fi + fi } setup_mtcdt_2_1() { @@ -113,7 +123,7 @@ do_start() { cp $tc_key_file $run_dir/1/ cp $tc_trust_file $run_dir/1/ - sed -i.bak "s/\(.*routerid\"\s*\:\s*\"\)<.*>[^\"]*\(.*\)/\1${lora_eui_raw}\2/g" /var/run/lora/1/station.conf + sed -i.bak "s/\(.*routerid\"\s*\:\s*\"\)<.*>[^\"]*\(.*\)/\1${lora_eui_raw}\2/g" $run_dir/1/station.conf # # start packet forwarder diff --git a/recipes-connectivity/lora/lora-basic-station/mtcap-station.conf b/recipes-connectivity/lora/lora-basic-station/mtcap-station.conf index baa9793..e8dd783 100644 --- a/recipes-connectivity/lora/lora-basic-station/mtcap-station.conf +++ b/recipes-connectivity/lora/lora-basic-station/mtcap-station.conf @@ -2,6 +2,7 @@ "SX1301_conf": { "lorawan_public": true, "clksrc": 0, + "antenna_gain": 3, "pps": true, "device": "/dev/spidev0.0", "chan_FSK": {"bandwidth": 125000, "datarate": 50000, "enable": true, "if": 300000, "radio": 0}, diff --git a/recipes-connectivity/lora/lora-basic-station/mtcap2-station.conf b/recipes-connectivity/lora/lora-basic-station/mtcap2-station.conf new file mode 100644 index 0000000..0044771 --- /dev/null +++ b/recipes-connectivity/lora/lora-basic-station/mtcap2-station.conf @@ -0,0 +1,48 @@ +{ + "SX1301_conf": { + "lorawan_public": true, + "clksrc": 0, + "antenna_gain": 3, + "pps": true, + "device": "/dev/spidev0.0", + "chan_FSK": {"bandwidth": 125000, "datarate": 50000, "enable": true, "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}, + "radio_0": {"enable": true, "freq": 923600000, "rssi_offset": -162, "tx_enable": true, "type": "SX1257"}, + "radio_1": {"enable": true, "freq": 922600000, "rssi_offset": -162, "tx_enable": false, "type": "SX1257"}, + "tx_gain_lut": [ +{"rf_power": 8, "pa_gain": 2, "mix_gain": 8, "dig_gain": 3, "dac_gain": 3}, +{"rf_power": 9, "pa_gain": 1, "mix_gain": 11, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 10, "pa_gain": 1, "mix_gain": 11, "dig_gain": 1, "dac_gain": 3}, +{"rf_power": 11, "pa_gain": 1, "mix_gain": 11, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 12, "pa_gain": 1, "mix_gain": 13, "dig_gain": 1, "dac_gain": 3}, +{"rf_power": 13, "pa_gain": 1, "mix_gain": 14, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 14, "pa_gain": 2, "mix_gain": 11, "dig_gain": 3, "dac_gain": 3}, +{"rf_power": 15, "pa_gain": 2, "mix_gain": 8, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 16, "pa_gain": 2, "mix_gain": 12, "dig_gain": 3, "dac_gain": 3}, +{"rf_power": 17, "pa_gain": 2, "mix_gain": 11, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 22, "pa_gain": 3, "mix_gain": 8, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 23, "pa_gain": 3, "mix_gain": 8, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 24, "pa_gain": 3, "mix_gain": 8, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 25, "pa_gain": 3, "mix_gain": 8, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 26, "pa_gain": 3, "mix_gain": 9, "dig_gain": 1, "dac_gain": 3}, +{"rf_power": 27, "pa_gain": 3, "mix_gain": 9, "dig_gain": 0, "dac_gain": 3} + ] + }, + "station_conf": { + "routerid": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>", + "euiprefix": "::0", + "log_file": "stderr", + "log_level": "INFO", + "log_size": 100000, + "log_rotate": 3, + "TC_TIMEOUT": "2s" + } +} diff --git a/recipes-connectivity/lora/lora-basic-station/mtcap2-station.conf.EU868 b/recipes-connectivity/lora/lora-basic-station/mtcap2-station.conf.EU868 new file mode 100644 index 0000000..3c4e488 --- /dev/null +++ b/recipes-connectivity/lora/lora-basic-station/mtcap2-station.conf.EU868 @@ -0,0 +1,48 @@ +{ + "SX1301_conf": { + "lorawan_public": true, + "clksrc": 0, + "antenna_gain": 3, + "pps": true, + "device": "/dev/spidev0.0", + "chan_FSK": {"bandwidth": 125000, "datarate": 50000, "enable": true, "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}, + "radio_0": {"enable": true, "freq": 923600000, "rssi_offset": -162, "tx_enable": true, "type": "SX1257"}, + "radio_1": {"enable": true, "freq": 922600000, "rssi_offset": -162, "tx_enable": false, "type": "SX1257"}, + "tx_gain_lut": [ +{"rf_power": 9, "pa_gain": 1, "mix_gain": 8, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 10, "pa_gain": 2, "mix_gain": 8, "dig_gain": 3, "dac_gain": 3}, +{"rf_power": 11, "pa_gain": 1, "mix_gain": 11, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 12, "pa_gain": 1, "mix_gain": 11, "dig_gain": 1, "dac_gain": 3}, +{"rf_power": 13, "pa_gain": 1, "mix_gain": 11, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 14, "pa_gain": 1, "mix_gain": 13, "dig_gain": 1, "dac_gain": 3}, +{"rf_power": 15, "pa_gain": 1, "mix_gain": 14, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 16, "pa_gain": 2, "mix_gain": 11, "dig_gain": 3, "dac_gain": 3}, +{"rf_power": 17, "pa_gain": 2, "mix_gain": 8, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 18, "pa_gain": 2, "mix_gain": 12, "dig_gain": 3, "dac_gain": 3}, +{"rf_power": 19, "pa_gain": 2, "mix_gain": 11, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 20, "pa_gain": 2, "mix_gain": 11, "dig_gain": 1, "dac_gain": 3}, +{"rf_power": 21, "pa_gain": 2, "mix_gain": 11, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 22, "pa_gain": 2, "mix_gain": 12, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 23, "pa_gain": 2, "mix_gain": 14, "dig_gain": 1, "dac_gain": 3}, +{"rf_power": 24, "pa_gain": 2, "mix_gain": 15, "dig_gain": 0, "dac_gain": 3} + ] + }, + "station_conf": { + "routerid": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>", + "euiprefix": "::0", + "log_file": "stderr", + "log_level": "INFO", + "log_size": 100000, + "log_rotate": 3, + "TC_TIMEOUT": "2s" + } +} diff --git a/recipes-connectivity/lora/lora-basic-station/mtcap2-station.conf.US915 b/recipes-connectivity/lora/lora-basic-station/mtcap2-station.conf.US915 new file mode 100644 index 0000000..0044771 --- /dev/null +++ b/recipes-connectivity/lora/lora-basic-station/mtcap2-station.conf.US915 @@ -0,0 +1,48 @@ +{ + "SX1301_conf": { + "lorawan_public": true, + "clksrc": 0, + "antenna_gain": 3, + "pps": true, + "device": "/dev/spidev0.0", + "chan_FSK": {"bandwidth": 125000, "datarate": 50000, "enable": true, "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}, + "radio_0": {"enable": true, "freq": 923600000, "rssi_offset": -162, "tx_enable": true, "type": "SX1257"}, + "radio_1": {"enable": true, "freq": 922600000, "rssi_offset": -162, "tx_enable": false, "type": "SX1257"}, + "tx_gain_lut": [ +{"rf_power": 8, "pa_gain": 2, "mix_gain": 8, "dig_gain": 3, "dac_gain": 3}, +{"rf_power": 9, "pa_gain": 1, "mix_gain": 11, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 10, "pa_gain": 1, "mix_gain": 11, "dig_gain": 1, "dac_gain": 3}, +{"rf_power": 11, "pa_gain": 1, "mix_gain": 11, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 12, "pa_gain": 1, "mix_gain": 13, "dig_gain": 1, "dac_gain": 3}, +{"rf_power": 13, "pa_gain": 1, "mix_gain": 14, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 14, "pa_gain": 2, "mix_gain": 11, "dig_gain": 3, "dac_gain": 3}, +{"rf_power": 15, "pa_gain": 2, "mix_gain": 8, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 16, "pa_gain": 2, "mix_gain": 12, "dig_gain": 3, "dac_gain": 3}, +{"rf_power": 17, "pa_gain": 2, "mix_gain": 11, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 22, "pa_gain": 3, "mix_gain": 8, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 23, "pa_gain": 3, "mix_gain": 8, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 24, "pa_gain": 3, "mix_gain": 8, "dig_gain": 2, "dac_gain": 3}, +{"rf_power": 25, "pa_gain": 3, "mix_gain": 8, "dig_gain": 0, "dac_gain": 3}, +{"rf_power": 26, "pa_gain": 3, "mix_gain": 9, "dig_gain": 1, "dac_gain": 3}, +{"rf_power": 27, "pa_gain": 3, "mix_gain": 9, "dig_gain": 0, "dac_gain": 3} + ] + }, + "station_conf": { + "routerid": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>", + "euiprefix": "::0", + "log_file": "stderr", + "log_level": "INFO", + "log_size": 100000, + "log_rotate": 3, + "TC_TIMEOUT": "2s" + } +} diff --git a/recipes-connectivity/lora/lora-basic-station/mtcdt-station.conf b/recipes-connectivity/lora/lora-basic-station/mtcdt-station.conf index 8cfa72d..11f6108 100644 --- a/recipes-connectivity/lora/lora-basic-station/mtcdt-station.conf +++ b/recipes-connectivity/lora/lora-basic-station/mtcdt-station.conf @@ -2,6 +2,7 @@ "SX1301_conf": { "lorawan_public": true, "clksrc": 0, + "antenna_gain": 3, "pps": true, "device": "/dev/spidev0.0", "chan_FSK": {"bandwidth": 125000, "datarate": 50000, "enable": true, "if": 300000, "radio": 0}, |