Can't connect to TTN with LoPy4 as Nanogateway
-
Good afternoon
Using the nanogateway example and filled out config.py with my gateway settings from TTN...
When starting LoPy4 running 1.20.2.r4 it says it is connected to the TTN network:
entry 0x400a05bc [ 2.635] Starting LoRaWAN nano gateway with id: b'30AEA4FFFE74C1B8' [ 3.949] WiFi connected to: TammiSiech [ 3.958] Syncing time with ch.pool.ntp.org ... [3121410.370] RTC NTP sync complete [3121410.370] Opening UDP socket to eu.thethings.network (52.169.76.255) port 1700... [3121410.370] Setting up the LoRa radio at 868.1 Mhz using SF7BW125 [3121410.370] LoRaWAN nano gateway online [3121410.370] You may now press ENTER to enter the REPL
But in the TTN console I still see no connection....and yes..the gateway was set up with the legacy packet forwarder...
Any ideas what might be still misconfigured?
But then I still have after few minutes a core dump:
>>> Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Core 1 register dump: PC : 0x4010a8bb PS : 0x00060230 A0 : 0x800e0ff8 A1 : 0x3ffd9150 A2 : 0x00000001 A3 : 0x00000001 A4 : 0x00000000 A5 : 0x00000001 A6 : 0x00000000 A7 : 0xff000000 A8 : 0x80109706 A9 : 0x3ffe73e0 A10 : 0x00000001 A11 : 0x00000001 A12 : 0x3f94f110 A13 : 0x3f94f110 A14 : 0x3ffe7570 A15 : 0x3ffe74d0 SAR : 0x0000001c EXCCAUSE: 0x0000001c EXCVADDR: 0x00000001 LBEG : 0x40094230 LEND : 0x4009425e LCOUNT : 0xffffffff ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000 Backtrace: 0x4010a8bb:0x3ffd9150 0x400e0ff5:0x3ffd9170 0x400e1066:0x3ffd9190 0x400e1585:0x3ffd91c0 0x400e17f7:0x3ffd91e0 0x400e0199:0x3ffd9220 ================= CORE DUMP START ================= QCABAAEAAAASAAAAbAEAAA== qDz+P5CQ/T9wd/4/ IHP+PxB3/j8yfQkA8EL8P/BC/D+oPP4/6EL8Pw4AAAC8lfw/vJX8P6g8/j8AAAAA CwAAAHRj/j9NUFRocmVhZAAAAB4LC5gAAQAAAHB3/j8AAAAAIAIGAAUAAAABAAAA AAAAAKx2/j8AAAAAAAAAAAsAAADUZPs/PGX7P6Rl+z8AAAAAAAAAAAEAAAAAAAAA IopAPwAAAABUUQlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
thanks in advance
richard
-
Well, if you're running the nano gateway alongside pinging it, that could introduce some additional delays, as the nanogateway is quite socket-intensive, though I would not expect 3-5 seconds of delay there..
Just to confirm, did you erase the device fully (clear NVS and CONFIG partitions as well as erase the flash) before starting?
-
@Gijs Dunno which pybytes version it was....but had it that the LoPy4 board only replied to every 3rd or 4th ping...looked like it was busy doing something else (o;
Yes..using extact this nanogateway.py version...
Thanks for looking into the core dump issue....
cheers
richard
-
What I mean there, is that for TTN, it sometimes seems to take ages (for me) before 'connected' appears and it starts to receive status update packets on the platform. In other times, it connects almost instantly. Earlier this afternoon I had been waiting around 30 minutes and never saw connected, but without changing anything to the script, it suddenly appeared and stayed connected.
Again, I'll check on the coredumps, assuming you're using this version? https://github.com/pycom/pycom-libraries/tree/master/examples/lorawan-nano-gateway
Interestingly the LoPy4 answers pings now in second intervals..before it was only every 3 - 5 seconds....
What do you mean with this? In general, pings should take less than 10ms on a local network..
-
@Gijs Dunno if TTN updates the registration immediately or at a specific interval...
at least now it says "Last seen 30 minutes ago"..so meaning it can't reconnect.....But had the core dumps from beginning, regardless which version and if using FATFS or LFS....
Interestingly the LoPy4 answers pings now in second intervals..before it was only every 3 - 5 seconds....
-
It took me a while as well, but now it seems to be working for me. Not sure why it takes this long (I've been at it at the same time as you). Could be related to TTN?
I have not yet had the coredumps this time. But I'll look into it
-
Of course I did this...
Oddly it was able to connect shortly...connected vi a a SUB3 hub as I thought it might be a power issue...
TTN console shows: Last Seen 13 minutes ago
But now the board core dumped again and can't reconnect....
Giving up with this broken board..definitively dumping it to trash now...
-
@davorin Did you set in config.py:
SERVER = 'router.eu.thethings.network' PORT = 1700
Abd did you register the gateway in TTN?