LoPy4 lora nanogateway example not working
Good afternoon (o;
Found my old LoPy4 board and gave it a shot to test the TTN network with the lora nano gateway example from here:
So installed vscode and pymakr plugin and flashed the LoPy4 board to latest 1.20.3.b0..
as this is the only version where I get a WiFi connect message...
But it throws then an error message and the Lopy4 isn't pingable
rst:0x1 (POWERON_RESET),boot:0x16 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0028,len:8 load:0x3fff0030,len:1992 load:0x40078000,len:12104 load:0x40080400,len:5032 entry 0x4008060c WiFi connected! Traceback (most recent call last): File "main.py", line 19, in <module> File "nanogateway.py", line 88, in start OSError: [Errno 202] EAI_FAIL Pycom MicroPython 1.20.3.b0 [v1.11-db33be7] on 2020-07-01; LoPy4 with ESP32
With 1.20.2.r4 I get the same EAI_FAIL error but after few minutes it responds to pings in second intervals:
entry 0x400a05bc WiFi connected! Traceback (most recent call last): File "main.py", line 19, in <module> File "nanogateway.py", line 88, in start OSError: [Errno 202] EAI_FAIL Pycom MicroPython 1.20.2.r4 [v1.11-ffb0e1c] on 2021-01-12; LoPy4 with ESP32
Is there any pybytes firmware or any nano gateway example that actually works?
Well if not I just throw away the boards...
robert-hh last edited by
Is this the same as the official 1.20.2.r4 I already flashed?
Hmm...just hangs there:
rst:0x7 (TG0WDT_SYS_RESET),boot:0x16 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff8020,len:8 load:0x3fff8028,len:2128 load:0x4009fa00,len:19760 entry 0x400a05bc [ 3.004] Starting LoRaWAN nano gateway with id: 30aea4fffe74c1b8 [ 4.568] WiFi connected to: TammiSiech [ 4.577] Syncing time with pool.ntp.org ...
Had to remove your pycom.pybytes_on_boot(False) as it isn't known...
AttributeError: 'module' object has no attribute 'pybytes_on_boot'
Went back to official 1.20.2.r4 and wiped FatFS....didn't hang so far...
but also don't see it connected to TTN at all....
thanks in advance
robert-hh last edited by robert-hh
@davorin Don't blame the board. It works well for me at least.
But as Lora gateway these are not well suited, simply because they support only a single channel.
Thank you for providing the core dump. It helps to trace software errors. May I ask you to try this firmware package: https://github.com/robert-hh/Shared-Stuff/blob/master/LoPy4-1.20.2.r4.tar.gz
I have the elf file for these, which allow me to locate the error.
Edit: This firmware uses LFS2.3, which is not backward compatible. So you have to reload all files. Anyhow, to have a clean start, it's better to do a full erase of the board before a new test.
Ah this helped now...but getting a panic after it connects...hough don't see anyhting on the ttn console:
entry 0x400a05bc [ 3.082] Starting LoRaWAN nano gateway with id: 30aea4fffe74c1b8 [ 4.596] WiFi connected to: TammiSiech [ 4.605] Syncing time with pool.ntp.org ... [2932692.528] RTC NTP sync complete [2932693.481] Opening UDP socket to eu.thethings.network (220.127.116.11) port 1700... [2932693.481] Setting up the LoRa radio at 868.1 Mhz using SF7BW125 [2932693.481] LoRaWAN nano gateway online [2932693.481] You may now press ENTER to enter the REPL Pycom MicroPython 1.20.2.r4 [v1.11-ffb0e1c] on 2021-01-12; LoPy4 with ESP32 Type "help()" for more information. >>> Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Core 1 register dump: PC : 0x4010a8bb PS : 0x00060630 A0 : 0x800e0ff8 A1 : 0x3ffd91d0 A2 : 0x00000001 A3 : 0x00000001 A4 : 0x00000000 A5 : 0x00000001 A6 : 0x00000000 A7 : 0x00060023 A8 : 0x80109706 A9 : 0x3ffe73e0 A10 : 0x00000001 A11 : 0x00000001 A12 : 0x3f94f190 A13 : 0x3f94f190 A14 : 0x3ffe7570 A15 : 0x3ffe74d0 SAR : 0x00000018 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000001 LBEG : 0x40094230 LEND : 0x4009425e LCOUNT : 0xffffffff ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000 Backtrace: 0x4010a8bb:0x3ffd91d0 0x400e0ff5:0x3ffd91f0 0x400e1066:0x3ffd9210 0x400e1585:0x3ffd9240 0x400e17f7:0x3ffd9260 0x400e0199:0x3ffd92a0
Seems highly unreliable this LoPy board....
So into the trash can those boards and get a real LoRa gateway...
robert-hh last edited by robert-hh
@davorin Use 1.20.2.r4 and disable pybytes.
The nanogateway software itself works. Take it from the github pages: https://github.com/pycom/pycom-libraries/blob/master/examples/lorawan-nano-gateway/nanogateway.py, not from the doc pages.
I have it running here on a Lopy as a test, and as long as I do not reboot it manually, it runs. Once every few weeks I have to reboot it manually, when the local AP of my home network stalled and the LoPy does not reconnect by itself.
You have to be aware that this is a single channel gateway. if you want to use it, your node have to be tuned to that single channel.