Skip to content

Commit 07a0bc6

Browse files
committed
Add Seeed WM1302 support.
1 parent fe0ab0c commit 07a0bc6

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

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

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ do_setup_admin_password() {
141141
}
142142

143143
do_setup_concentrator_shield() {
144-
FUN=$(dialog --title "Setup LoRa concentrator shield" --menu "Select shield:" 22 60 11 \
144+
FUN=$(dialog --title "Setup LoRa concentrator shield" --menu "Select shield:" 23 60 11 \
145145
1 "IMST - iC880A" \
146146
2 "IMST - iC980A" \
147147
3 "IMST - Lite Gateway" \
@@ -154,9 +154,10 @@ do_setup_concentrator_shield() {
154154
10 "RAK - RAK831" \
155155
11 "RisingHF - RHF0M301" \
156156
12 "Sandbox - LoRaGo PORT" \
157-
13 "Semtech - SX1280 (2.4 GHz)" \
158-
14 "Semtech - SX1302 CoreCell (SX1302CXXXGW1)" \
159-
15 "Semtech - SX1302 CoreCell (USB) (SX1302CSSXXXGW1)" \
157+
13 "Seeed - WM1302" \
158+
14 "Semtech - SX1280 (2.4 GHz)" \
159+
15 "Semtech - SX1302 CoreCell (SX1302CXXXGW1)" \
160+
16 "Semtech - SX1302 CoreCell (USB) (SX1302CSSXXXGW1)" \
160161
3>&1 1>&2 2>&3)
161162
RET=$?
162163
if [ $RET -eq 0 ]; then
@@ -173,9 +174,10 @@ do_setup_concentrator_shield() {
173174
10) do_set_concentratord "sx1301" && do_setup_rak2245 && do_restart_chirpstack_concentratord && do_create_chirpstack_gateway;;
174175
11) do_set_concentratord "sx1301" && do_setup_rhf0m301 && do_enable_spi0_1cs_overlay;;
175176
12) do_set_concentratord "sx1301" && do_setup_lorago_port && do_restart_chirpstack_concentratord && do_create_chirpstack_gateway;;
176-
13) do_set_concentratord "2g4" && do_setup_semtech_2g4 && do_restart_chirpstack_concentratord && do_create_chirpstack_gateway;;
177-
14) do_set_concentratord "sx1302" && do_setup_semtech_sx1302cxxxgw1 && do_restart_chirpstack_concentratord && do_create_chirpstack_gateway;;
178-
15) do_set_concentratord "sx1302" && do_setup_semtech_sx1302cssxxxgw1 && do_restart_chirpstack_concentratord && do_create_chirpstack_gateway;;
177+
13) do_set_concentratord "sx1302" && do_setup_seeed_wm1302 && do_restart_chirpstack_concentratord && do_create_chirpstack_gateway;;
178+
14) do_set_concentratord "2g4" && do_setup_semtech_2g4 && do_restart_chirpstack_concentratord && do_create_chirpstack_gateway;;
179+
15) do_set_concentratord "sx1302" && do_setup_semtech_sx1302cxxxgw1 && do_restart_chirpstack_concentratord && do_create_chirpstack_gateway;;
180+
16) do_set_concentratord "sx1302" && do_setup_semtech_sx1302cssxxxgw1 && do_restart_chirpstack_concentratord && do_create_chirpstack_gateway;;
179181
esac
180182
fi
181183
}
@@ -462,6 +464,20 @@ do_setup_lorago_port() {
462464
fi
463465
}
464466

467+
do_setup_seeed_wm1302() {
468+
FUN=$(dialog --title "Channel-plan configuration" --menu "Select the channel-plan:" 15 60 2 \
469+
1 "EU868" \
470+
3>&1 1>&2 2>&3)
471+
RET=$?
472+
if [ $RET -eq 1 ]; then
473+
do_main_menu
474+
elif [ $RET -eq 0 ]; then
475+
case "$FUN" in
476+
1) do_copy_concentratord_config "sx1302" "seeed_wm1302_spi_eu868" "" "eu868" "" && do_update_chirpstack_gw_bridge_topic_prefix "eu868";;
477+
esac
478+
fi
479+
}
480+
465481
do_setup_semtech_2g4() {
466482
FUN=$(dialog --title "Channel-plan configuration" --menu "Select the channel-plan:" 15 60 2 \
467483
1 "ISM2400 (2.4GHz)" \

0 commit comments

Comments
 (0)