diff options
author | Harsh Sharma <harsh.sharma@multitech.com> | 2021-04-20 11:15:31 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2021-06-22 09:31:36 -0500 |
commit | d6f6aead955b0b719093f50755cec44a33de256d (patch) | |
tree | fe36fc48d6e4ff872fbfcf73d3aeda44609f9d7b /recipes-connectivity/lora/lora-packet-forwarder | |
parent | 87fe786148bbf3bc616f6393bc742cd2fee83818 (diff) | |
download | meta-mlinux-d6f6aead955b0b719093f50755cec44a33de256d.tar.gz meta-mlinux-d6f6aead955b0b719093f50755cec44a33de256d.tar.bz2 meta-mlinux-d6f6aead955b0b719093f50755cec44a33de256d.zip |
Updated lora recipes to support temperature compensation
Diffstat (limited to 'recipes-connectivity/lora/lora-packet-forwarder')
3 files changed, 162 insertions, 6 deletions
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 c514e18..e475204 100755 --- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init +++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init @@ -188,16 +188,22 @@ setup_mtcap() { hw=$(mts-io-sysfs show hw-version 2> /dev/null) if [ "$lora_id" = "$lora_mtcap_id868" ]; then - if [ "$hw" = "MTCAP-0.2" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP2_LORA_1_5.EU868 - else + if [ "$hw" = "MTCAP-0.1" ]; then 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.2" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP2_LORA_1_5.US915 - else + 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 diff --git a/recipes-connectivity/lora/lora-packet-forwarder/temp_lut.json.MTCAP2.EU868 b/recipes-connectivity/lora/lora-packet-forwarder/temp_lut.json.MTCAP2.EU868 new file mode 100644 index 0000000..39aa8f5 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/temp_lut.json.MTCAP2.EU868 @@ -0,0 +1,75 @@ +{
+"LUT-BASE": {
+"tx_lut_0":{"rf_power": 0, "pa_gain": 0, "mix_gain": 12, "dig_gain": 0},
+"tx_lut_1":{"rf_power": 1, "pa_gain": 0, "mix_gain": 13, "dig_gain": 0},
+"tx_lut_2":{"rf_power": 2, "pa_gain": 0, "mix_gain": 14, "dig_gain": 0},
+"tx_lut_3":{"rf_power": 3, "pa_gain": 0, "mix_gain": 15, "dig_gain": 0},
+"tx_lut_4":{"rf_power": 4, "pa_gain": 1, "mix_gain": 8, "dig_gain": 0},
+"tx_lut_5":{"rf_power": 5, "pa_gain": 1, "mix_gain": 10, "dig_gain": 0},
+"tx_lut_6":{"rf_power": 6, "pa_gain": 1, "mix_gain": 11, "dig_gain": 0},
+"tx_lut_7":{"rf_power": 7, "pa_gain": 1, "mix_gain": 14, "dig_gain": 0},
+"tx_lut_8":{"rf_power": 8, "pa_gain": 2, "mix_gain": 8, "dig_gain": 0},
+"tx_lut_9":{"rf_power": 9, "pa_gain": 2, "mix_gain": 9, "dig_gain": 0},
+"tx_lut_10":{"rf_power": 10, "pa_gain": 2, "mix_gain": 10, "dig_gain": 0},
+"tx_lut_11":{"rf_power": 11, "pa_gain": 2, "mix_gain": 12, "dig_gain": 0},
+"tx_lut_12":{"rf_power": 12, "pa_gain": 2, "mix_gain": 13, "dig_gain": 0},
+"tx_lut_13":{"rf_power": 13, "pa_gain": 2, "mix_gain": 15, "dig_gain": 0},
+"tx_lut_14":{"rf_power": 14, "pa_gain": 3, "mix_gain": 9, "dig_gain": 0},
+"tx_lut_15":{"rf_power": 15, "pa_gain": 3, "mix_gain": 11, "dig_gain": 0}
+},
+"LUT-40": [
+2.8,2.8,1.8,0.1,3.5,3.0,2.9,1.1,4.2,3.6,3.2,2.2,4.7,4.3,3.8,3.0,
+99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,
+17.1,16.1,14.8,11.4,18.8,17.9,16.9,13.8,20.1,19.4,18.4,15.4,22.6,21.8,20.9,18.4,
+23.9,23.2,22.2,19.8,25.6,25.1,24.4,22.1,28.2,27.8,27.1,23.9,29.4,29.1,28.8,27.4
+],
+"LUT-29": [
+2.6,2.6,1.6,0.0,3.2,3.0,2.5,1.1,4.0,3.5,3.1,1.9,4.5,4.2,3.6,2.6,
+99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,
+16.6,15.7,14.4,10.9,18.4,17.6,16.6,13.3,19.9,19.1,18.1,15.2,22.1,21.4,20.6,17.9,
+23.6,22.8,21.9,19.4,25.4,24.9,24.2,21.9,28.1,27.6,26.8,23.6,29.2,28.9,28.6,27.1
+],
+"LUT-19": [
+2.4,1.9,2.4,-0.2,3.0,2.6,2.1,0.7,3.6,3.2,3.0,1.6,4.3,4.0,3.5,2.2,
+99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,
+16.2,15.2,14.1,10.4,17.9,17.1,16.1,12.8,19.4,18.6,17.6,14.6,21.9,20.9,19.9,17.4,
+23.4,22.4,21.4,18.9,25.1,24.6,23.9,21.4,27.9,27.2,26.2,22.9,29.1,28.9,28.4,26.8
+],
+"LUT-9": [
+2.1,1.8,1.1,-0.6,2.9,2.5,1.9,0.5,3.5,3.0,2.5,1.4,4.2,3.8,3.1,2.2,
+99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,
+15.9,14.8,13.7,10.2,17.8,16.9,15.8,12.3,19.1,18.4,17.4,14.3,21.6,20.6,19.8,17.1,
+22.9,22.1,21.1,18.6,24.9,24.2,23.6,21.1,27.6,26.9,26.1,22.6,28.9,28.6,28.2,26.4
+],
+"LUT2": [
+1.8,1.2,0.7,-1.1,2.5,2.0,1.6,-0.0,3.0,2.6,2.2,0.9,3.8,3.2,2.9,1.8,
+7.8,6.8,5.3,1.9,11.2,10.4,9.2,6.0,13.1,11.9,10.8,8.1,99.9,99.9,99.9,99.9,
+15.3,14.2,13.1,9.6,17.2,16.2,15.1,11.8,18.6,17.6,16.6,13.6,20.9,20.1,19.1,16.4,
+22.4,21.6,20.6,18.1,24.4,23.9,23.1,20.6,27.2,26.4,25.2,21.9,28.8,28.4,27.9,25.9
+],
+"LUT21": [
+1.1,0.7,-0.0,-2.0,1.9,1.4,0.9,-0.7,2.5,2.1,1.6,0.1,3.1,2.8,2.2,1.1,
+6.3,5.2,4.0,0.7,9.7,8.8,7.8,4.7,11.1,10.2,9.3,6.7,14.6,13.8,13.1,10.9,
+14.1,13.2,11.8,8.2,16.1,15.1,13.9,10.7,17.6,16.8,15.7,12.4,19.9,19.1,17.9,15.2,
+21.4,20.4,19.6,16.9,23.6,22.9,22.1,19.4,26.4,25.4,24.1,20.4,28.1,27.9,27.2,24.6
+],
+"LUT40": [
+0.7,-0.0,-0.6,-2.8,1.4,0.9,0.2,-1.4,2.0,1.6,1.1,-0.6,2.6,2.2,1.8,0.3,
+5.5,4.2,3.0,-0.4,8.8,8.0,6.8,3.5,10.2,9.3,8.4,5.5,13.4,12.8,12.1,9.9,
+13.2,12.1,10.6,7.2,15.2,14.2,12.9,9.6,16.6,15.8,14.7,11.4,19.1,18.1,17.1,14.4,
+20.6,19.6,18.6,15.9,22.9,21.9,21.1,18.6,25.1,24.4,22.9,19.2,27.6,27.2,26.4,23.4
+],
+"LUT58": [
+-0.0,-0.7,-1.2,-3.6,0.8,0.2,-0.3,-2.2,1.4,0.9,0.5,-1.2,2.0,1.6,1.1,-0.2,
+4.5,3.1,1.9,-1.6,7.8,7.0,5.8,2.5,9.2,8.4,7.5,4.5,12.7,12.1,11.3,9.1,
+12.2,10.8,9.7,6.2,14.2,13.1,11.8,8.3,15.7,14.7,13.6,10.2,18.1,17.1,16.1,13.2,
+19.6,18.6,17.6,14.8,21.9,21.2,20.2,17.6,24.1,22.9,21.6,17.8,27.1,26.2,25.2,22.1
+],
+"LUT77": [
+-0.9,-1.4,-2.2,-4.8,-0.0,-0.6,-1.1,-3.2,0.8,0.2,-0.3,-2.1,1.2,0.8,0.3,-1.1,
+3.5,1.9,0.6,-3.0,6.7,5.7,4.5,1.1,8.2,7.3,6.2,3.1,11.7,11.1,10.2,7.8,
+11.2,9.6,8.2,4.8,12.9,11.8,10.4,7.0,14.6,13.4,12.2,8.9,16.9,15.9,14.8,11.8,
+18.4,17.4,16.4,13.6,20.9,20.1,19.1,16.4,22.8,21.4,20.1,16.4,26.1,25.1,23.9,20.6
+]
+}
+
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/temp_lut.json.MTCAP2.US915 b/recipes-connectivity/lora/lora-packet-forwarder/temp_lut.json.MTCAP2.US915 new file mode 100644 index 0000000..08d5e33 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/temp_lut.json.MTCAP2.US915 @@ -0,0 +1,75 @@ +{
+"LUT-BASE": {
+"tx_lut_0":{"rf_power": 0, "pa_gain": 0, "mix_gain": 13, "dig_gain": 0},
+"tx_lut_1":{"rf_power": 1, "pa_gain": 0, "mix_gain": 15, "dig_gain": 0},
+"tx_lut_2":{"rf_power": 2, "pa_gain": 1, "mix_gain": 8, "dig_gain": 0},
+"tx_lut_3":{"rf_power": 3, "pa_gain": 1, "mix_gain": 9, "dig_gain": 0},
+"tx_lut_4":{"rf_power": 4, "pa_gain": 1, "mix_gain": 10, "dig_gain": 0},
+"tx_lut_5":{"rf_power": 5, "pa_gain": 1, "mix_gain": 11, "dig_gain": 0},
+"tx_lut_6":{"rf_power": 6, "pa_gain": 1, "mix_gain": 14, "dig_gain": 0},
+"tx_lut_7":{"rf_power": 7, "pa_gain": 2, "mix_gain": 8, "dig_gain": 0},
+"tx_lut_8":{"rf_power": 8, "pa_gain": 2, "mix_gain": 9, "dig_gain": 0},
+"tx_lut_9":{"rf_power": 9, "pa_gain": 2, "mix_gain": 10, "dig_gain": 0},
+"tx_lut_10":{"rf_power": 10, "pa_gain": 2, "mix_gain": 11, "dig_gain": 0},
+"tx_lut_11":{"rf_power": 11, "pa_gain": 2, "mix_gain": 12, "dig_gain": 0},
+"tx_lut_12":{"rf_power": 12, "pa_gain": 2, "mix_gain": 13, "dig_gain": 0},
+"tx_lut_13":{"rf_power": 13, "pa_gain": 3, "mix_gain": 8, "dig_gain": 0},
+"tx_lut_14":{"rf_power": 14, "pa_gain": 3, "mix_gain": 10, "dig_gain": 0},
+"tx_lut_15":{"rf_power": 15, "pa_gain": 3, "mix_gain": 13, "dig_gain": 0}
+},
+"LUT-40": [
+2.5,2.4,2.0,1.7,2.8,2.7,2.5,2.1,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,
+99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,17.2,16.3,15.3,12.2,
+18.8,18.0,17.1,14.3,20.1,21.6,21.1,15.9,22.5,22.4,21.9,21.1,23.4,22.8,22.8,22.1,
+23.6,23.4,23.2,22.3,28.3,27.7,26.9,23.4,30.0,30.1,29.9,29.6,30.6,30.6,30.6,30.5
+],
+"LUT-30": [
+2.2,2.1,1.8,1.4,2.7,2.7,2.3,2.0,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,
+99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,16.6,15.7,14.7,11.5,
+18.2,17.4,16.4,13.7,19.6,21.2,17.8,19.3,22.2,22.1,21.2,20.5,22.8,22.5,21.9,21.4,
+23.6,23.2,23.0,22.1,27.9,27.0,26.0,22.6,30.0,29.3,28.8,29.4,30.5,30.5,30.5,30.4
+],
+"LUT-20": [
+2.1,1.9,1.8,1.3,2.4,2.2,2.0,1.6,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,
+99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,15.9,15.1,13.9,10.7,
+17.6,16.8,15.8,12.9,18.9,18.2,17.2,14.5,21.7,21.4,20.7,19.5,22.3,22.1,21.7,20.4,
+23.1,22.5,22.5,21.6,27.2,26.4,25.3,21.7,29.4,28.9,28.2,25.8,30.4,30.4,30.3,30.1
+],
+"LUT-10": [
+1.8,1.4,1.2,0.9,2.3,2.1,1.9,1.4,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,
+99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,99.9,15.5,14.3,13.3,10.0,
+17.0,16.2,15.1,12.2,18.3,17.5,16.5,13.9,19.7,20.8,18.1,19.6,21.5,21.3,21.6,19.9,
+22.3,22.0,22.0,20.9,26.6,25.7,24.4,20.9,29.0,28.5,27.7,25.1,30.2,30.3,30.2,30.1
+],
+"LUT1": [
+1.2,1.2,0.9,0.2,2.0,1.6,1.5,0.9,6.7,5.9,4.8,1.3,8.6,7.5,6.7,3.7,
+10.2,8.9,8.1,5.1,12.7,9.9,9.8,6.8,99.9,99.9,99.9,99.9,14.6,13.7,12.5,9.2,
+16.3,15.6,14.5,11.4,17.8,16.8,15.9,13.1,19.1,18.3,17.4,14.8,21.0,21.1,20.6,19.8,
+21.9,21.7,21.5,20.4,26.0,24.8,23.6,19.9,28.6,27.9,27.0,24.2,30.0,29.9,30.1,29.7
+],
+"LUT20": [
+0.7,0.5,0.2,-0.2,1.2,1.0,0.8,0.2,5.4,4.3,3.0,0.0,7.0,6.2,5.1,2.1,
+8.2,7.4,6.6,3.6,9.4,8.8,7.9,5.5,12.3,12.4,11.8,11.3,13.3,12.5,11.0,7.7,
+15.0,14.2,13.1,9.9,16.4,15.6,14.6,11.6,17.9,17.1,16.1,13.4,19.2,18.5,17.5,15.0,
+21.0,20.5,20.2,19.4,24.4,23.3,22.0,18.3,27.5,26.8,25.8,22.6,29.7,29.5,29.6,29.2
+],
+"LUT39": [
+-0.6,-0.8,-1.3,-2.6,0.4,0.1,-0.2,-1.0,3.9,2.6,1.5,-1.9,5.5,4.7,3.5,0.4,
+6.8,6.0,5.0,2.1,8.2,7.4,6.5,4.0,11.2,10.6,10.7,9.9,11.9,10.7,9.4,6.1,
+13.8,12.6,11.5,8.2,15.0,14.2,13.1,10.0,16.4,15.6,14.7,11.8,18.0,17.1,16.1,13.5,
+19.5,18.8,18.0,16.0,22.7,21.4,20.1,16.5,26.0,25.3,24.1,20.8,29.1,28.8,28.5,27.2
+],
+"LUT57": [
+-1.3,-1.8,-2.6,-4.2,-0.5,-0.7,-1.0,-2.1,2.8,1.3,0.0,-3.5,4.2,3.1,2.0,-1.2,
+5.5,4.7,3.6,0.5,6.8,6.1,5.2,2.3,9.7,9.3,8.8,7.0,10.7,9.1,7.8,4.4,
+12.2,11.3,9.9,6.6,13.6,12.7,11.8,8.5,15.2,14.3,13.3,10.3,16.6,15.8,14.8,12.1,
+18.2,17.3,16.2,13.6,21.3,19.7,18.4,14.8,24.7,23.7,22.5,18.9,28.3,28.0,27.7,25.7
+],
+"LUT77": [
+-2.4,-2.9,-3.6,-5.5,-1.2,-1.6,-2.0,-3.6,1.2,-0.5,-1.9,-5.2,2.7,1.5,0.3,-3.0,
+4.1,3.1,2.0,-1.0,5.6,4.6,3.6,0.6,8.7,8.1,7.4,5.2,9.3,7.5,6.3,2.7,
+10.7,9.5,8.2,4.8,12.0,11.1,9.9,6.6,13.6,12.7,11.6,8.6,15.1,14.3,13.2,10.3,
+16.6,15.6,14.7,12.0,19.7,18.1,16.4,12.7,22.8,21.8,20.5,16.9,27.5,26.7,25.6,22.8
+]
+}
+
|