Skip to content

Commit c0d7e00

Browse files
ryanteckbrocaar
authored andcommitted
Add Pi Supply LoRa Gateway HAT (#13)
1 parent d63e272 commit c0d7e00

19 files changed

+1787
-5
lines changed

layers/targets/meta-raspberrypi/recipes-core/gateway-config/gateway-config/gateway-config.sh

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ do_setup_admin_password() {
1212
}
1313

1414
do_setup_concentrator_shield() {
15-
FUN=$(dialog --title "Setup LoRa concentrator shield" --menu "Select shield:" 15 60 6 \
15+
FUN=$(dialog --title "Setup LoRa concentrator shield" --menu "Select shield:" 15 60 7 \
1616
1 "IMST - iC880A" \
1717
2 "IMST - iC980A" \
18-
3 "RAK - RAK2245" \
19-
4 "RAK - RAK831" \
20-
5 "RisingHF - RHF0M301" \
21-
6 "Sandbox - LoRaGo PORT" \
18+
3 "Pi Supply - LoRa Gateway HAT" \
19+
4 "RAK - RAK2245" \
20+
5 "RAK - RAK831" \
21+
6 "RisingHF - RHF0M301" \
22+
7 "Sandbox - LoRaGo PORT" \
2223
3>&1 1>&2 2>&3)
2324
RET=$?
2425
if [ $RET -eq 0 ]; then
@@ -29,6 +30,7 @@ do_setup_concentrator_shield() {
2930
4) do_set_concentrator_reset_pin 17 && do_setup_rak831;;
3031
5) do_set_concentrator_reset_pin 7 && do_setup_rhf0m301;;
3132
6) do_set_concentrator_reset_pin 25 && do_setup_lorago_port;;
33+
6) do_set_concentrator_reset_pin 22 && do_setup_pislora;;
3234
esac
3335
fi
3436
}
@@ -79,6 +81,22 @@ do_setup_rak831() {
7981
fi
8082
}
8183

84+
do_setup_pislora() {
85+
FUN=$(dialog --title "Channel-plan configuration" --menu "Select the channel-plan:" 15 60 2 \
86+
1 "EU868" \
87+
3 "US915" \
88+
3>&1 1>&2 2>&3)
89+
RET=$?
90+
if [ $RET -eq 1 ]; then
91+
do_main_menu
92+
elif [ $RET -eq 0 ]; then
93+
case "$FUN" in
94+
1) do_copy_global_conf "pislora" "eu868" && do_copy_loraserver_config "eu868";;
95+
2) do_select_us915_block "pislora";;
96+
esac
97+
fi
98+
}
99+
82100
do_setup_lorago_port() {
83101
FUN=$(dialog --title "Channel-plan configuration" --menu "Select the channel-plan:" 15 60 2 \
84102
1 "EU868" \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"SX1301_conf": {
3+
"lorawan_public": true,
4+
"clksrc": 1,
5+
"antenna_gain": 0,
6+
"radio_0": {
7+
"enable": true,
8+
"type": "SX1257",
9+
"freq": 915600000,
10+
"rssi_offset": -166.0,
11+
"tx_enable": true,
12+
"tx_freq_min": 915000000,
13+
"tx_freq_max": 928000000
14+
},
15+
"radio_1": {
16+
"enable": true,
17+
"type": "SX1257",
18+
"freq": 916300000,
19+
"rssi_offset": -166.0,
20+
"tx_enable": false
21+
},
22+
"chan_multiSF_0": {
23+
"enable": true,
24+
"radio": 0,
25+
"if": -400000
26+
},
27+
"chan_multiSF_1": {
28+
"enable": true,
29+
"radio": 0,
30+
"if": -200000
31+
},
32+
"chan_multiSF_2": {
33+
"enable": true,
34+
"radio": 0,
35+
"if": 0
36+
},
37+
"chan_multiSF_3": {
38+
"enable": true,
39+
"radio": 0,
40+
"if": 200000
41+
},
42+
"chan_multiSF_4": {
43+
"enable": true,
44+
"radio": 1,
45+
"if": -300000
46+
},
47+
"chan_multiSF_5": {
48+
"enable": true,
49+
"radio": 1,
50+
"if": -100000
51+
},
52+
"chan_multiSF_6": {
53+
"enable": true,
54+
"radio": 1,
55+
"if": 100000
56+
},
57+
"chan_multiSF_7": {
58+
"enable": true,
59+
"radio": 1,
60+
"if": 300000
61+
},
62+
"chan_Lora_std": {
63+
"enable": true,
64+
"radio": 0,
65+
"if": 300000,
66+
"bandwidth": 500000,
67+
"spread_factor": 8
68+
},
69+
"chan_FSK": {
70+
"enable": false,
71+
"radio": 0,
72+
"if": 300000,
73+
"bandwidth": 250000,
74+
"datarate": 100000
75+
}
76+
},
77+
78+
"gateway_conf": {
79+
"gateway_ID": "0000000000000000",
80+
"server_address": "localhost",
81+
"serv_port_up": 1700,
82+
"serv_port_down": 1700,
83+
"keepalive_interval": 10,
84+
"stat_interval": 30,
85+
"push_timeout_ms": 100,
86+
"forward_crc_valid": true,
87+
"forward_crc_error": false,
88+
"forward_crc_disabled": false,
89+
"gps_tty_path": "/dev/ttyAMA0",
90+
"beacon_period": 128,
91+
"beacon_freq_hz": 923300000,
92+
"beacon_freq_nb": 8,
93+
"beacon_freq_step": 600000,
94+
"beacon_datarate": 12,
95+
"beacon_bw_hz": 500000,
96+
"beacon_power": 14,
97+
"beacon_infodesc": 0
98+
}
99+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"SX1301_conf": {
3+
"lorawan_public": true,
4+
"clksrc": 1,
5+
"antenna_gain": 0,
6+
"radio_0": {
7+
"enable": true,
8+
"type": "SX1257",
9+
"freq": 917200000,
10+
"rssi_offset": -166.0,
11+
"tx_enable": true,
12+
"tx_freq_min": 915000000,
13+
"tx_freq_max": 928000000
14+
},
15+
"radio_1": {
16+
"enable": true,
17+
"type": "SX1257",
18+
"freq": 917900000,
19+
"rssi_offset": -166.0,
20+
"tx_enable": false
21+
},
22+
"chan_multiSF_0": {
23+
"enable": true,
24+
"radio": 0,
25+
"if": -400000
26+
},
27+
"chan_multiSF_1": {
28+
"enable": true,
29+
"radio": 0,
30+
"if": -200000
31+
},
32+
"chan_multiSF_2": {
33+
"enable": true,
34+
"radio": 0,
35+
"if": 0
36+
},
37+
"chan_multiSF_3": {
38+
"enable": true,
39+
"radio": 0,
40+
"if": 200000
41+
},
42+
"chan_multiSF_4": {
43+
"enable": true,
44+
"radio": 1,
45+
"if": -300000
46+
},
47+
"chan_multiSF_5": {
48+
"enable": true,
49+
"radio": 1,
50+
"if": -100000
51+
},
52+
"chan_multiSF_6": {
53+
"enable": true,
54+
"radio": 1,
55+
"if": 100000
56+
},
57+
"chan_multiSF_7": {
58+
"enable": true,
59+
"radio": 1,
60+
"if": 300000
61+
},
62+
"chan_Lora_std": {
63+
"enable": true,
64+
"radio": 0,
65+
"if": 300000,
66+
"bandwidth": 500000,
67+
"spread_factor": 8
68+
},
69+
"chan_FSK": {
70+
"enable": false,
71+
"radio": 0,
72+
"if": 300000,
73+
"bandwidth": 250000,
74+
"datarate": 100000
75+
}
76+
},
77+
78+
"gateway_conf": {
79+
"gateway_ID": "0000000000000000",
80+
"server_address": "localhost",
81+
"serv_port_up": 1700,
82+
"serv_port_down": 1700,
83+
"keepalive_interval": 10,
84+
"stat_interval": 30,
85+
"push_timeout_ms": 100,
86+
"forward_crc_valid": true,
87+
"forward_crc_error": false,
88+
"forward_crc_disabled": false,
89+
"gps_tty_path": "/dev/ttyAMA0",
90+
"beacon_period": 128,
91+
"beacon_freq_hz": 923300000,
92+
"beacon_freq_nb": 8,
93+
"beacon_freq_step": 600000,
94+
"beacon_datarate": 12,
95+
"beacon_bw_hz": 500000,
96+
"beacon_power": 14,
97+
"beacon_infodesc": 0
98+
}
99+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"SX1301_conf": {
3+
"lorawan_public": true,
4+
"clksrc": 1,
5+
"antenna_gain": 0,
6+
"radio_0": {
7+
"enable": true,
8+
"type": "SX1257",
9+
"freq": 918800000,
10+
"rssi_offset": -166.0,
11+
"tx_enable": true,
12+
"tx_freq_min": 915000000,
13+
"tx_freq_max": 928000000
14+
},
15+
"radio_1": {
16+
"enable": true,
17+
"type": "SX1257",
18+
"freq": 919500000,
19+
"rssi_offset": -166.0,
20+
"tx_enable": false
21+
},
22+
"chan_multiSF_0": {
23+
"enable": true,
24+
"radio": 0,
25+
"if": -400000
26+
},
27+
"chan_multiSF_1": {
28+
"enable": true,
29+
"radio": 0,
30+
"if": -200000
31+
},
32+
"chan_multiSF_2": {
33+
"enable": true,
34+
"radio": 0,
35+
"if": 0
36+
},
37+
"chan_multiSF_3": {
38+
"enable": true,
39+
"radio": 0,
40+
"if": 200000
41+
},
42+
"chan_multiSF_4": {
43+
"enable": true,
44+
"radio": 1,
45+
"if": -300000
46+
},
47+
"chan_multiSF_5": {
48+
"enable": true,
49+
"radio": 1,
50+
"if": -100000
51+
},
52+
"chan_multiSF_6": {
53+
"enable": true,
54+
"radio": 1,
55+
"if": 100000
56+
},
57+
"chan_multiSF_7": {
58+
"enable": true,
59+
"radio": 1,
60+
"if": 300000
61+
},
62+
"chan_Lora_std": {
63+
"enable": true,
64+
"radio": 0,
65+
"if": 300000,
66+
"bandwidth": 500000,
67+
"spread_factor": 8
68+
},
69+
"chan_FSK": {
70+
"enable": false,
71+
"radio": 0,
72+
"if": 300000,
73+
"bandwidth": 250000,
74+
"datarate": 100000
75+
}
76+
},
77+
78+
"gateway_conf": {
79+
"gateway_ID": "0000000000000000",
80+
"server_address": "localhost",
81+
"serv_port_up": 1700,
82+
"serv_port_down": 1700,
83+
"keepalive_interval": 10,
84+
"stat_interval": 30,
85+
"push_timeout_ms": 100,
86+
"forward_crc_valid": true,
87+
"forward_crc_error": false,
88+
"forward_crc_disabled": false,
89+
"gps_tty_path": "/dev/ttyAMA0",
90+
"beacon_period": 128,
91+
"beacon_freq_hz": 923300000,
92+
"beacon_freq_nb": 8,
93+
"beacon_freq_step": 600000,
94+
"beacon_datarate": 12,
95+
"beacon_bw_hz": 500000,
96+
"beacon_power": 14,
97+
"beacon_infodesc": 0
98+
}
99+
}

0 commit comments

Comments
 (0)