Skip to content

Commit 588aa65

Browse files
committed
Set region fix. Updated to latest arduino lib.
1 parent 19b883e commit 588aa65

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/build-iotnode-lorawan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
- name: Install The XBee LoRaWAN library
7171
run: |
7272
arduino-cli config set library.enable_unsafe_install true
73-
arduino-cli lib install --git-url "https://github.com/%3Cspan%20class="x x-first x-last">sparkfun/XBeeArduino.git"
73+
arduino-cli lib install --git-url "https://github.com/%3Cspan%20class="x x-first x-last">digidotcom/XBeeArduino"
7474
arduino-cli lib install FastLED
7575
7676
# Compile time - build the Firmware for the data logger.

sfeIoTNodeLoRaWAN/flxLoRaWANDigi.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,22 @@ bool flxLoRaWANDigi::configureModule(void)
340340

341341
flxLog_N_(F("."));
342342

343+
// Set the region
344+
flxLog_N_(F(". settingthe LoRaWAN Region to `%s`["), name(), getRegionName());
345+
if (!_pXBeeLR->setLoRaWANRegion(_lora_region))
346+
{
347+
flxSerial.textToYellow();
348+
flxLog_N_(F("failed"));
349+
}
350+
else
351+
{
352+
flxSerial.textToGreen();
353+
flxLog_N_(F("ok"));
354+
}
355+
flxSerial.textToNormal();
356+
flxLog_N_(F("] "));
357+
flxLog_N_(F("."));
358+
343359
// Save the config to the module
344360
if (!_pXBeeLR->writeConfig())
345361
{

0 commit comments

Comments
 (0)