Skip to content

Commit

Permalink
Merge branch 'master' into shawaj/sx1302hal
Browse files Browse the repository at this point in the history
  • Loading branch information
shawaj authored Oct 5, 2021
2 parents 89cfe20 + bf1331e commit 9e29561
Show file tree
Hide file tree
Showing 7 changed files with 348 additions and 28 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ You can typically find the exact region plan you need to use at [What Helium Reg
| AU915 | Australia, New Zealand and South America|
| CN470 | China |
| EU868 | Europe, Middle East and some of Africa |
| EU433 | Parts of Africa and Asia|
| IN865 | India and Pakistan |
| KR920 | South Korea |
| RU864 | Russia |
Expand All @@ -24,4 +25,4 @@ You can typically find the exact region plan you need to use at [What Helium Reg
Please note:
| Region Plan | Region |
| --- | --- |
| EU433 | NOT YET SUPPORTED |
| CN779 | NOT YET SUPPORTED |
3 changes: 2 additions & 1 deletion files/configurePktFwd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import subprocess # nosec (B404)
import os
import json
from hm_hardware_defs.variant import variant_definitions
from hm_pyhelper.hardware_definitions import variant_definitions

from time import sleep

Expand Down Expand Up @@ -84,6 +84,7 @@
"AS923_4": "AS923-4-global_conf.json",
"AU915": "AU-global_conf.json",
"CN470": "CN-global_conf.json",
"EU433": "EU433-global_conf.json",
"EU868": "EU-global_conf.json",
"IN865": "IN-global_conf.json",
"KR920": "KR-global_conf.json",
Expand Down
188 changes: 188 additions & 0 deletions lora_templates_sx1301/EU433-global_conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{

"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1,
"antenna_gain": 0,
"radio_0": {
"enable": true,
"type": "SX1255",
"freq": 434375000,
"rssi_offset": -176.0,
"tx_enable": true,
"tx_freq_min": 433050000,
"tx_freq_max": 434900000
},
"radio_1": {
"enable": true,
"type": "SX1255",
"freq": 433575000,
"rssi_offset": -176.0,
"tx_enable": false
},
"chan_multiSF_0": {
"enable": true,
"radio": 0,
"if": -1200000
},
"chan_multiSF_1": {
"enable": true,
"radio": 0,
"if": -1000000
},
"chan_multiSF_2": {
"enable": true,
"radio": 1,
"if": 0
},
"chan_multiSF_3": {
"enable": false
},
"chan_multiSF_4": {
"enable": false
},
"chan_multiSF_5": {
"enable": false
},
"chan_multiSF_6": {
"enable": false
},
"chan_multiSF_7": {
"enable": false
},
"chan_Lora_std": {
"enable": false
},
"chan_FSK": {
"enable": false,
"radio": 1,
"if": 300000,
"bandwidth": 125000,
"datarate": 50000
},
"tx_lut_0": {
"pa_gain": 0,
"mix_gain": 9,
"rf_power": -6,
"dig_gain": 0
},
"tx_lut_1": {
"pa_gain": 0,
"mix_gain": 12,
"rf_power": -3,
"dig_gain": 0
},
"tx_lut_2": {
"pa_gain": 0,
"mix_gain": 15,
"rf_power": 0,
"dig_gain": 0
},
"tx_lut_3": {
"pa_gain": 1,
"mix_gain": 9,
"rf_power": 3,
"dig_gain": 3
},
"tx_lut_4": {
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 6,
"dig_gain": 3
},
"tx_lut_5": {
"pa_gain": 2,
"mix_gain": 8,
"rf_power": 10,
"dig_gain": 0
},
"tx_lut_6": {
"pa_gain": 2,
"mix_gain": 9,
"rf_power": 11,
"dig_gain": 0
},
"tx_lut_7": {
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 12,
"dig_gain": 1
},
"tx_lut_8": {
"pa_gain": 2,
"mix_gain": 10,
"rf_power": 13,
"dig_gain": 0
},
"tx_lut_9": {
"pa_gain": 2,
"mix_gain": 11,
"rf_power": 14,
"dig_gain": 1
},
"tx_lut_10": {
"pa_gain": 2,
"mix_gain": 12,
"rf_power": 16,
"dig_gain": 0
},
"tx_lut_11": {
"pa_gain": 3,
"mix_gain": 8,
"rf_power": 20,
"dig_gain": 0
},
"tx_lut_12": {
"desc": "TX gain table, index 12",
"pa_gain": 3,
"mix_gain": 11,
"rf_power": 23,
"dig_gain": 0
},
"tx_lut_13": {
"desc": "TX gain table, index 13",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 25,
"dig_gain": 0
},
"tx_lut_14": {
"desc": "TX gain table, index 14",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 26,
"dig_gain": 0
},
"tx_lut_15": {
"desc": "TX gain table, index 15",
"pa_gain": 3,
"mix_gain": 13,
"rf_power": 27,
"dig_gain": 0
}
},
"gateway_conf": {
"server_address": "helium-miner",
"serv_port_up": 1680,
"serv_port_down": 1680,
"servers": [ {
"server_address": "helium-miner",
"serv_port_up": 1680,
"serv_port_down": 1680,
"serv_enabled": true
} ],
"gps": false,
"fake_gps": true,
"ref_latitude": 0,
"ref_longitude": 0,
"ref_altitude": 0,

"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,

"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false
}
}
115 changes: 115 additions & 0 deletions lora_templates_sx1302/EU433-global_conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"SX130x_conf": {
"com_type": "SPI",
"com_path": "/dev/spidev1.2",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0,
"full_duplex": false,
"fine_timestamp": {
"enable": false,
"mode": "all_sf"
},
"radio_0": {
"enable": true,
"type": "SX1250",
"single_input_mode": true,
"freq": 434375000,
"rssi_offset": -207.0,
"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": 433050000,
"tx_freq_max": 434900000,
"tx_gain_lut":[
{"rf_power": -6, "pa_gain": 0, "pwr_idx": 0},
{"rf_power": -3, "pa_gain": 0, "pwr_idx": 1},
{"rf_power": 0, "pa_gain": 0, "pwr_idx": 2},
{"rf_power": 3, "pa_gain": 1, "pwr_idx": 3},
{"rf_power": 6, "pa_gain": 1, "pwr_idx": 4},
{"rf_power": 10, "pa_gain": 1, "pwr_idx": 5},
{"rf_power": 11, "pa_gain": 1, "pwr_idx": 6},
{"rf_power": 12, "pa_gain": 1, "pwr_idx": 7},
{"rf_power": 13, "pa_gain": 1, "pwr_idx": 8},
{"rf_power": 14, "pa_gain": 1, "pwr_idx": 9},
{"rf_power": 16, "pa_gain": 1, "pwr_idx": 10},
{"rf_power": 20, "pa_gain": 1, "pwr_idx": 11},
{"rf_power": 23, "pa_gain": 1, "pwr_idx": 12},
{"rf_power": 25, "pa_gain": 1, "pwr_idx": 13},
{"rf_power": 26, "pa_gain": 1, "pwr_idx": 14},
{"rf_power": 27, "pa_gain": 1, "pwr_idx": 15}
]
},
"radio_1": {
"enable": true,
"type": "SX1250",
"freq": 433575000,
"rssi_offset": -207,
"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": -1200000
},
"chan_multiSF_1": {
"enable": true,
"radio": 0,
"if": -1000000
},
"chan_multiSF_2": {
"enable": true,
"radio": 1,
"if": 0
},
"chan_multiSF_3": {
"enable": false
},
"chan_multiSF_4": {
"enable": false
},
"chan_multiSF_5": {
"enable": false
},
"chan_multiSF_6": {
"enable": false
},
"chan_multiSF_7": {
"enable": false
},
"chan_Lora_std": {
"enable": false
},
"chan_FSK": {
"enable": false,
"radio": 0,
"if": 300000,
"bandwidth": 250000,
"datarate": 100000
}
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",

"server_address": "helium-miner",
"serv_port_up": 1680,
"serv_port_down": 1680,

"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,

"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false
},

"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}
29 changes: 22 additions & 7 deletions lora_templates_sx1302/IN-global_conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,27 @@
"datarate": 100000
}
},
"gateway_conf": {
"gateway_ID": "AA555A0000000000",

"server_address": "helium-miner",
"serv_port_up": 1680,
"serv_port_down": 1680,

"keepalive_interval": 10,
"stat_interval": 30,
"push_timeout_ms": 100,

"forward_crc_valid": true,
"forward_crc_error": false,
"forward_crc_disabled": false
},

"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
"debug_conf": {
"ref_payload":[
{"id": "0xCAFE1234"},
{"id": "0xCAFE2345"}
],
"log_file": "loragw_hal.log"
}
}
Loading

0 comments on commit 9e29561

Please sign in to comment.