helium / sx1302_hal

SX1302 Hardware Abstraction Layer and Tools (packet forwarder...)
Other
38 stars 45 forks source link

Add missing configs #4

Closed JayKickliter closed 3 years ago

JayKickliter commented 3 years ago

This PR adds three new configs:

That last is actually a rename and modification of what was originally called CN490 in this repo, but in the hopes of making the diff cleaner I deleted CN490 config before adding CN470.

Diffs

Since we can use gihub diff browser across two different codebases, here's a manual diff of this repos EU868 and US915 configs against their counterparts in the other codebase we're migrating from:

diff --git a/old_global_conf.EU868.json b/global_conf.json.sx1250.EU868
index bc017c5..00ee70e 100644
--- a/old_global_conf.EU868.json
+++ b/global_conf.json.sx1250.EU868
@@ -14,7 +14,7 @@
             "enable": true,
             "type": "SX1250",
             "freq": 867500000,
-            "rssi_offset": -207,
+            "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,
@@ -42,66 +42,23 @@
             "enable": true,
             "type": "SX1250",
             "freq": 868500000,
-            "rssi_offset": -207,
+            "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_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": {
-            /* disabled */
-            "enable": false,
-            "radio": 0,
-            "if": 300000,
-            "bandwidth": 250000,
-            "datarate": 100000
-        }
+        "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": {
         "gps_i2c_path": "/dev/i2c-1",
         "gateway_ID": "AA555A0000000000",
diff --git a/old_global_conf.US915.json b/global_conf.json.sx1250.US915
index 09c65ec..087adff 100644
--- a/old_global_conf.US915.json
+++ b/global_conf.json.sx1250.US915
@@ -111,6 +111,7 @@
             "datarate": 100000
         }
     },
+
     "gateway_conf": {
         "gps_i2c_path": "/dev/i2c-1",
         "gateway_ID": "AA555A0000000000",