Skip to content

Commit 82e46e6

Browse files
committed
Update gateway-config with additional region configs.
1 parent 3b86508 commit 82e46e6

File tree

8 files changed

+74
-15
lines changed

8 files changed

+74
-15
lines changed

meta/recipes-bsp/bootfiles/rpi-config_%.bbappend

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ do_deploy_append() {
55
echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bootfiles/config.txt
66

77
# Needed as some boards (e.g. RisingHF) use GPIO 7 for reset.
8-
echo "dtoverlay=spi0-1cs" >>${DEPLOYDIR}/bootfiles/config.txt
8+
echo "# Uncomment the line below when shield uses PIN26 as GPIO7" >>${DEPLOYDIR}/bootfiles/config.txt
9+
echo "#dtoverlay=spi0-1cs" >>${DEPLOYDIR}/bootfiles/config.txt
910
}
1011

1112
do_deploy_append_raspberrypi3() {

meta/recipes-chirpstack/chirpstack-concentratord/chirpstack-concentratord_3.3.1.bb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ SRC_URI = "\
2323
file://sx1301/au915_7.toml \
2424
file://sx1301/eu868.toml \
2525
file://sx1301/eu868_0.toml \
26+
file://sx1301/in865.toml \
27+
file://sx1301/in865_0.toml \
28+
file://sx1301/ru864.toml \
29+
file://sx1301/ru864_0.toml \
2630
file://sx1301/us915.toml \
2731
file://sx1301/us915_0.toml \
2832
file://sx1301/us915_1.toml \

meta/recipes-chirpstack/chirpstack-concentratord/files/sx1301/in865.toml

Whitespace-only changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# LoRa concentrator configuration.
2+
[gateway.concentrator]
3+
4+
# Multi spreading-factor channels (LoRa).
5+
multi_sf_channels=[
6+
865062500,
7+
865402500,
8+
865985000,
9+
0,
10+
0,
11+
0,
12+
0,
13+
0,
14+
]

meta/recipes-chirpstack/chirpstack-concentratord/files/sx1301/ru864.toml

Whitespace-only changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# LoRa concentrator configuration.
2+
[gateway.concentrator]
3+
4+
# Multi spreading-factor channels (LoRa).
5+
multi_sf_channels=[
6+
868900000,
7+
869100000,
8+
0,
9+
0,
10+
0,
11+
0,
12+
0,
13+
0,
14+
]

meta/recipes-chirpstack/gateway-config/files/gateway-config.sh

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ do_setup_concentrator_shield() {
159159
7) do_set_concentratord "sx1301" && do_setup_rak2246g && do_restart_chirpstack_concentratord;;
160160
8) do_set_concentratord "sx1302" && do_setup_rak2287 && do_restart_chirpstack_concentratord;;
161161
9) do_set_concentratord "sx1301" && do_setup_rak2245 && do_restart_chirpstack_concentratord;;
162-
10) do_set_concentratord "sx1301" && do_setup_rhf0m301 && do_restart_chirpstack_concentratord;;
162+
10) do_set_concentratord "sx1301" && do_setup_rhf0m301 && do_enable_spi0_1cs_overlay;;
163163
11) do_set_concentratord "sx1301" && do_setup_lorago_port && do_restart_chirpstack_concentratord;;
164164
12) do_set_concentratord "2g4" && do_setup_semtech_2g4 && do_restart_chirpstack_concentratord;;
165165
13) do_set_concentratord "sx1302" && do_setup_semtech_corecell && do_restart_chirpstack_concentratord;;
@@ -210,29 +210,35 @@ do_setup_ic980a() {
210210
do_setup_imst_lite() {
211211
FUN=$(dialog --title "Channel-plan configuration" --menu "Select the channel-plan:" 15 60 1 \
212212
1 "EU868" \
213+
2 "RU864" \
214+
3 "IN865" \
213215
3>&1 1>&2 2>&3)
214216
RET=$?
215217
if [ $RET -eq 1 ]; then
216218
do_main_menu
217219
elif [ $RET -eq 0 ]; then
218220
case "$FUN" in
219-
1) do_copy_concentratord_config "sx1301" "imst_ic880a_eu868" "" "eu868" "0" && do_copy_chirpstack_ns_config "eu868";
221+
1) do_copy_concentratord_config "sx1301" "imst_ic880a_eu868" "" "eu868" "0" && do_copy_chirpstack_ns_config "eu868";;
222+
2) do_copy_concentratord_config "sx1301" "imst_ic880a_ru864" "" "ru864" "0" && do_copy_chirpstack_ns_config "ru864";;
223+
3) do_copy_concentratord_config "sx1301" "imst_ic880a_in865" "" "in865" "0" && do_copy_chirpstack_ns_config "in865";;
220224
esac
221225
fi
222226
}
223227

224228
do_setup_pislora() {
225229
FUN=$(dialog --title "Channel-plan configuration" --menu "Select the channel-plan:" 15 60 2 \
226-
1 "EU868" \
227-
2 "US915" \
230+
1 "AU915" \
231+
2 "EU868" \
232+
3 "US915" \
228233
3>&1 1>&2 2>&3)
229234
RET=$?
230235
if [ $RET -eq 1 ]; then
231236
do_main_menu
232237
elif [ $RET -eq 0 ]; then
233238
case "$FUN" in
234-
1) do_copy_concentratord_config "sx1301" "pi_supply_lora_gateway_hat_eu868" "" "eu868" "0" && do_copy_chirpstack_ns_config "eu868";;
235-
2) do_select_us915_block "sx1301" "pi_supply_lora_gateway_hat_us915" "";;
239+
1) do_select_au915_block "sx1301" "pi_supply_lora_gateway_hat_au915" "";;
240+
2) do_copy_concentratord_config "sx1301" "pi_supply_lora_gateway_hat_eu868" "" "eu868" "0" && do_copy_chirpstack_ns_config "eu868";;
241+
3) do_select_us915_block "sx1301" "pi_supply_lora_gateway_hat_us915" "";;
236242
esac
237243
fi
238244
}
@@ -242,7 +248,9 @@ do_setup_rak2245() {
242248
1 "AS923" \
243249
2 "AU915" \
244250
3 "EU868" \
245-
4 "US915" \
251+
4 "IN865" \
252+
5 "US915" \
253+
6 "RU864" \
246254
3>&1 1>&2 2>&3)
247255
RET=$?
248256
if [ $RET -eq 1 ]; then
@@ -252,7 +260,9 @@ do_setup_rak2245() {
252260
1) do_copy_concentratord_config "sx1301" "rak_2245_as923" "GNSS" "as923" "0" && do_copy_chirpstack_ns_config "as923";;
253261
2) do_select_au915_block "sx1301" "rak_2245_au915" "GNSS";;
254262
3) do_copy_concentratord_config "sx1301" "rak_2245_eu868" "GNSS" "eu868" "0" && do_copy_chirpstack_ns_config "eu868";;
255-
4) do_select_us915_block "sx1301" "rak_2245_us915" "GNSS";;
263+
4) do_copy_concentratord_config "sx1301" "rak_2245_in865" "GNSS" "in865" "0" && do_copy_chirpstack_ns_config "in865";;
264+
5) do_select_us915_block "sx1301" "rak_2245_us915" "GNSS";;
265+
6) do_copy_concentratord_config "sx1301" "rak_2245_ru864" "GNSS" "ru864" "0" && do_copy_chirpstack_ns_config "ru864";;
256266
esac
257267
fi
258268
}
@@ -262,7 +272,9 @@ do_setup_rak2246() {
262272
1 "AS923" \
263273
2 "AU915" \
264274
3 "EU868" \
265-
4 "US915" \
275+
4 "IN865" \
276+
5 "US915" \
277+
6 "RU864" \
266278
3>&1 1>&2 2>&3)
267279
RET=$?
268280
if [ $RET -eq 1 ]; then
@@ -272,7 +284,9 @@ do_setup_rak2246() {
272284
1) do_copy_concentratord_config "sx1301" "rak_2246_as923" "" "as923" "0" && do_copy_chirpstack_ns_config "as923";;
273285
2) do_select_au915_block "sx1301" "rak_2246_au915" "";;
274286
3) do_copy_concentratord_config "sx1301" "rak_2246_eu868" "" "eu868" "0" && do_copy_chirpstack_ns_config "eu868";;
275-
4) do_select_us915_block "sx1301" "rak_2246_us915" "";;
287+
4) do_copy_concentratord_config "sx1301" "rak_2246_in865" "" "in865" "0" && do_copy_chirpstack_ns_config "in865";;
288+
5) do_select_us915_block "sx1301" "rak_2246_us915" "";;
289+
6) do_copy_concentratord_config "sx1301" "rak_2246_ru864" "" "ru864" "0" && do_copy_chirpstack_ns_config "ru864";;
276290
esac
277291
fi
278292
}
@@ -282,7 +296,9 @@ do_setup_rak2246g() {
282296
1 "AS923" \
283297
1 "AU915" \
284298
3 "EU868" \
285-
4 "US915" \
299+
4 "IN865" \
300+
5 "US915" \
301+
6 "RU864" \
286302
3>&1 1>&2 2>&3)
287303
RET=$?
288304
if [ $RET -eq 1 ]; then
@@ -292,7 +308,9 @@ do_setup_rak2246g() {
292308
1) do_copy_concentratord_config "sx1301" "rak_2246_as923" "GNSS" "as923" "0" && do_copy_chirpstack_ns_config "as923";;
293309
2) do_select_au915_block "sx1301" "rak_2246_au915" "GNSS";;
294310
3) do_copy_concentratord_config "sx1301" "rak_2246_eu868" "GNSS" "eu868" "0" && do_copy_chirpstack_ns_config "eu868";;
295-
4) do_select_us915_block "sx1301" "rak_2246_us915" "GNSS";;
311+
4) do_copy_concentratord_config "sx1301" "rak_2246_in865" "GNSS" "in865" "0" && do_copy_chirpstack_ns_config "in865";;
312+
5) do_select_us915_block "sx1301" "rak_2246_us915" "GNSS";;
313+
6) do_copy_concentratord_config "sx1301" "rak_2246_ru864" "GNSS" "ru864" "0" && do_copy_chirpstack_ns_config "ru864";;
296314
esac
297315
fi
298316
}
@@ -333,8 +351,8 @@ do_setup_rhf0m301() {
333351
do_main_menu
334352
elif [ $RET -eq 0 ]; then
335353
case "$FUN" in
336-
1) do_copy_concentratord_config "sx1301" "generic_eu868" "" "eu868" "0" && do_copy_chirpstack_ns_config "eu868";;
337-
2) do_select_us915_block "sx1301" "generic_us915" "";;
354+
1) do_copy_concentratord_config "sx1301" "risinghf_rhf0m301_eu868" "" "eu868" "0" && do_copy_chirpstack_ns_config "eu868";;
355+
2) do_select_us915_block "sx1301" "risinghf_rhf0m301_us915" "";;
338356
esac
339357
fi
340358
}
@@ -681,6 +699,14 @@ do_flash_semtech_2g4() {
681699
sleep 1
682700
}
683701

702+
do_enable_spi0_1cs_overlay() {
703+
dialog --title "Enabling GPIO7" --msgbox "This will enable the spi0-1cs overlay in /boot/config.txt as the selected shield requires GPIO7, after which the system will reboot.\n\nComment this out in /boot/config.txt if using a different shield." 10 60
704+
sed -i "s/#dtoverlay=spi0-1cs/dtoverlay=spi0-1cs/" /boot/config.txt
705+
reboot
706+
707+
sleep 1
708+
}
709+
684710
if [ $EUID -ne 0 ]; then
685711
echo "This script must be run as root"
686712
exit 1

0 commit comments

Comments
 (0)