TheThingsProducts / gateway

The Things Kickstarter Gateway
https://www.thethingsindustries.com/docs/gateways/models/thethingskickstartergateway
55 stars 20 forks source link

Reboot Loop - Reboot reason: 0x10 or 0x13 #1

Closed htdvisser closed 6 years ago

htdvisser commented 6 years ago

From what I can see in the source code, that's a RESET_REASON_WDT_TIMEOUT (0x10).

Based on what I see on the forum this happens a lot.

avbentem commented 6 years ago

I got the same LORA: UART TIMEOUT as in @jurrienjurrien's previous comment, but then already on first boot. However, in my case it continues operation, maybe as in my case it already was configured when using my own firmware (then based on the February 14th firmware with additional debugging enabled and using a 921600 baud rate for the logging).

This is using the firmware from #19. (So: no programmer. Instead: powered down, replaced the firmware on the SD card without any modifications, and powered up without clearing the serial flash):

Firmware name: AmazingAckermann, type: 0, version: 1.0.1, commit: 91648b7e, timestamp: 1520959697
Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298
Build time: Mar 13 2018 16:49:17
...
LORA: Changing state from 4 to 6
LORA: Starting reconfiguration
LORA: version: 01
LORA: UART TIMEOUT
LORA: Configuration succeeded
LORA: Starting operation
LORA: Changing state from 6 to 8
MON: SYS Stack size: 2869
MON: heap usage: 151KB (233KB), free: 188KB
LORA: Changing state from 8 to 5
LORA: GOING ASYNC
...

It's accepting and forwarding uplinks just fine.

mrjdomingus commented 6 years ago

Hi, I am observing a similar behaviour as @jurrienjurrien after applying the #19 firmware. The gateway is apparently able to maintain a stable connection now (for more than an hour) but will stop accepting uplink messages after 10-20 minutes.

gniersma commented 6 years ago

Previous state was firmware 1.0 reboot reason 0x13

Installed the new firmware from #19. (So: no programmer. Instead: powered down, replaced the firmware on the SD card without any modifications, and powered up without clearing the serial flash):

Started up, did get several messages LORA: UART Timeout. on the lora module the green led was on. gateway didn't work. removed sd, tried several times after reboot no suc6.

powered down: decided to push the lora module a very little bit further into the connector. powered up and voila, No lora : Uart Timeout messages anymore. After a few minutes the gw was up and running now for 2 hours. and still accepting uplink messages

mrjdomingus commented 6 years ago

Just to reaffirm,

After applying the #19 firmware and rebooting the gateway this morning, I have enjoyed at least 10 hours of (still) uninterrupted gateway connection BUT the gateway will stop uplinking messages after a few messages (i.e. 7 minutes or so).

Gateway information Version Info |   -- | -- Hardware: | v1 Bootloader: | r1-7167873a (2017-06-02T13:48:18Z) Firmware: | v1.0.1-91648b7e (2018-03-13T16:48:17Z)   |   Network |   Uptime: | 37515 Connected: | true Interface: | WIFI Wifi SSID: | MEDAILLEON   |   Configuration |   Activation locked: | true Config correct: | true Region: | EU_863_870 Gateway Card: | 868Mhz   |   Packet forwarding |   Broker connection: | true Packets up: | 7 Packets down: | 0   |   Miscellaneous |   External storage: |  
cyberjunky commented 6 years ago

@Reiniervdl

On the working LoRa module the SX1301 chip is running hot (69C), the microchip PIC is 52C. This is normal according to @nestorayuso. On the defective LoRa module the chip temperatures are much lower.

I don't think that by looking at the temperature you can tell if a module is defective or not. My LoRA module was also cold, but that was simply because it stops accepting commands and stop sending pkts and getting into reboots. Now that the firmware fixes are working for me the module is also hotter, the more pkts it's sent in a row without reboots in between the hotter it gets.

bvdbrule commented 6 years ago

I have also a gateway that reboots 2 times a day. I will try the latest test/beta firmware. Tnx

mrjdomingus commented 6 years ago

My feedback with regard to the 1.0.2 firmware: it is slightly more prone to reboot than the 1.0.1. firmware (but it will recover eventually), but in my case it too will stop uplinking messages after a while, making the gateway still unusable.

Gateway information Version Info |   -- | -- Hardware: | v1 Bootloader: | r1-7167873a (2017-06-02T13:48:18Z) Firmware: | v1.0.2-475aef56 (2018-03-15T09:43:08Z)   |   Network |   Uptime: | 31364 Connected: | true Interface: | WIFI Wifi SSID: | MEDAILLEON   |   Configuration |   Activation locked: | true Config correct: | true Region: | EU_863_870 Gateway Card: | 868Mhz   |   Packet forwarding |   Broker connection: | true Packets up: | 1 Packets down: | 0   |   Miscellaneous |   External storage: |  
cyberjunky commented 6 years ago

How does the gateway uses date and time, I know it queries ntp servers to keep uptodate, but I cannot find any date or time printed in any of the log messages. Losing connection via wifi and mqtt can be wrong date/time related (renewal of keying) maybe it's an idea to log lines with date/time in them? (according to gateway)

cyberjunky commented 6 years ago

Hmm although I see some logs where date and time is printed... Maybe I''m not uptodate ;-)

avbentem commented 6 years ago

@cyberjunky

I see some logs where date and time is printed...

For my logs, I use a Raspberry Pi to capture and enhance the serial output, and send alerts through Telegram or Slack.

Alternatively, like when using PlatformIO: LOG="ttn-gateway-`date +'%Y%m%d-%H%M%S'`.log"; pio serialports monitor --raw -b 115200 | while read l; do echo "[`date +'%F %T'`] $l" | tee -a $LOG; done

cyberjunky commented 6 years ago

Aha, so time is coming from pi instead of gw...

Op 16 mrt. 2018 19:28 schreef "Arjan" notifications@github.com:

@cyberjunky https://github.com/cyberjunky

I see some logs where date and time is printed...

For my logs, I use a Raspberry Pi to capture and enhance the serial output, and send alerts through Telegram or Slack https://github.com/avbentem/raspi-uart-monitor.

Alternatively, like when using PlatformIO https://platformio.org/: LOG="ttn-gateway-date +'%Y%m%d-%H%M%S'.log"; pio serialports monitor --raw -b 115200 | while read l; do echo "[date +'%F %T'] $l" | tee -a $LOG; done

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TheThingsProducts/gateway/issues/1#issuecomment-373804496, or mute the thread https://github.com/notifications/unsubscribe-auth/AFMd-U_312RgHf8OK7UPZ9QD688X81KOks5tfARCgaJpZM4R0NRp .

Davidver1 commented 6 years ago

I just flashed the latest beta firmware with the SD card (I do not have a programmer). The update went fine, but unfortunately it had no effect at all for the bootloop issue.

Edit: I left it booting for a while, and after approx. 2 hours, it became stable - it has been up and running for an hour now! Progress after all...

Edit2: after 24 hours of stability, the gateway rebooted (as expected) - but subsequently ended up in the eternal reboot loop again...

Gateway information

Version Info |  
-- | --
Hardware: | v1
Bootloader: | r1-7167873a (2017-06-02T13:48:18Z)
Firmware: | v1.0.2-475aef56 (2018-03-15T09:43:08Z)
  |  
Network |  
Uptime: | 26
Connected: | true
Interface: | Ethernet
Wifi SSID: | Things-Gateway-001EC03AF660
  |  
Configuration |  
Activation locked: | true
Config correct: | true
Region: | EU_863_870
Gateway Card: | 868Mhz
  |  
Packet forwarding |  
Broker connection: | false
Packets up: | 0
Packets down: | 0
  |  
Miscellaneous |  
External storage: | false
beamzer commented 6 years ago

I was hoping v1.0.2. would fix the rebooting on my gateway, but i don't see any improvement

Firmware name: AmazingAckermann, type: 0, version: 1.0.2, commit: 475aef56, timestamp: 1521108973
Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298
Build time: Mar 15 2018 10:16:33

The gateway gets an IP-address, in the packet capture on the router i see it fetching the right date/time through NTP it reaches a third blue LED which flickers and then it reboots after one or two of these lines

SNTP: State change from 0 to 0

Wouldn't mind bringing in the gateway to see if updating the bootloader would help, i work in Amsterdam.

ttn-gateway-log.txt

MiSc-git commented 6 years ago

Updated my Gateway to 1.0.1 via USB and then FOTA to 1.0.2. Still a reboot loop. Gateway Module is a LG8271 and Socket labeled 1636D4.

Firmware name: AmazingAckermann, type: 0, version: 1.0.2, commit: 475aef56, tim3
Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298
Build time: Mar 15 2018 10:16:33
Reboot reason: 0x10

...

CNFG: Load online user config state change to 7

CNFG: Configuring LoRa module
LORA: Changing state from 2 to 4
LORA: Starting reconfiguration
LORA: version: 01
LORA: Configuration failed, retry
LORA: Starting reconfiguration
LORA: version: 01
LORA: Configuration failed, retry
LORA: Starting reconfiguration
MON: SYS Stack size: 2833
MON: heap usage: 151KB (233KB), free: 188KB
LORA: version: 01
LORA: Configuration failed, retry
LORA: RESET MODULE
LORA: ChaSNTP: State change from 0 to 0
SNTP: State change from 0 to 0
egarl004 commented 6 years ago

Can confirm reboot is still an issue with beta firmware (uploaded via microsd card)

htdvisser commented 6 years ago

@egarl004 please provide the exact version and commit so that we know what version you're talking about (you can find that in the logs or using ttnctl gateways status <GatewayID>).

Logs would also be very helpful

egarl004 commented 6 years ago

@htdvisser A little new at this. Is there a way I can get access to the logs without a serial interface - or do you have a procedure? I've only attempted to load new firmware via sd card. (maybe a future suggestion would be to dump the logs to the sd card so we can easily get them to you?)

ReiniervdL commented 6 years ago

The TTN gateway, previously DOA, is alive and running for 12 hrs now, receiving packets successfully. Downloaded firmware 1.0.3 on SD card, and left the unit connected while it was rebooting every 45 seconds (with firmware 1.0.1 installed previously). It either updated firmware from SD or got an on-line update, but it is now stable and working with FW 1.0.3

ttn gateway success

skaldo commented 6 years ago

Hello, is there anyone working on this issue? So far I haven't seen any helpful info from the folks working at TTN. This is quite a bad situation, as some customers are literally left with 300€ bricks.

There were even at least two users (@machiavello & @beamzer) offering to bring their GWs to the TTN offices in Amsterdam for investigation. We would do the same with ours but are unfortunately based in south Germany.

It seems to me, that some lucky users got working GWs. Based on this, I would like to ask:

Thanks a lot in advance! Cheers!

ReiniervdL commented 6 years ago

@skaldo Have you read the latest posts and tried firmware update 1.03?

skaldo commented 6 years ago

Thanks @ReiniervdL, I've overseen your very last post somehow. Will try it next week as soon as I get access to the GW.

Looking at the commits on the beta branch (1.0.3), the feature/fixes_lora_module_communication has been merged into it. But as you commented, the GW was still stuck in the reboot loop when you used the FW built from that branch.. :worried:

It would be nice if someone from TTN would let us know in case that there is a release that could possibly fix the reboot loop issue. I would be very happy to help with testing and share the logs here.

mrjdomingus commented 6 years ago

I am sorry to report that the 1.0.3 firmware also results in the gateway stopping to forward traffic after 10 minutes or so. The connection with the network will remain stable (no reboots in at least 7 hours), but it will simply not perform its primary purpose: relay LoRa traffic.

I am starting to feel that we are dealing with a range of issues (with multiple causes), the firmware patches are only solving a subset of.

Gateway information Version Info |   -- | -- Hardware: | v1 Bootloader: | r1-7167873a (2017-06-02T13:48:18Z) Firmware: | v1.0.3-2c56ce09 (2018-03-22T12:20:52Z)
htdvisser commented 6 years ago

I'm not personally involved with the firmware development, so I may not have the most up-to-date information, but here's what I know:

@mrjdomingus: Correct, there seem to be multiple, unrelated issues. The gateway's way of dealing with any unexpected issues is to reboot, so we really need to see some logs in order to track down the cause.

@egarl004: I'm afraid the only way to get the logs is indeed the serial method. I have suggested the SD card solution several times, but apparently the team didn't see the value in that. I'll ask again.

@skaldo: Thanks for offering your help. The 1.0.3 firmware that is in the beta branch should fix the reboots that are caused by flaky LoRa Module communication. However, it seems that the gateway also still has some difficulties with MQTT (issue #21) and SNTP (issue #24). If you could get the logs from when your gateway reboots, that would be very helpful to the team. Please look through the list of issues to see where they fit.

avbentem commented 6 years ago

It seems there's no download for specifically 1.0.3 for use on an SD card. But today the latest "beta channel" on https://github.com/TheThingsProducts/gateway/tree/master/firmware#installation is indeed 1.0.3.

This seems to install fine for me but I only upgraded a few minutes ago.

Earlier today, I had problems upgrading from 1.0.1 (running on an SD card) to the latest beta. Though obsolete now, it was interesting to see that removing the SD card got me 1.0.2 without seeing anything being dowloaded. So I assume it already downloaded that earlier, but then still used the older firmware from the SD card? I did NOT have "Automatically update gateway" nor "Beta Updates" enabled in TTN Console, so I guess that's why 1.0.2 was waiting, not 1.0.3.

Just in case it helps, this version 1.0.2 gave me the reboot loop again, which I did not have in 1.0.1:

LORA: Starting reconfiguration
MON: SYS Stack size: 2869
MON: heap usage: 154KB (234KB), free: 185KB
LORA: version: 01
LORA: Configuration failed, retry
LORA: RESET MODULE
Reboot loop in 1.0.2 Timestamps added by myself: ```text [2018-04-02T07:40:46.358Z] SNTP: State change from 0 to 0 [2018-04-02T07:40:46.376Z] SNTP: State change from 0 to 0 [2018-04-02T07:40:46.378Z] [2018-04-02T07:40:46.379Z] [2018-04-02T07:40:46.380Z] [2018-04-02T07:40:46.381Z] ************************** [2018-04-02T07:40:46.382Z] * The Things Network * [2018-04-02T07:40:46.383Z] * G A T E W A Y * [2018-04-02T07:40:46.391Z] ************************** [2018-04-02T07:40:46.392Z] Firmware name: AmazingAckermann, type: 0, version: 1.0.2, commit: 475aef56, timestamp: 1521108973 [2018-04-02T07:40:46.403Z] Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 [2018-04-02T07:40:46.404Z] Build time: Mar 15 2018 10:16:33 [2018-04-02T07:40:46.405Z] Reboot reason: 0x03 [2018-04-02T07:40:46.411Z] BOOT: (persisted info) 6F 72 72 65 01 03 C3 2C E7 16 0D C9 92 3A 54 94 [2018-04-02T07:40:46.412Z] [2018-04-02T07:40:46.413Z] [2018-04-02T07:40:46.414Z] [2018-04-02T07:40:46.414Z] [2018-04-02T07:40:46.436Z] WIFI: Entering state 0 [2018-04-02T07:40:46.440Z] WIFI: Entering SCAN state 0 [2018-04-02T07:40:46.441Z] [2018-04-02T07:40:46.441Z] MAIN: Initialisation complete [2018-04-02T07:40:46.442Z] LORA: Changing state from 0 to 0 [2018-04-02T07:40:46.596Z] [2018-04-02T07:40:46.598Z] MAIN: Leaving state 0 [2018-04-02T07:40:46.601Z] MAIN: Entering state 1 [2018-04-02T07:40:46.612Z] FLASH: Magic bytes found: wifi config present [2018-04-02T07:40:46.615Z] FLASH: Magic bytes found: activation data present [2018-04-02T07:40:46.618Z] FLASH: Magic bytes found: FOTA data present [2018-04-02T07:40:46.622Z] FLASH: Loading Firmware Data [2018-04-02T07:40:46.632Z] CNFG: (Firmware HASH (sha256)) A7 76 2E BD 2A FB 65 23 CC A5 FE A3 2E CE 17 98 BE 56 A0 36 E5 8D C3 ED 35 C9 0E 63 52 0C D8 22 [2018-04-02T07:40:46.635Z] FLASH: Loading WiFi Data [2018-04-02T07:40:46.638Z] CNFG: WiFi SSID: [2018-04-02T07:40:46.640Z] CNFG: WiFi key: *** [2018-04-02T07:40:46.643Z] CNFG: WiFi conn_type: 1 [2018-04-02T07:40:46.646Z] CNFG: WiFi sec_type: 4 [2018-04-02T07:40:46.650Z] FLASH: Loading Activation Data [2018-04-02T07:40:46.652Z] CNFG: Gateway ID: arjanvanb-gw-1 [2018-04-02T07:40:46.656Z] CNFG: Gateway Key: *** [2018-04-02T07:40:46.659Z] CNFG: Account Server URL: https://account.thethingsnetwork.org [2018-04-02T07:40:46.662Z] CNFG: Locked: true [2018-04-02T07:40:46.665Z] CNFG: Locked first time: false [2018-04-02T07:40:46.666Z] [2018-04-02T07:40:46.669Z] MAIN: Leaving state 1 [2018-04-02T07:40:46.671Z] MAIN: Entering state 2 [2018-04-02T07:40:46.673Z] INET: State change to 0 [2018-04-02T07:40:46.972Z] LORA: Initialisation complete [2018-04-02T07:40:46.975Z] LORA: Changing state from 0 to 1 [2018-04-02T07:40:47.226Z] WIFI: Entering state 1 [2018-04-02T07:40:47.229Z] ETH: IP Address: 0.0.0.0 [2018-04-02T07:40:47.232Z] WIFI: Entering state 4 [2018-04-02T07:40:47.238Z] WIFI: Entering SCAN state 1 [2018-04-02T07:40:48.319Z] SNTP: State change from 0 to 1 [2018-04-02T07:40:48.503Z] INET: Gateway has Ethernet [2018-04-02T07:40:48.506Z] INET: State change to 2 [2018-04-02T07:40:48.512Z] INET: Connected to a network, waiting for DHCP lease, checking validity with ping [2018-04-02T07:40:49.526Z] Scan is completed successfully [2018-04-02T07:40:49.528Z] WIFI: Entering SCAN state 2 [2018-04-02T07:40:49.537Z] WIFI: Entering SCAN state 5 [2018-04-02T07:40:49.540Z] WIFI: Entering SCAN state 0 [2018-04-02T07:40:49.543Z] WIFI: Entering state 2 [2018-04-02T07:40:49.546Z] WIFI: Disabling modules [2018-04-02T07:40:49.550Z] Head magic match void: trying to free an already freed block, ignore [2018-04-02T07:40:49.553Z] SNTP: State change from 1 to 1 [2018-04-02T07:40:49.557Z] WIFI: Entering state 3 [2018-04-02T07:40:50.418Z] WIFI: Enabling modules for client [2018-04-02T07:40:50.420Z] WIFI: Entering state 6 [2018-04-02T07:40:50.422Z] [2018-04-02T07:40:50.423Z] [2018-04-02T07:40:50.424Z] >WIFI: IP Address: 0.0.0.0 [2018-04-02T07:40:50.512Z] SNTP: State change from 1 to 2 [2018-04-02T07:40:51.410Z] ETH: IP Address: 192.168.0.12 [2018-04-02T07:40:53.405Z] CB: WIFI: IP Address: 192.168.178.53 [2018-04-02T07:40:53.495Z] INET: State change to 3 [2018-04-02T07:40:53.497Z] INET: Ping probe [2018-04-02T07:40:53.508Z] INET: Ping response from PIC32INT, set as default [2018-04-02T07:40:53.511Z] INET: State change to 4 [2018-04-02T07:40:53.961Z] LORA: Wait init complete, waiting for application. [2018-04-02T07:40:53.964Z] LORA: Changing state from 1 to 2 [2018-04-02T07:40:55.997Z] SNTP: State change from 2 to 3 [2018-04-02T07:40:56.331Z] MON: SYS Stack size: 3965 [2018-04-02T07:40:56.334Z] MON: heap usage: 148KB (157KB), free: 192KB [2018-04-02T07:40:57.094Z] SNTP: State change from 3 to 4 [2018-04-02T07:40:58.191Z] SNTP: State change from 4 to 5 [2018-04-02T07:40:58.203Z] SNTP: State change from 5 to 6 [2018-04-02T07:40:58.206Z] SNTP: State change from 6 to 7 [2018-04-02T07:40:58.209Z] INET: State change to 5 [2018-04-02T07:40:58.210Z] [2018-04-02T07:40:58.213Z] MAIN: Leaving state 2 [2018-04-02T07:40:58.217Z] MAIN: Entering state 3 [2018-04-02T07:40:58.218Z] [2018-04-02T07:40:58.220Z] CNFG: Load online user config state change to 4 [2018-04-02T07:40:58.222Z] HTTP: Close active socket 0 [2018-04-02T07:40:58.490Z] HTTP: Starting connection [2018-04-02T07:40:58.505Z] HTTPS: Connection Opened: Starting TLS Negotiation [2018-04-02T07:40:58.508Z] HTTP: Wait for TLS Connect [2018-04-02T07:40:58.966Z] HTTP: TLS Connection Opened: Starting Clear Text Communication [2018-04-02T07:40:59.000Z] HTTP: Got 1480 bytes [2018-04-02T07:41:00.999Z] HTTP: Connection Closed [2018-04-02T07:41:01.002Z] HTTP: Close active socket 1 [2018-04-02T07:41:01.013Z] CONF: Parsing response token: HTTP/1.1 200 OK [2018-04-02T07:41:01.015Z] CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883 [2018-04-02T07:41:01.016Z] [2018-04-02T07:41:01.017Z] CNFG: Load online user config state change to 6 [2018-04-02T07:41:03.006Z] FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870 [2018-04-02T07:41:03.009Z] HTTP: Starting connection [2018-04-02T07:41:03.018Z] HTTPS: Connection Opened: Starting TLS Negotiation [2018-04-02T07:41:03.021Z] HTTP: Wait for TLS Connect [2018-04-02T07:41:03.518Z] HTTP: TLS Connection Opened: Starting Clear Text Communication [2018-04-02T07:41:03.532Z] HTTP: Got 1232 bytes [2018-04-02T07:41:05.527Z] HTTP: Connection Closed [2018-04-02T07:41:05.530Z] HTTP: Close active socket 1 [2018-04-02T07:41:05.532Z] [2018-04-02T07:41:05.535Z] CNFG: Load online user config state change to 7 [2018-04-02T07:41:05.538Z] [2018-04-02T07:41:05.540Z] CNFG: Configuring LoRa module [2018-04-02T07:41:05.542Z] LORA: Changing state from 2 to 4 [2018-04-02T07:41:05.545Z] LORA: Starting reconfiguration [2018-04-02T07:41:05.549Z] LORA: version: 01 [2018-04-02T07:41:06.315Z] MON: SYS Stack size: 2851 [2018-04-02T07:41:06.318Z] MON: heap usage: 152KB (234KB), free: 187KB [2018-04-02T07:41:11.555Z] LORA: Configuration failed, retry [2018-04-02T07:41:11.576Z] LORA: Starting reconfiguration [2018-04-02T07:41:11.581Z] LORA: version: 01 [2018-04-02T07:41:11.594Z] LORA: Configuration failed, retry [2018-04-02T07:41:11.600Z] LORA: Starting reconfiguration [2018-04-02T07:41:16.300Z] MON: SYS Stack size: 2851 [2018-04-02T07:41:16.303Z] MON: heap usage: 152KB (234KB), free: 187KB [2018-04-02T07:41:17.576Z] LORA: version: 01 [2018-04-02T07:41:17.588Z] LORA: Configuration failed, retry [2018-04-02T07:41:17.608Z] LORA: RESET MODULE [2018-04-02T07:41:20.453Z] LORA: ChaSNTP: State change from 0 to 0 [2018-04-02T07:41:20.456Z] SNTP: State change from 0 to 0 [2018-04-02T07:41:20.458Z] [2018-04-02T07:41:20.460Z] [2018-04-02T07:41:20.460Z] [2018-04-02T07:41:20.463Z] ************************** [2018-04-02T07:41:20.464Z] * The Things Network * [2018-04-02T07:41:20.467Z] * G A T E W A Y * [2018-04-02T07:41:20.468Z] ************************** [2018-04-02T07:41:20.475Z] Firmware name: AmazingAckermann, type: 0, version: 1.0.2, commit: 475aef56, timestamp: 1521108973 [2018-04-02T07:41:20.495Z] Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 [2018-04-02T07:41:20.497Z] Build time: Mar 15 2018 10:16:33 [2018-04-02T07:41:20.508Z] Reboot reason: 0x10 [2018-04-02T07:41:20.514Z] BOOT: (persisted info) 6F 72 72 65 01 03 C3 2C E7 16 0D C9 92 3A 54 94 [2018-04-02T07:41:20.516Z] [2018-04-02T07:41:20.516Z] [2018-04-02T07:41:20.517Z] [2018-04-02T07:41:20.517Z] [2018-04-02T07:41:20.518Z] WIFI: Entering state 0 [2018-04-02T07:41:20.519Z] WIFI: Entering SCAN state 0 [2018-04-02T07:41:20.520Z] [2018-04-02T07:41:20.531Z] MAIN: Initialisation complete [2018-04-02T07:41:20.532Z] LORA: Changing state from 0 to 0 [2018-04-02T07:41:20.699Z] [2018-04-02T07:41:20.702Z] MAIN: Leaving state 0 [2018-04-02T07:41:20.708Z] MAIN: Entering state 1 [2018-04-02T07:41:20.712Z] FLASH: Magic bytes found: wifi config present [2018-04-02T07:41:20.723Z] FLASH: Magic bytes found: activation data present [2018-04-02T07:41:20.727Z] FLASH: Magic bytes found: FOTA data present [2018-04-02T07:41:20.729Z] FLASH: Loading Firmware Data [2018-04-02T07:41:20.736Z] CNFG: (Firmware HASH (sha256)) A7 76 2E BD 2A FB 65 23 CC A5 FE A3 2E CE 17 98 BE 56 A0 36 E5 8D C3 ED 35 C9 0E 63 52 0C D8 22 [2018-04-02T07:41:20.738Z] FLASH: Loading WiFi Data [2018-04-02T07:41:20.741Z] CNFG: WiFi SSID: [2018-04-02T07:41:20.744Z] CNFG: WiFi key: *** [2018-04-02T07:41:20.747Z] CNFG: WiFi conn_type: 1 [2018-04-02T07:41:20.751Z] CNFG: WiFi sec_type: 4 [2018-04-02T07:41:20.752Z] FLASH: Loading Activation Data [2018-04-02T07:41:20.756Z] CNFG: Gateway ID: arjanvanb-gw-1 [2018-04-02T07:41:20.759Z] CNFG: Gateway Key: *** [2018-04-02T07:41:20.762Z] CNFG: Account Server URL: https://account.thethingsnetwork.org [2018-04-02T07:41:20.765Z] CNFG: Locked: true [2018-04-02T07:41:20.768Z] CNFG: Locked first time: false [2018-04-02T07:41:20.770Z] [2018-04-02T07:41:20.772Z] MAIN: Leaving state 1 [2018-04-02T07:41:20.774Z] MAIN: Entering state 2 [2018-04-02T07:41:20.776Z] INET: State change to 0 [2018-04-02T07:41:21.075Z] LORA: Initialisation complete [2018-04-02T07:41:21.078Z] LORA: Changing state from 0 to 1 [2018-04-02T07:41:21.326Z] WIFI: Entering state 1 [2018-04-02T07:41:21.329Z] ETH: IP Address: 0.0.0.0 [2018-04-02T07:41:21.331Z] WIFI: Entering state 4 [2018-04-02T07:41:21.334Z] WIFI: Entering SCAN state 1 [2018-04-02T07:41:21.756Z] Scan is completed successfully [2018-04-02T07:41:21.759Z] WIFI: Entering SCAN state 2 [2018-04-02T07:41:21.768Z] WIFI: Entering SCAN state 5 [2018-04-02T07:41:21.771Z] WIFI: Entering SCAN state 0 [2018-04-02T07:41:21.774Z] WIFI: Entering state 2 [2018-04-02T07:41:21.776Z] WIFI: Disabling modules [2018-04-02T07:41:21.781Z] Head magic match void: trying to free an already freed block, ignore [2018-04-02T07:41:21.784Z] WIFI: Entering state 3 [2018-04-02T07:41:22.417Z] SNTP: State change from 0 to 1 [2018-04-02T07:41:22.477Z] INET: Gateway has Ethernet [2018-04-02T07:41:22.480Z] INET: State change to 2 [2018-04-02T07:41:22.486Z] INET: Connected to a network, waiting for DHCP lease, checking validity with ping [2018-04-02T07:41:22.646Z] WIFI: Enabling modules for client [2018-04-02T07:41:22.648Z] WIFI: Entering state 6 [2018-04-02T07:41:22.650Z] [2018-04-02T07:41:22.651Z] [2018-04-02T07:41:22.652Z] >WIFI: IP Address: 0.0.0.0 [2018-04-02T07:41:23.514Z] SNTP: State change from 1 to 2 [2018-04-02T07:41:25.509Z] CB: ETH: IP Address: 192.168.0.12 [2018-04-02T07:41:27.469Z] INET: State change to 3 [2018-04-02T07:41:27.472Z] INET: Ping probe [2018-04-02T07:41:27.484Z] INET: Ping response from PIC32INT, set as default [2018-04-02T07:41:27.486Z] INET: State change to 4 [2018-04-02T07:41:27.503Z] WIFI: IP Address: 192.168.178.53 [2018-04-02T07:41:28.065Z] LORA: Wait init complete, waiting for application. [2018-04-02T07:41:28.068Z] LORA: Changing state from 1 to 2 [2018-04-02T07:41:28.998Z] SNTP: State change from 2 to 3 [2018-04-02T07:41:30.096Z] SNTP: State change from 3 to 4 [2018-04-02T07:41:30.435Z] MON: SYS Stack size: 3965 [2018-04-02T07:41:30.438Z] MON: heap usage: 151KB (156KB), free: 188KB [2018-04-02T07:41:31.194Z] SNTP: State change from 4 to 5 [2018-04-02T07:41:31.203Z] SNTP: State change from 5 to 6 [2018-04-02T07:41:31.206Z] SNTP: State change from 6 to 7 [2018-04-02T07:41:31.209Z] INET: State change to 5 [2018-04-02T07:41:31.211Z] [2018-04-02T07:41:31.213Z] MAIN: Leaving state 2 [2018-04-02T07:41:31.214Z] MAIN: Entering state 3 [2018-04-02T07:41:31.215Z] [2018-04-02T07:41:31.217Z] CNFG: Load online user config state change to 4 [2018-04-02T07:41:31.219Z] HTTP: Close active socket 0 [2018-04-02T07:41:31.222Z] HTTP: Starting connection [2018-04-02T07:41:31.233Z] HTTPS: Connection Opened: Starting TLS Negotiation [2018-04-02T07:41:31.235Z] HTTP: Wait for TLS Connect [2018-04-02T07:41:31.707Z] HTTP: TLS Connection Opened: Starting Clear Text Communication [2018-04-02T07:41:31.736Z] HTTP: Got 1480 bytes [2018-04-02T07:41:33.731Z] HTTP: Connection Closed [2018-04-02T07:41:33.734Z] HTTP: Close active socket 1 [2018-04-02T07:41:33.737Z] CONF: Parsing response token: HTTP/1.1 200 OK [2018-04-02T07:41:33.743Z] CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883 [2018-04-02T07:41:33.745Z] [2018-04-02T07:41:33.747Z] CNFG: Load online user config state change to 6 [2018-04-02T07:41:35.738Z] FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870 [2018-04-02T07:41:35.741Z] HTTP: Starting connection [2018-04-02T07:41:35.750Z] HTTPS: Connection Opened: Starting TLS Negotiation [2018-04-02T07:41:35.753Z] HTTP: Wait for TLS Connect [2018-04-02T07:41:36.277Z] HTTP: TLS Connection Opened: Starting Clear Text Communication [2018-04-02T07:41:36.291Z] HTTP: Got 1232 bytes [2018-04-02T07:41:38.289Z] HTTP: Connection Closed [2018-04-02T07:41:38.292Z] HTTP: Close active socket 1 [2018-04-02T07:41:38.294Z] [2018-04-02T07:41:38.297Z] CNFG: Load online user config state change to 7 [2018-04-02T07:41:38.299Z] [2018-04-02T07:41:38.301Z] CNFG: Configuring LoRa module [2018-04-02T07:41:38.304Z] LORA: Changing state from 2 to 4 [2018-04-02T07:41:38.307Z] LORA: Starting reconfiguration [2018-04-02T07:41:38.313Z] LORA: version: 01 [2018-04-02T07:41:38.317Z] LORA: Configuration failed, retry [2018-04-02T07:41:38.341Z] LORA: Starting reconfiguration [2018-04-02T07:41:40.419Z] MON: SYS Stack size: 2847 [2018-04-02T07:41:40.421Z] MON: heap usage: 156KB (234KB), free: 183KB [2018-04-02T07:41:44.321Z] LORA: version: 00 [2018-04-02T07:41:47.192Z] SNTP: State change from 0 to 0 [2018-04-02T07:41:47.195Z] SNTP: State change from 0 to 0 [2018-04-02T07:41:47.198Z] [2018-04-02T07:41:47.199Z] [2018-04-02T07:41:47.200Z] [2018-04-02T07:41:47.202Z] ************************** [2018-04-02T07:41:47.203Z] * The Things Network * [2018-04-02T07:41:47.206Z] * G A T E W A Y * [2018-04-02T07:41:47.208Z] ************************** [2018-04-02T07:41:47.214Z] Firmware name: AmazingAckermann, type: 0, version: 1.0.2, commit: 475aef56, timestamp: 1521108973 [2018-04-02T07:41:47.233Z] Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 [2018-04-02T07:41:47.235Z] Build time: Mar 15 2018 10:16:33 [2018-04-02T07:41:47.247Z] Reboot reason: 0x10 [2018-04-02T07:41:47.253Z] BOOT: (persisted info) 6F 72 72 65 01 03 C3 2C E7 16 0D C9 92 3A 54 94 [2018-04-02T07:41:47.254Z] [2018-04-02T07:41:47.255Z] [2018-04-02T07:41:47.256Z] [2018-04-02T07:41:47.256Z] [2018-04-02T07:41:47.257Z] WIFI: Entering state 0 [2018-04-02T07:41:47.258Z] WIFI: Entering SCAN state 0 [2018-04-02T07:41:47.259Z] [2018-04-02T07:41:47.271Z] MAIN: Initialisation complete [2018-04-02T07:41:47.272Z] LORA: Changing state from 0 to 0 [2018-04-02T07:41:47.437Z] [2018-04-02T07:41:47.441Z] MAIN: Leaving state 0 [2018-04-02T07:41:47.443Z] MAIN: Entering state 1 [2018-04-02T07:41:47.451Z] FLASH: Magic bytes found: wifi config present [2018-04-02T07:41:47.455Z] FLASH: Magic bytes found: activation data present [2018-04-02T07:41:47.460Z] FLASH: Magic bytes found: FOTA data present [2018-04-02T07:41:47.463Z] FLASH: Loading Firmware Data [2018-04-02T07:41:47.474Z] CNFG: (Firmware HASH (sha256)) A7 76 2E BD 2A FB 65 23 CC A5 FE A3 2E CE 17 98 BE 56 A0 36 E5 8D C3 ED 35 C9 0E 63 52 0C D8 22 [2018-04-02T07:41:47.482Z] FLASH: Loading WiFi Data [2018-04-02T07:41:47.485Z] CNFG: WiFi SSID: [2018-04-02T07:41:47.487Z] CNFG: WiFi key: *** [2018-04-02T07:41:47.488Z] CNFG: WiFi conn_type: 1 [2018-04-02T07:41:47.491Z] CNFG: WiFi sec_type: 4 [2018-04-02T07:41:47.492Z] FLASH: Loading Activation Data [2018-04-02T07:41:47.495Z] CNFG: Gateway ID: arjanvanb-gw-1 [2018-04-02T07:41:47.498Z] CNFG: Gateway Key: *** [2018-04-02T07:41:47.502Z] CNFG: Account Server URL: https://account.thethingsnetwork.org [2018-04-02T07:41:47.505Z] CNFG: Locked: true [2018-04-02T07:41:47.509Z] CNFG: Locked first time: false [2018-04-02T07:41:47.510Z] [2018-04-02T07:41:47.511Z] MAIN: Leaving state 1 [2018-04-02T07:41:47.513Z] MAIN: Entering state 2 [2018-04-02T07:41:47.515Z] INET: State change to 0 [2018-04-02T07:41:47.814Z] LORA: Initialisation complete [2018-04-02T07:41:47.817Z] LORA: Changing state from 0 to 1 [2018-04-02T07:41:48.068Z] WIFI: Entering state 1 [2018-04-02T07:41:48.071Z] ETH: IP Address: 0.0.0.0 [2018-04-02T07:41:48.074Z] WIFI: Entering state 4 [2018-04-02T07:41:48.076Z] WIFI: Entering SCAN state 1 [2018-04-02T07:41:49.161Z] SNTP: State change from 0 to 1 [2018-04-02T07:41:49.296Z] INET: Gateway has Ethernet [2018-04-02T07:41:49.299Z] INET: State change to 2 [2018-04-02T07:41:49.304Z] INET: Connected to a network, waiting for DHCP lease, checking validity with ping [2018-04-02T07:41:50.369Z] Scan is completed successfully [2018-04-02T07:41:50.371Z] WIFI: Entering SCAN state 2 [2018-04-02T07:41:50.378Z] WIFI: Entering SCAN state 5 [2018-04-02T07:41:50.382Z] WIFI: Entering SCAN state 0 [2018-04-02T07:41:50.385Z] WIFI: Entering state 2 [2018-04-02T07:41:50.388Z] WIFI: Disabling modules [2018-04-02T07:41:50.392Z] Head magic match void: trying to free an already freed block, ignore [2018-04-02T07:41:50.394Z] SNTP: State change from 1 to 1 [2018-04-02T07:41:50.397Z] WIFI: Entering state 3 [2018-04-02T07:41:51.258Z] WIFI: Enabling modules for client [2018-04-02T07:41:51.261Z] WIFI: Entering state 6 [2018-04-02T07:41:51.262Z] [2018-04-02T07:41:51.263Z] [2018-04-02T07:41:51.265Z] >WIFI: IP Address: 0.0.0.0 [2018-04-02T07:41:51.354Z] SNTP: State change from 1 to 2 [2018-04-02T07:41:52.252Z] ETH: IP Address: 192.168.0.12 [2018-04-02T07:41:54.247Z] CB: WIFI: IP Address: 192.168.178.53 [2018-04-02T07:41:54.287Z] INET: State change to 3 [2018-04-02T07:41:54.289Z] INET: Ping probe [2018-04-02T07:41:54.301Z] INET: Ping response from PIC32INT, set as default [2018-04-02T07:41:54.304Z] INET: State change to 4 [2018-04-02T07:41:54.803Z] LORA: Wait init complete, waiting for application. [2018-04-02T07:41:54.806Z] LORA: Changing state from 1 to 2 [2018-04-02T07:41:56.838Z] SNTP: State change from 2 to 3 [2018-04-02T07:41:57.172Z] MON: SYS Stack size: 3959 [2018-04-02T07:41:57.175Z] MON: heap usage: 148KB (157KB), free: 192KB [2018-04-02T07:41:57.936Z] SNTP: State change from 3 to 4 [2018-04-02T07:41:59.032Z] SNTP: State change from 4 to 5 [2018-04-02T07:41:59.044Z] SNTP: State change from 5 to 6 [2018-04-02T07:41:59.047Z] SNTP: State change from 6 to 7 [2018-04-02T07:41:59.050Z] INET: State change to 5 [2018-04-02T07:41:59.053Z] [2018-04-02T07:41:59.055Z] MAIN: Leaving state 2 [2018-04-02T07:41:59.057Z] MAIN: Entering state 3 [2018-04-02T07:41:59.058Z] [2018-04-02T07:41:59.060Z] CNFG: Load online user config state change to 4 [2018-04-02T07:41:59.063Z] HTTP: Close active socket 0 [2018-04-02T07:41:59.066Z] HTTP: Starting connection [2018-04-02T07:42:02.071Z] HTTPS: Connection Opened: Starting TLS Negotiation [2018-04-02T07:42:02.074Z] HTTP: Wait for TLS Connect [2018-04-02T07:42:02.534Z] HTTP: TLS Connection Opened: Starting Clear Text Communication [2018-04-02T07:42:02.562Z] HTTP: Got 1480 bytes [2018-04-02T07:42:04.563Z] HTTP: Connection Closed [2018-04-02T07:42:04.565Z] HTTP: Close active socket 1 [2018-04-02T07:42:04.567Z] CONF: Parsing response token: HTTP/1.1 200 OK [2018-04-02T07:42:04.572Z] CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883 [2018-04-02T07:42:04.574Z] [2018-04-02T07:42:04.577Z] CNFG: Load online user config state change to 6 [2018-04-02T07:42:06.566Z] FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870 [2018-04-02T07:42:06.569Z] HTTP: Starting connection [2018-04-02T07:42:06.579Z] HTTPS: Connection Opened: Starting TLS Negotiation [2018-04-02T07:42:06.582Z] HTTP: Wait for TLS Connect [2018-04-02T07:42:07.077Z] HTTP: TLS Connection Opened: Starting Clear Text Communication [2018-04-02T07:42:07.091Z] HTTP: Got 1232 bytes [2018-04-02T07:42:07.153Z] MON: SYS Stack size: 2869 [2018-04-02T07:42:07.156Z] MON: heap usage: 228KB (234KB), free: 110KB [2018-04-02T07:42:09.086Z] HTTP: Connection Closed [2018-04-02T07:42:09.089Z] HTTP: Close active socket 1 [2018-04-02T07:42:09.091Z] [2018-04-02T07:42:09.093Z] CNFG: Load online user config state change to 7 [2018-04-02T07:42:09.095Z] [2018-04-02T07:42:09.097Z] CNFG: Configuring LoRa module [2018-04-02T07:42:09.101Z] LORA: Changing state from 2 to 4 [2018-04-02T07:42:09.103Z] LORA: Starting reconfiguration [2018-04-02T07:42:09.111Z] LORA: version: 01 [2018-04-02T07:42:09.122Z] LORA: Configuration failed, retry [2018-04-02T07:42:09.139Z] LORA: Starting reconfiguration [2018-04-02T07:42:15.103Z] LORA: version: 01 [2018-04-02T07:42:15.120Z] LORA: Configuration failed, retry [2018-04-02T07:42:15.149Z] LORA: Starting reconfiguration [2018-04-02T07:42:17.135Z] MON: SYS Stack size: 2869 [2018-04-02T07:42:17.137Z] MON: heap usage: 154KB (234KB), free: 185KB [2018-04-02T07:42:21.109Z] LORA: version: 01 [2018-04-02T07:42:21.127Z] LORA: Configuration failed, retry [2018-04-02T07:42:21.145Z] LORA: RESET MODULE [2018-04-02T07:42:24.002Z] LORA: ChaSNTP: State change from 0 to 0 [2018-04-02T07:42:24.005Z] SNTP: State change from 0 to 0 [2018-04-02T07:42:24.007Z] [2018-04-02T07:42:24.008Z] [2018-04-02T07:42:24.009Z] [2018-04-02T07:42:24.012Z] ************************** [2018-04-02T07:42:24.013Z] * The Things Network * [2018-04-02T07:42:24.016Z] * G A T E W A Y * [2018-04-02T07:42:24.017Z] ************************** [2018-04-02T07:42:24.023Z] Firmware name: AmazingAckermann, type: 0, version: 1.0.2, commit: 475aef56, timestamp: 1521108973 [2018-04-02T07:42:24.043Z] Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 [2018-04-02T07:42:24.045Z] Build time: Mar 15 2018 10:16:33 [2018-04-02T07:42:24.063Z] Reboot reason: 0x10 [2018-04-02T07:42:24.069Z] BOOT: (persisted info) 6F 72 72 65 01 03 C3 2C E7 16 0D C9 92 3A 54 94 [2018-04-02T07:42:24.070Z] ```


So:

cyberjunky commented 6 years ago

Yeah 1.0.3 is the same as develop branch, I run it for some days now (with bootloader v2), and it seems to be able to reach an uptime of 86400 sec, which is the hardcoded 24 hours reboot cycle. screenshot from 2018-04-02 10-59-04

Version Info  
Hardware: v1
Bootloader: r2-c463e87e (2018-02-23T14:42:40Z)
Firmware: v1.0.3-2c56ce09 (2018-03-22T12:02:04Z)
cyberjunky commented 6 years ago

But it has issues forwarding packets as if it doesn't connect to the cloud correctly, it says it has, but see no data.

KrishnaIyer commented 6 years ago

@cyberjunky: If you are able to see that the gateway is connected on you console, that means that it is sending status packets properly. Do you have a device nearby sending uplinks?

cyberjunky commented 6 years ago

@KrishnaIyer I have a kiss-lora and a ttn-uno device with dust-sensor on my desk sending packets 24/7, I restarted them, the gw is online, but packet count doesn't go up in console gw stats. Last Seen 12 seconds ago Received Messages 71305 Transmitted Messages 62 Uno stopped to upload packets 5 hours ago, rebooting gw and device didn't seem to help. Status 5 hours ago Frames up 6774 Frames down 0 I will hook up my serial cable again to see what gw is reporting, will report back

cyberjunky commented 6 years ago

@KrishnaIyer and it's like visiting the dentist again, hooked up uart cable, saw no packets from devices, only mqtt status packets, rebooted gw again and it started working. See attached log, you can see one LORA UART TIMEOUT thought during init. Both kiss-lora and ttn-uno device report now to cloud, before it looked like as if lora board was not initialized correctly and could not receive packets or devices couldn't register but rest of gw worked somehow. (hence the mqtt status packets and gw up status in console)

2018-04-02 log

cyberjunky commented 6 years ago

If i look back the 24 hour hardcoded reboot early this morning stopped my sensor for being connected to the cloud and report, so it did more harm then good to be honest. Can this be disabled, if someone has unticked Automatically update gateway in console settings?

KrishnaIyer commented 6 years ago

@cyberjunky :

We are looking at a way to better handle the firmware update process and we should have some solutions soon. Thanks!

cyberjunky commented 6 years ago

@KrishnaIyer I have uplink packets every 30secs with my two sensors placed near the gw, so loss of connection because of stale communication cannot be the reason here. Will leave the logging active for now.

avbentem commented 6 years ago

Bummer, version 1.0.3 stopped receiving uplinks (after 7 hours, following a reboot after an MQTT error). A manual reboot fixed it. Though reported above earlier, I'd say it's unrelated to any reboot loop but I could not find any other open issue about it. So I've opened a new issue: #29.

egarl004 commented 6 years ago

So - it seems that I have resolved my issues by performing the following steps:

DefProc commented 6 years ago

I have this exact issue yesterday after I pulled the gateway off the window and dropped it on the floor!

This was enough to dislodge the LoRa board at the card connection, and it sat in a reboot loop for 7 hours...

All it needed was to press the board back in so none of the gold connections were visible, and it started working again.

jurrienjurrien commented 6 years ago

With the latest firmwares, both stable and development releases via SD card, the frequent reboot doesn't occur any more. After a fresh provisioning like egarl004 explained, my gateway now repeats the following log entries once I'm in step 4 of the activation process.

LORA: UART TIMEOUT
LORA: UART TIMEOUT
MON: SYS Stack size: 2845
MON: heap usage: 151KB (233KB), free: 188KB
LORA: UART TIMEOUT
LORA: Close and reopen UART on 115200 baud.
LORA: Changing state from 2 to 1
LORA: Wait init complete, check for communication on 115200 baud.
LORA: Changing state from 1 to 2
LORA: UART TIMEOUT
MON: SYS Stack size: 2845
MON: heap usage: 151KB (233KB), free: 188KB
LORA: UART TIMEOUT
LORA: UART TIMEOUT
LORA: UART TIMEOUT

Manual restart by button of power disconnect has the same effect. Details of the gateway after a reboot by disconnecting power are

Firmware name: AmazingAckermann, type: 0, version: 1.0.3, commit: a9d6c1a7, timestamp: 1523035644
Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298
Build time: Apr  6 2018 17:28:25
Reboot reason: 0x03
BOOT: (persisted info) 6F 72 72 65 01 03 BD 7C EF FE F9 BA 77 6B 2C E7 
eddyvdh commented 6 years ago

Flashed my "reboot loop" TTN gateway to the beta (1.0.3) version with bootloader r2. Now the reboot loop is solved, but still lots of LORA: UART WRITE ERROR!'s (new bootloader, so Lora board communication should be solved?). Despite of setting in Console: no automatic update and no beta!, “new” firmware was downloaded, version 1.0.2. This version did not connect to my WIFI! Again flashed with 1.0.3 (beta) with bootloader r2, but now in Console settings: NO automatic update and YES Beta. And again, after a series of LORA: UART WRITE ERROR!’s it requests a new firmware download. (now V1.0.3 – because of the Yes beta in Console?). And at the end, despite of LORA communication problems (WRITE ERRORS, Bad CRC’s and Kicking Lora because of time-out) a working TTN Gateway!!!!


**************************
*   The Things Network   *
*      G A T E W A Y     *
**************************

Firmware name: AmazingAckermann, type: 0, version: 1.0.3, commit: 2c56ce09, timestamp: 1521721252
Bootloader revision: 2, commit: c463e87e, timestamp: 1519396960
Build time: Mar 22 2018 12:21:52
Reboot reason: 0x01
BOOT: (persisted info) 6F 72 72 65 01 03 AE 97 F1 78 38 80 79 B6 29 75

WIFI: Entering state 0
WIFI: Entering SCAN state 0

MAIN: Initialisation complete
LORA: Changing state from 0 to 0

MAIN: Leaving state 0
MAIN: Entering state 1
FLASH: Magic bytes found: wifi config present
FLASH: Magic bytes found: activation data present
FLASH: Magic bytes found: FOTA data present
FLASH: Loading Firmware Data
CNFG: (Firmware HASH (sha256)) 87 93 F2 0A xx yy zz
FLASH: Loading WiFi Data
CNFG: WiFi SSID:      WLAN12
CNFG: WiFi key:       ***
CNFG: WiFi conn_type: 1
CNFG: WiFi sec_type:  4
FLASH: Loading Activation Data
CNFG: Gateway ID:         cicon
CNFG: Gateway Key:        ***
CNFG: Account Server URL: https://account.thethingsnetwork.org
CNFG: Locked:             true
CNFG: Locked first time:  false

MAIN: Leaving state 1
MAIN: Entering state 2
INET: State change to 0
LORA: Initialisation complete
LORA: Changing state from 0 to 1
WIFI: Entering state 1
ETH: IP Address: 0.0.0.0
WIFI: Entering state 4
WIFI: Entering SCAN state 1
SNTP: State change from 0 to 1
Scan is completed successfully
WIFI: Entering SCAN state 2
WIFI: Entering SCAN state 5
WIFI: Entering SCAN state 0
WIFI: Entering state 2
WIFI: Disabling modules
Head magic match void: trying to free an already freed block, ignore
SNTP: State change from 1 to 1
WIFI: Entering state 3
WIFI: Enabling modules for client
WIFI: Entering state 6

>WIFI: IP Address: 0.0.0.0
LORA: Wait init complete, check for communication on 115200 baud.
LORA: Changing state from 1 to 2
LORA: Communication on 115200 OK, waiting for application.
LORA: Changing state from 2 to 4
CB: INET: Gateway has WiFi
INET: State change to 2
INET: Connected to a network, waiting for DHCP lease, checking validity with ping
SNTP: State change from 1 to 2
MON: SYS Stack size: 3959
MON: heap usage: 147KB (156KB), free: 192KB
WIFI: IP Address: 192.168.0.55
INET: State change to 3
INET: Ping probe
INET: Error sending probe on Eth
INET: Ping response from MRF24WN, set as default
INET: State change to 4
SNTP: State change from 2 to 3
SNTP: State change from 3 to 4
SNTP: State change from 4 to 5
SNTP: State change from 5 to 6
SNTP: State change from 6 to 7
INET: State change to 5

MAIN: Leaving state 2
MAIN: Entering state 3

CNFG: Load online user config state change to 4
HTTP: Close active socket 0
HTTP: Starting connection
HTTPS: Connection Opened: Starting TLS Negotiation
HTTP: Wait for TLS Connect
HTTP: TLS Connection Opened: Starting Clear Text Communication
HTTP: Got 1417 bytes
HTTP: Connection Closed
HTTP: Close active socket 1
CONF: Parsing response token: HTTP/1.1 200 OK
CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883

CNFG: Load online user config state change to 6
MON: SYS Stack size: 2870
MON: heap usage: 151KB (233KB), free: 188KB
FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870
HTTP: Starting connection
HTTPS: Connection Opened: Starting TLS Negotiation
HTTP: Wait for TLS Connect
HTTP: TLS Connection Opened: Starting Clear Text Communication
HTTP: Got 1232 bytes
HTTP: Connection Closed
HTTP: Close active socket 1

CNFG: Load online user config state change to 7

CNFG: Configuring LoRa module
LORA: Changing state from 4 to 6
LORA: Starting reconfiguration
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: version: 00
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: Configuration failed, retry
LORA: Starting reconfiguration
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: version: 00
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: Configuration failed, retry
LORA: Starting reconfiguration
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: version: 00
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: Configuration failed, retry
LORA: RESET MODULE
LORA: Changing state from 6 to 0
LORA: Initialisation complete
LORA: Changing state from 0 to 1
MON: SYS Stack size: 2870
MON: heap usage: 151KB (233KB), free: 188KB
LORA: Wait init complete, check for communication on 115200 baud.
LORA: Changing state from 1 to 2
LORA: Communication on 115200 OK, waiting for application.
LORA: Changing state from 2 to 4
LORA: Changing state from 4 to 6
LORA: Starting reconfiguration
LORA: version: 01
LORA: UART TIMEOUT
LORA: Configuration succeeded
LORA: Starting operation
LORA: Changing state from 6 to 8
LORA: Changing state from 8 to 5
LORA: GOING ASYNC
LORA: Changing state from 5 to 11

CNFG: Load online user config state change to 9

MAIN: Leaving state 3
MAIN: Entering state 4
FLASH: Loading FOTA Data
FIRM: Requesting key ...
HTTP: Starting connection
HTTPS: Connection Opened: Starting TLS Negotiation
HTTP: Wait for TLS Connect
HTTP: TLS Connection Opened: Starting Clear Text Communication
MON: SYS Stack size: 2837
MON: heap usage: 246KB (252KB), free: 93KB
HTTP: Got 515 bytes
HTTP: Connection Closed
HTTP: Close active socket 1
FIRM: Starting download
FIRM: available bytes: 79
FIRM: (Downloaded FOTA key) 14 3E 99 52 xx yy zz
FIRM: (Stored FOTA key) 87 93 F2 0A xx yy zz
FLASH: Erasing FOTA Data and Image
MON: SYS Stack size: 2837
MON: heap usage: 168KB (252KB), free: 171KB
LORA: Packet dropped! Bad CRC
MON: SYS Stack size: 2837
MON: heap usage: 168KB (252KB), free: 171KB
MON: SYS Stack size: 2837
MON: heap usage: 168KB (252KB), free: 171KB
MON: SYS Stack size: 2837
MON: heap usage: 168KB (252KB), free: 171KB
MON: SYS Stack size: 2837
MON: heap usage: 168KB (252KB), free: 171KB
FLASH: Storing FOTA Checksum
FIRM: Finishing writing to storage
FIRM: New firmware found, start downloading!
FIRM: (OLD key) 87 93 F2 0A xx yy zz
FIRM: (NEW key) 14 3E 99 52 xx yy zz
FIRM: Requesting firmware ...
HTTP: Starting connection
HTTPS: Connection Opened: Starting TLS Negotiation
HTTP: Wait for TLS Connect
HTTP: TLS Connection Opened: Starting Clear Text Communication
FIRM: Starting download
FIRM: available bytes: 583
FLASH: Storing FOTA Image
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
LORA: Accepted packet
LORA: Accepted packet
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
LORA: Kick LoRa module with ACK after not acked it for 60s
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
LORA: Accepted packet
LORA: Accepted packet
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
LORA: Packet dropped! Bad CRC
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
MON: SYS Stack size: 2837
MON: heap usage: 246KB (253KB), free: 93KB
HTTP: Connection Closed
FIRM: Finishing writing to storage
FLASH: Finalizing FOTA

MAIN: NEW FIRMWA
*** Application reboot

SNTP: State change from 0 to 0
SNTP: State change from 0 to 0

**************************
*   The Things Network   *
*      G A T E W A Y     *
**************************
Firmware name: AmazingAckermann, type: 0, version: 1.0.3, commit: 2c56ce09, timestamp: 1521721252
Bootloader revision: 2, commit: c463e87e, timestamp: 1519396960
Build time: Mar 22 2018 12:21:52
Reboot reason: 0x40
BOOT: (persisted info) 6F 72 72 65 01 03 AE 97 F1 78 38 80 79 B6 29 75

WIFI: Entering state 0
WIFI: Entering SCAN state 0

MAIN: Initialisation complete
LORA: Changing state from 0 to 0

MAIN: Leaving state 0
MAIN: Entering state 1
FLASH: Magic bytes found: wifi config present
FLASH: Magic bytes found: activation data present
FLASH: Magic bytes found: FOTA data present
FLASH: Loading Firmware Data
CNFG: (Firmware HASH (sha256)) 14 3E 99 52 xx yy zz
FLASH: Loading WiFi Data
CNFG: WiFi SSID:      WLAN12
CNFG: WiFi key:       ***
CNFG: WiFi conn_type: 1
CNFG: WiFi sec_type:  4
FLASH: Loading Activation Data
CNFG: Gateway ID:         cicon
CNFG: Gateway Key:        ***
CNFG: Account Server URL: https://account.thethingsnetwork.org
CNFG: Locked:             true
CNFG: Locked first time:  false

MAIN: Leaving state 1
MAIN: Entering state 2
INET: State change to 0
LORA: Initialisation complete
LORA: Changing state from 0 to 1
WIFI: Entering state 1
ETH: IP Address: 0.0.0.0
WIFI: Entering state 4
WIFI: Entering SCAN state 1
SNTP: State change from 0 to 1
Scan is completed successfully
WIFI: Entering SCAN state 2
WIFI: Entering SCAN state 5
WIFI: Entering SCAN state 0
WIFI: Entering state 2
WIFI: Disabling modules
Head magic match void: trying to free an already freed block, ignore
SNTP: State change from 1 to 1
WIFI: Entering state 3
WIFI: Enabling modules for client
WIFI: Entering state 6

>WIFI: IP Address: 0.0.0.0
CB: INET: Gateway has WiFi
INET: State change to 2
INET: Connected to a network, waiting for DHCP lease, checking validity with ping
SNTP: State change from 1 to 2
LORA: Wait init complete, check for communication on 115200 baud.
LORA: Changing state from 1 to 2
LORA: Communication on 115200 OK, waiting for application.
LORA: Changing state from 2 to 4
CB: MON: SYS Stack size: 3959
MON: heap usage: 147KB (156KB), free: 192KB
INET: State change to 3
INET: Ping probe
INET: Error sending probe on Eth
SNTP: State change from 2 to 6
INET: Ping Timeout
INET: Ping probe
INET: Error sending probe on Eth
WIFI: IP Address: 192.168.0.55
INET: Ping Timeout
INET: Ping probe
INET: Error sending probe on Eth
INET: Ping response from MRF24WN, set as default
INET: State change to 4
SNTP: State change from 6 to 1
INET: Initiated NTP request.
SNTP: State change from 1 to 2
MON: SYS Stack size: 3959
MON: heap usage: 147KB (156KB), free: 192KB
SNTP: State change from 2 to 3
SNTP: State change from 3 to 4
SNTP: State change from 4 to 5
SNTP: State change from 5 to 6
SNTP: State change from 6 to 7
INET: State change to 5

MAIN: Leaving state 2
MAIN: Entering state 3

CNFG: Load online user config state change to 4
HTTP: Close active socket 0
HTTP: Starting connection
HTTPS: Connection Opened: Starting TLS Negotiation
HTTP: Wait for TLS Connect
HTTP: TLS Connection Opened: Starting Clear Text Communication
HTTP: Got 1417 bytes
HTTP: Connection Closed
HTTP: Close active socket 1
CONF: Parsing response token: HTTP/1.1 200 OK
CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883

CNFG: Load online user config state change to 6
FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870
HTTP: Starting connection
HTTPS: Connection Opened: Starting TLS Negotiation
HTTP: Wait for TLS Connect
HTTP: TLS Connection Opened: Starting Clear Text Communication
HTTP: Got 1232 bytes
HTTP: Connection Closed
HTTP: Close active socket 1

CNFG: Load online user config state change to 7

CNFG: Configuring LoRa module
LORA: Changing state from 4 to 6
LORA: Starting reconfiguration
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: version: 00
LORA: UART WRITE ERROR!
MON: SYS Stack size: 2870
MON: heap usage: 152KB (234KB), free: 187KB
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: Configuration failed, retry
LORA: Starting reconfiguration
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: version: 00
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: Configuration failed, retry
LORA: Starting reconfiguration
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: version: 00
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: UART WRITE ERROR!
LORA: Configuration failed, retry
LORA: RESET MODULE
LORA: Changing state from 6 to 0
LORA: Initialisation complete
LORA: Changing state from 0 to 1
LORA: Wait init complete, check for communication on 115200 baud.
LORA: Changing state from 1 to 2
LORA: Communication on 115200 OK, waiting for application.
LORA: Changing state from 2 to 4
LORA: Changing state from 4 to 6
LORA: Starting reconfiguration
LORA: version: 01
LORA: UART TIMEOUT
LORA: Configuration succeeded
LORA: Starting operation
LORA: Changing state from 6 to 8
MON: SYS Stack size: 2870
MON: heap usage: 152KB (234KB), free: 187KB
LORA: Changing state from 8 to 5
LORA: GOING ASYNC
LORA: Changing state from 5 to 11

CNFG: Load online user config state change to 9

MAIN: Leaving state 3
MAIN: Entering state 4
FLASH: Loading FOTA Data
FIRM: Requesting key ...
HTTP: Starting connection
HTTPS: Connection Opened: Starting TLS Negotiation
HTTP: Wait for TLS Connect
HTTP: TLS Connection Opened: Starting Clear Text Communication
HTTP: Got 515 bytes
HTTP: Connection Closed
HTTP: Close active socket 1
FIRM: Starting download
FIRM: available bytes: 79
FIRM: (Downloaded FOTA key) 14 3E 99 52 xx yy zz
FIRM: (Stored FOTA key) 14 3E 99 52 xx yy zz
FIRM: Firmware is already downloaded
MAIN: No new firmware available

MAIN: Leaving state 4
MAIN: Entering state 5
MQTT: GOT IP: 52.169.76.203
Connecting to: 52.169.76.203
MQTT: Connection Opened: Starting TLS Negotiation
MQTT: Wait for SSL Connect
MQTT: TLS ready: Connect MQTT
RQMQTT: Connected

*************************
MAIN: Gateway bridging
*************************

MQTT: Sending status packet
MQTT: Report reboot error: 0103
MQTT: Report config error: 0600000080
MQTT: Sending status succeeded: 0
MON: SYS Stack size: 2831
MON: heap usage: 262KB (263KB), free: 76KB
MON: SYS Stack size: 2831
MON: heap usage: 262KB (263KB), free: 76KB
MON: SYS Stack size: 2831
MON: heap usage: 262KB (263KB), free: 76KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 1
MON: SYS Stack size: 2831
MON: heap usage: 262KB (263KB), free: 77KB
MON: SYS Stack size: 2831
MON: heap usage: 262KB (263KB), free: 77KB
MON: SYS Stack size: 2831
MON: heap usage: 262KB (263KB), free: 77KB
LORA: Accepted packet
MQTT: Sending UPLINK OK
LORA: Accepted packet
MQTT: Sending UPLINK OK
MQTT: Sending status packet
MQTT: Sending status succeeded: 2
MON: SYS Stack size: 2831
MON: heap usage: 262KB (263KB), free: 77KB
MON: SYS Stack size: 2831
MON: heap usage: 262KB (263KB), free: 77KB
LORA: Packet dropped! Bad CRC
MON: SYS Stack size: 2831
MON: heap usage: 262KB (266KB), free: 77KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 3
MON: SYS Stack size: 2831
MON: heap usage: 262KB (266KB), free: 77KB
MON: SYS Stack size: 2831
MON: heap usage: 262KB (266KB), free: 77KB
MON: SYS Stack size: 2831
MON: heap usage: 262KB (266KB), free: 77KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 4
MON: SYS Stack size: 2831
MON: heap usage: 262KB (266KB), free: 77KB
LORA: Packet dropped! Bad CRC
LORA: Accepted packet
MQTT: Sending UPLINK OK
LORA: Accepted packet
MQTT: Sending UPLINK OK
MON: SYS Stack size: 2831
MON: heap usage: 262KB (266KB), free: 77KB
MON: SYS Stack size: 2831
MON: heap usage: 262KB (266KB), free: 77KB
MQTT: Sending status packet
MQTT: Sending status succeeded: 5
jurrienjurrien commented 6 years ago

This afternoon I've downloaded the latest develop firmware and the gateway was working fine for about 20 minutes.

Firmware name: AmazingAckermann, type: 0, version: 1.0.3, commit: 2d743f4f, timestamp: 1523350945
Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298
Build time: Apr 10 2018 09:03:31
Reboot reason: 0x03
BOOT: (persisted info) 6F 72 72 65 01 03 BD 5C EF FE F9 BA 67 6A 2C F7 

After about 20 minutes the gateway restarted because of a MQTT error according to the log. Meanwhile a new firmware was installed although I unchecked the boxes Automatically update gateway and Beta Updates in the gateway settings of TTN console.

MQTT: Sending status packet
MQTT: Sending status succeeded: 41
MON: SYS Stack size: 2847
MON: heap usage: 261KB (262KB), free: 77KB
MON: SYS Stack size: 2847
MON: heap usage: 261KB (262KB), free: 77KB
LORA: Kick LoRa module with ACK after not acked it for 60s
MON: SYS Stack size: 2847
MON: heap usage: 261KB (262KB), free: 77KB
MQTT: Sending status packet
MQTT: Sending status failed

MAIN: MQTT error

MAIN: Leaving state 5
SNTP: State change from 0 to 0
SNTP: State change from 0 to 0

**************************
*   The Things Network   *
*      G A T E W A Y     *
**************************
Firmware name: AmazingAckermann, type: 0, version: 1.0.3, commit: fd0901ae, timestamp: 1523880794
Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298
Build time: Apr 16 2018 12:14:13
Reboot reason: 0x10
BOOT: (persisted info) 6F 72 72 65 01 10 BD 5C EF FE F9 BA 67 6A 2C F7 

Unfortunately after this restart the gateway doesn't connect any more according to the logs. Soft via the button and hard restart via power disconnect gives the same result.

LORA: UART TIMEOUT
LORA: UART TIMEOUT
LORA: Close and reopen UART on 115200 baud.
LORA: Changing state from 2 to 1
MON: SYS Stack size: 2859
MON: heap usage: 151KB (233KB), free: 188KB
LORA: Wait init complete, check for communication on 115200 baud.
LORA: Changing state from 1 to 2
LORA: UART TIMEOUT
MON: SYS Stack size: 2859
MON: heap usage: 151KB (233KB), free: 188KB
LORA: UART TIMEOUT
LORA: UART TIMEOUT
htdvisser commented 6 years ago

Meanwhile a new firmware was installed although I unchecked the boxes Automatically update gateway and Beta Updates in the gateway settings of TTN console.

That's interesting. Your logs show that it installed version: 1.0.3, commit: fd0901ae, but that version isn't on any of our update channels at the moment. We retracted 1.0.3 because of those LORA: UART errors.

mrjdomingus commented 6 years ago

Hi, I am happy to inform that after having updated my faulty gateway to below bootloader and firmware versions with a PICkit3 all my gateway isseus appear te be resolved:

Version Info  
Hardware: v1
Bootloader: r2-c463e87e (2018-02-23T14:42:40Z)
Firmware: v1.0.3-485eaceb (2018-04-21T15:57:49Z)
smbunn commented 6 years ago

Mine has been up for 24 hours, never got more than 30 minutes before this latest update. Maybe its fixed, fingers crossed

smbunn commented 6 years ago
**************************
*   The Things Network   *
*      G A T E W A Y     *
**************************
Firmware name: AmazingAckermann, type: 0, version: 1.0.3, commit: 2c56ce09, timestamp: 1521721252
Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298
Build time: Mar 22 2018 12:21:52
Reboot reason: 0x03
BOOT: (persisted info) 6F 72 72 65 01 03 57 B3 ED 9B 84 CE 7A 7E CE 8D

This is my version, now running steadily for 36 hours

smbunn commented 6 years ago

Spoke too soon. As long as I do not cycle power, touch my gateway physically or look at it funny it runs. Do anything else and it goes into reboot loop. Complains that LoRa UART is not communicating. I do the full pink button initialise gateway, follow all steps and voila, it works again until next time I touch it, cycle power or yes, look at it funny.

avbentem commented 6 years ago

While 1.0.3 (commit: 2c56ce09, timestamp: 1521721252, Build time: Mar 22 2018 12:21:52) was not getting me the reboot loop, today's 1.0.4 is. Connected through ethernet. Reverted back to 1.0.3 now (which is giving me #8).

Reboot loop in 1.0.4 Timestamps added by https://github.com/avbentem/raspi-uart-monitor ```text [2018-05-02T17:28:18.788Z] ************************** [2018-05-02T17:28:18.789Z] * The Things Network * [2018-05-02T17:28:18.792Z] * G A T E W A Y * [2018-05-02T17:28:18.794Z] ************************** [2018-05-02T17:28:18.802Z] Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525259181 [2018-05-02T17:28:18.819Z] Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 [2018-05-02T17:28:18.831Z] Build time: May 2 2018 11:07:39 [2018-05-02T17:28:18.833Z] Reboot reason: 0x10 [2018-05-02T17:28:18.839Z] BOOT: (persisted info) 6F 72 72 65 01 03 8B 2C E7 16 0D 49 B2 32 50 B4 [2018-05-02T17:28:18.840Z] [2018-05-02T17:28:18.840Z] [2018-05-02T17:28:18.841Z] [2018-05-02T17:28:18.841Z] [2018-05-02T17:28:18.853Z] WIFI: Entering state 0 [2018-05-02T17:28:18.855Z] WIFI: Entering SCAN state 0 [2018-05-02T17:28:18.856Z] [2018-05-02T17:28:18.857Z] MAIN: Initialisation complete [2018-05-02T17:28:18.858Z] LORA: Changing state from 0 to 0 [2018-05-02T17:28:19.026Z] [2018-05-02T17:28:19.028Z] MAIN: Leaving state 0 [2018-05-02T17:28:19.030Z] MAIN: Entering state 1 [2018-05-02T17:28:19.039Z] FLASH: Magic bytes found: wifi config present [2018-05-02T17:28:19.043Z] FLASH: Magic bytes found: activation data present [2018-05-02T17:28:19.047Z] FLASH: Magic bytes found: FOTA data present [2018-05-02T17:28:19.050Z] FLASH: Loading Firmware Data [2018-05-02T17:28:19.062Z] CNFG: (Firmware HASH (sha256)) 65 0D 50 41 6F 3C 7A 21 B0 6A 61 4A FF BE C3 DD 3F 8A 2C 8F D1 98 70 9F 71 EF C5 53 6A 7D 31 AF [2018-05-02T17:28:19.065Z] FLASH: Loading WiFi Data [2018-05-02T17:28:19.067Z] CNFG: WiFi SSID: [2018-05-02T17:28:19.070Z] CNFG: WiFi key: *** [2018-05-02T17:28:19.072Z] CNFG: WiFi conn_type: 1 [2018-05-02T17:28:19.074Z] CNFG: WiFi sec_type: 4 [2018-05-02T17:28:19.076Z] FLASH: Loading Activation Data [2018-05-02T17:28:19.080Z] CNFG: Gateway ID: arjanvanb-gw-1 [2018-05-02T17:28:19.083Z] CNFG: Gateway Key: *** [2018-05-02T17:28:19.089Z] CNFG: Account Server URL: https://account.thethingsnetwork.org [2018-05-02T17:28:19.091Z] CNFG: Locked: true [2018-05-02T17:28:19.094Z] CNFG: Locked first time: false [2018-05-02T17:28:19.095Z] [2018-05-02T17:28:19.097Z] MAIN: Leaving state 1 [2018-05-02T17:28:19.099Z] MAIN: Entering state 2 [2018-05-02T17:28:19.105Z] INET: State change to 0 [2018-05-02T17:28:19.402Z] LORA: Initialisation complete [2018-05-02T17:28:19.405Z] LORA: Changing state from 0 to 1 [2018-05-02T17:28:19.652Z] WIFI: Entering state 1 [2018-05-02T17:28:19.654Z] ETH: IP Address: 0.0.0.0 [2018-05-02T17:28:19.656Z] WIFI: Entering state 4 [2018-05-02T17:28:19.659Z] WIFI: Entering SCAN state 1 [2018-05-02T17:28:20.080Z] Scan is completed successfully [2018-05-02T17:28:20.082Z] WIFI: Entering SCAN state 2 [2018-05-02T17:28:20.090Z] WIFI: Entering SCAN state 5 [2018-05-02T17:28:20.093Z] WIFI: Entering SCAN state 0 [2018-05-02T17:28:20.095Z] WIFI: Entering state 2 [2018-05-02T17:28:20.097Z] WIFI: Disabling modules [2018-05-02T17:28:20.103Z] Head magic match void: trying to free an already freed block, ignore [2018-05-02T17:28:20.105Z] WIFI: Entering state 3 [2018-05-02T17:28:20.744Z] SNTP: State change from 0 to 1 [2018-05-02T17:28:20.870Z] INET: Gateway has Ethernet [2018-05-02T17:28:20.872Z] INET: State change to 2 [2018-05-02T17:28:20.878Z] INET: Connected to a network, waiting for DHCP lease, checking validity with ping [2018-05-02T17:28:20.969Z] WIFI: Enabling modules for client [2018-05-02T17:28:20.972Z] WIFI: Entering state 6 [2018-05-02T17:28:20.974Z] [2018-05-02T17:28:20.975Z] [2018-05-02T17:28:20.976Z] >WIFI: IP Address: 0.0.0.0 [2018-05-02T17:28:22.939Z] CB: SNTP: State change from 1 to 2 [2018-05-02T17:28:23.838Z] ETH: IP Address: 192.168.0.12 [2018-05-02T17:28:25.834Z] WIFI: IP Address: 192.168.178.53 [2018-05-02T17:28:25.863Z] INET: State change to 3 [2018-05-02T17:28:25.865Z] INET: Ping probe [2018-05-02T17:28:25.876Z] INET: Ping response from PIC32INT, set as default [2018-05-02T17:28:25.878Z] INET: State change to 4 [2018-05-02T17:28:26.396Z] LORA: Wait init complete, waiting for application. [2018-05-02T17:28:26.398Z] LORA: Changing state from 1 to 2 [2018-05-02T17:28:28.427Z] SNTP: State change from 2 to 3 [2018-05-02T17:28:28.766Z] MON: SYS Stack size: 3965 [2018-05-02T17:28:28.768Z] MON: TCPIP Stack size: 3815 [2018-05-02T17:28:28.771Z] MON: APP Stack size: 7951 [2018-05-02T17:28:28.773Z] MON: LoRa Stack size: 3915 [2018-05-02T17:28:28.777Z] MON: heap usage: 164KB (172KB), free: 176KB [2018-05-02T17:28:29.525Z] SNTP: State change from 3 to 4 [2018-05-02T17:28:30.623Z] SNTP: State change from 4 to 5 [2018-05-02T17:28:37.207Z] SNTP: State change from 5 to 6 [2018-05-02T17:28:37.210Z] SNTP: State change from 6 to 1 [2018-05-02T17:28:37.213Z] INET: Initiated NTP request. [2018-05-02T17:28:38.304Z] SNTP: State change from 1 to 2 [2018-05-02T17:28:38.753Z] MON: SYS Stack size: 3965 [2018-05-02T17:28:38.755Z] MON: TCPIP Stack size: 3806 [2018-05-02T17:28:38.758Z] MON: APP Stack size: 7951 [2018-05-02T17:28:38.760Z] MON: LoRa Stack size: 3915 [2018-05-02T17:28:38.764Z] MON: heap usage: 167KB (172KB), free: 172KB [2018-05-02T17:28:39.403Z] SNTP: State change from 2 to 3 [2018-05-02T17:28:40.500Z] SNTP: State change from 3 to 4 [2018-05-02T17:28:41.598Z] SNTP: State change from 4 to 5 [2018-05-02T17:28:41.607Z] SNTP: State change from 5 to 6 [2018-05-02T17:28:41.612Z] SNTP: State change from 6 to 7 [2018-05-02T17:28:41.615Z] INET: State change to 5 [2018-05-02T17:28:41.616Z] [2018-05-02T17:28:41.617Z] MAIN: Leaving state 2 [2018-05-02T17:28:41.619Z] MAIN: Entering state 3 [2018-05-02T17:28:41.620Z] [2018-05-02T17:28:41.622Z] CNFG: Load online user config state change to 4 [2018-05-02T17:28:41.624Z] HTTP: Close active socket 0 [2018-05-02T17:28:41.626Z] HTTP: Starting connection [2018-05-02T17:28:41.635Z] HTTPS: Connection Opened: Starting TLS Negotiation [2018-05-02T17:28:41.638Z] HTTP: Wait for TLS Connect [2018-05-02T17:28:42.088Z] HTTP: TLS Connection Opened: Starting Clear Text Communication [2018-05-02T17:28:42.118Z] HTTP: Got 1477 bytes [2018-05-02T17:28:44.118Z] HTTP: Connection Closed [2018-05-02T17:28:44.120Z] HTTP: Close active socket 1 [2018-05-02T17:28:44.124Z] CONF: Parsing response token: HTTP/1.1 200 OK [2018-05-02T17:28:44.130Z] CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883 [2018-05-02T17:28:44.131Z] [2018-05-02T17:28:44.134Z] CNFG: Load online user config state change to 6 [2018-05-02T17:28:46.126Z] FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870 [2018-05-02T17:28:46.128Z] HTTP: Starting connection [2018-05-02T17:28:46.140Z] HTTPS: Connection Opened: Starting TLS Negotiation [2018-05-02T17:28:46.142Z] HTTP: Wait for TLS Connect [2018-05-02T17:28:46.637Z] HTTP: TLS Connection Opened: Starting Clear Text Communication [2018-05-02T17:28:46.650Z] HTTP: Got 1232 bytes [2018-05-02T17:28:48.649Z] HTTP: Connection Closed [2018-05-02T17:28:48.652Z] HTTP: Close active socket 1 [2018-05-02T17:28:48.653Z] [2018-05-02T17:28:48.656Z] CNFG: Load online user config state change to 7 [2018-05-02T17:28:48.657Z] [2018-05-02T17:28:48.659Z] CNFG: Configuring LoRa module [2018-05-02T17:28:48.662Z] LORA: Changing state from 2 to 4 [2018-05-02T17:28:48.665Z] LORA: Starting reconfiguration [2018-05-02T17:28:48.670Z] LORA: version: 01 [2018-05-02T17:28:48.676Z] LORA: Configuration failed, retry [2018-05-02T17:28:48.703Z] LORA: Starting reconfiguration [2018-05-02T17:28:48.754Z] MON: SYS Stack size: 2837 [2018-05-02T17:28:48.755Z] MON: TCPIP Stack size: 3806 [2018-05-02T17:28:48.756Z] MON: APP Stack size: 3283 [2018-05-02T17:28:48.757Z] MON: LoRa Stack size: 3857 [2018-05-02T17:28:48.757Z] MON: heap usage: 168KB (253KB), free: 171KB [2018-05-02T17:28:54.663Z] LORA: version: 01 [2018-05-02T17:28:54.680Z] LORA: Configuration failed, retry [2018-05-02T17:28:54.696Z] LORA: Starting reconfiguration [2018-05-02T17:28:58.731Z] MON: SYS Stack size: 2837 [2018-05-02T17:28:58.733Z] MON: TCPIP Stack size: 3806 [2018-05-02T17:28:58.735Z] MON: APP Stack size: 3283 [2018-05-02T17:28:58.738Z] MON: LoRa Stack size: 3857 [2018-05-02T17:28:58.742Z] MON: heap usage: 168KB (253KB), free: 171KB [2018-05-02T17:29:00.670Z] LORA: version: 01 [2018-05-02T17:29:00.687Z] LORA: Configuration failed, retry [2018-05-02T17:29:00.703Z] LORA: RESET MODULE [2018-05-02T17:29:03.556Z] LORA: ChaSNTP: State change from 0 to 0 [2018-05-02T17:29:03.559Z] SNTP: State change from 0 to 0 [2018-05-02T17:29:03.561Z] [2018-05-02T17:29:03.563Z] [2018-05-02T17:29:03.564Z] [2018-05-02T17:29:03.566Z] ************************** [2018-05-02T17:29:03.568Z] * The Things Network * [2018-05-02T17:29:03.571Z] * G A T E W A Y * [2018-05-02T17:29:03.572Z] ************************** [2018-05-02T17:29:03.577Z] Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525259181 [2018-05-02T17:29:03.598Z] Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 [2018-05-02T17:29:03.600Z] Build time: May 2 2018 11:07:39 [2018-05-02T17:29:03.613Z] Reboot reason: 0x10 [2018-05-02T17:29:03.620Z] BOOT: (persisted info) 6F 72 72 65 01 03 8B 2C E7 16 0D 49 B2 32 50 B4 ```
jurrienjurrien commented 6 years ago

After trying to get my gateway up and running using the latest beta 1.0.4 release this morning I've compiled the current develop branch.

Initially the gateway connected for about a minute but after got stuck in a reboot loop repeating in approx. every 30 seconds.

One minor issue with the console. When I deselect the option automatic update during activation, the option Automatically update gateway is still selected in the gateway settings.

Logfile of upgrade process ``` =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2018.05.07 11:42:41 =~=~=~=~=~=~=~=~=~=~=~= SNTP: State change from 0 to 0 SNTP: State change from 0 to 0 ************************** * The Things Network * * G A T E W A Y * ************************** Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525259181 Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 Build time: May 2 2018 11:07:39 Reboot reason: 0x03 BOOT: (persisted info) 6F 72 72 65 01 03 BD DD FF FE F9 BA 67 6A 2D E7 WIFI: Entering state 0 WIFI: Entering SCAN state 0 MAIN: Initialisation complete LORA: Changing state from 0 to 0 MAIN: Leaving state 0 MAIN: Entering state 1 SDCARD: Mounted disk FLASH: Magic bytes not found: no stored wifi config present FLASH: Magic bytes not found: no stored activation data present FLASH: Magic bytes not found: no stored FOTA data present FLASH: Loading Firmware Data CNFG: (Firmware HASH (sha256)) FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF MAIN: Leaving state 1 MAIN: Entering state 2 INET: State change to 0 INET: No Ethernet and no WiFi config INET: State change to 1 LORA: Initialisation complete LORA: Changing state from 0 to 1 WIFI: Entering state 1 ETH: IP Address: 0.0.0.0 WIFI: Entering state 4 WIFI: Entering SCAN state 1 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 2 WIFI: Disabling modules Head magic match void: trying to free an already freed block, ignore WIFI: Entering state 3 SNTP: State change from 0 to 1 WIFI: Entering state 4 WIFI: Entering SCAN state 1 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 3 Head magic match void: trying to free an already freed block, ignore SNTP: State change from 1 to 1 WIFI: Entering SCAN state 4 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 5 WIFI: Enabling modules for server WIFI: Entering state 6 >WIFI: IP Address: 192.168.84.1 CB: LORA: Wait init complete, waiting for application. LORA: Changing state from 1 to 2 MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 162KB (172KB), free: 177KB MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 162KB (172KB), free: 177KB MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 162KB (172KB), free: 177KB MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 162KB (172KB), free: 177KB MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 162KB (172KB), free: 177KB MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 162KB (172KB), free: 177KB MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 162KB (172KB), free: 177KB MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 162KB (172KB), free: 177KB CB: SNTP: State change from 1 to 2 SCAN LENGHT: 8 -- NAME: -- RSSI: 1 -- NAME: -- RSSI: 4 -- NAME: -- RSSI: 5 -- NAME: -- RSSI: 34 -- NAME: -- RSSI: 33 -- NAME: -- RSSI: 8 -- NAME: -- RSSI: 22 -- NAME: -- RSSI: 14 SNTP: State change from 2 to 6 MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3700 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 165KB (172KB), free: 174KB SCAN LENGHT: 8 -- NAME: -- RSSI: 1 -- NAME: -- RSSI: 4 -- NAME: Ziggo -- RSSI: 5 -- NAME: -- RSSI: 34 -- NAME: -- RSSI: 33 -- NAME: -- RSSI: 8 -- NAME: -- RSSI: 22 -- NAME: -- RSSI: 14 SCAN LENGHT: 8 -- NAME: -- RSSI: 1 -- NAME: -- RSSI: 4 -- NAME: -- RSSI: 5 -- NAME: -- RSSI: 34 -- NAME: -- RSSI: 33 -- NAME: -- RSSI: 8 -- NAME: -- RSSI: 22 -- NAME: PS4- -- RSSI: 14 GOT GWID via post: GOT ASRV via post: https://account.thethingsnetwork.org GOT gateway-key via post: GWID:1 GOT GWKY:1 GOT ASRV:1 GOT SSID:1 GOT KEY:1 GOT SEC:1 GOT WLAN:1 Set ASRV to application Set GWID to application Set GWKY to application MAIN: Leaving state 2 MAIN: Entering state 7 CNFG: Store user config state change to 0 FLASH: Erasing Activation Data CNFG: Store user config state change to 1 FLASH: Storing Activation Data CNFG: Store user config state change to 2 FLASH: Erasing WiFi Data CNFG: Store user config state change to 3 FLASH: Storing WiFi Data CNFG: Store user config state change to 4 CNFG: Store user config state chan *** Application reboot SNTP: State change from 0 to 0 SNTP: State change from 0 to 0 ************************** * The Things Network * * G A T E W A Y * ************************** Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525259181 Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 Build time: May 2 2018 11:07:39 Reboot reason: 0x40 BOOT: (persisted info) 6F 72 72 65 01 03 BD DD FF FE F9 BA 67 6A 2D E7 WIFI: Entering state 0 WIFI: Entering SCAN state 0 MAIN: Initialisation complete LORA: Changing state from 0 to 0 MAIN: Leaving state 0 MAIN: Entering state 1 FLASH: Magic bytes found: wifi config present FLASH: Magic bytes found: activation data present FLASH: Magic bytes not found: no stored FOTA data present FLASH: Loading Firmware Data CNFG: (Firmware HASH (sha256)) FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FLASH: Loading WiFi Data CNFG: WiFi SSID: CNFG: WiFi key: *** CNFG: WiFi conn_type: 1 CNFG: WiFi sec_type: 4 FLASH: Loading Activation Data CNFG: Gateway ID: CNFG: Gateway Key: *** CNFG: Account Server URL: https://account.thethingsnetwork.org CNFG: Locked: false CNFG: Locked first time: true MAIN: Leaving state 1 MAIN: Entering state 2 INET: State change to 0 LORA: Initialisation complete LORA: Changing state from 0 to 1 WIFI: Entering state 1 ETH: IP Address: 0.0.0.0 WIFI: Entering state 4 WIFI: Entering SCAN state 1 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 2 WIFI: Disabling modules Head magic match void: trying to free an already freed block, ignore WIFI: Entering state 3 SNTP: State change from 0 to 1 WIFI: Enabling modules for client WIFI: Entering state 6 >WIFI: IP Address: 0.0.0.0 CB: INET: Gateway has WiFi INET: State change to 2 INET: Connected to a network, waiting for DHCP lease, checking validity with ping SNTP: State change from 1 to 2 WIFI: IP Address: LORA: Wait init complete, waiting for application. LORA: Changing state from 1 to 2 INET: State change to 3 INET: Ping probe INET: Error sending probe on Eth INET: Ping response from MRF24WN, set as default INET: State change to 4 SNTP: State change from 2 to 3 MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3805 MON: APP Stack size: 7951 MON: LoRa Stack size: 3915 MON: heap usage: 163KB (172KB), free: 176KB SNTP: State change from 3 to 4 SNTP: State change from 4 to 5 SNTP: State change from 5 to 6 SNTP: State change from 6 to 7 INET: State change to 5 MAIN: Leaving state 2 MAIN: Entering state 3 CNFG: Load online user config state change to 4 HTTP: Close active socket 0 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1292 bytes HTTP: Connection Closed HTTP: Close active socket 1 CONF: Parsing response token: HTTP/1.1 200 OK CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883 CNFG: Load online user config state change to 5 FLASH: Lock Activation Data CNFG: Gateway activation locked CNFG: Load online user config state change to 6 FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1232 bytes HTTP: Connection Closed HTTP: Close active socket 1 CNFG: Load online user config state change to 7 CNFG: Configuring LoRa module LORA: Changing state from 2 to 4 LORA: Starting reconfiguration LORA: version: 01 MON: SYS Stack size: 2861 MON: TCPIP Stack size: 3805 MON: APP Stack size: 3294 MON: LoRa Stack size: 3857 MON: heap usage: 167KB (249KB), free: 172KB LORA: Configuration succeeded LORA: Starting operation LORA: Changing state from 4 to 6 MON: SYS Stack size: 2861 MON: TCPIP Stack size: 3805 MON: APP Stack size: 3294 MON: LoRa Stack size: 3857 MON: heap usage: 167KB (249KB), free: 172KB LORA: Changing state from 6 to 3 LORA: GOING ASYNC LORA: Changing state from 3 to 9 CNFG: Load online user config state change to 9 MAIN: Skipping firmware check at boot when activating MAIN: Leaving state 3 MAIN: Entering state 5 MQTT: GOT IP: 52.169.76.203 Connecting to: 52.169.76.203 MQTT: Connection Opened: Starting TLS Negotiation MQTT: Wait for SSL Connect MQTT: TLS ready: Connect MQTT RQMQTT: Connected ************************* MAIN: Gateway bridging ************************* MQTT: Sending status packet MQTT: Report reboot error: 0103 MQTT: Sending status succeeded: 0 MON: SYS Stack size: 2861 MON: TCPIP Stack size: 3805 MON: APP Stack size: 3294 MON: LoRa Stack size: 3857 MON: heap usage: 277KB (278KB), free: 61KB MON: SYS Stack size: 2861 MON: TCPIP Stack size: 3805 MON: APP Stack size: 3294 MON: LoRa Stack size: 3857 MON: heap usage: 277KB (278KB), free: 61KB MON: SYS Stack size: 2861 MON: TCPIP Stack size: 3805 MON: APP Stack size: 3294 MON: LoRa Stack size: 3857 MON: heap usage: 277KB (278KB), free: 61KB MQTT: Sending status packet MQTT: Sending status succeeded: 1 MON: SYS Stack size: 2861 MON: TCPIP Stack size: 3791 MON: APP Stack size: 3294 MON: LoRa Stack size: 3857 MON: heap usage: 277KB (278KB), free: 61KB MON: SYS Stack size: 2861 MON: TCPIP Stack size: 3791 MON: APP Stack size: 3294 MON: LoRa Stack size: 3857 MON: heap usage: 277KB (278KB), free: 61KB MON: SYS Stack size: 2861 MON: TCPIP Stack size: 3791 MON: APP Stack size: 3294 MON: LoRa Stack size: 3857 MON: heap usage: 277KB (278KB), free: 61KB LORA: Kick LoRa module with ACK after not acked it for 60s MQTT: Sending status packet MQTT: Sending status succeeded: 2 MON: SYS Stack size: 2861 MON: TCPIP Stack size: 3791 MON: APP Stack size: 3294 MON: LoRa Stack size: 3857 MON: heap usage: 277KB (278KB), free: 61KB SNTP: State change from 0 to 0 SNTP: State change from 0 to 0 ************************** * The Things Network * * G A T E W A Y * ************************** Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525685972 Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 Build time: May 7 2018 11:40:11 Reboot reason: 0x10 BOOT: (persisted info) 6F 72 72 65 01 10 BD DD FF FE F9 BA 67 6A 2D E7 WIFI: Entering state 0 WIFI: Entering SCAN state 0 MAIN: Initialisation complete LORA: Changing state from 0 to 0 MAIN: Leaving state 0 MAIN: Entering state 1 FLASH: Magic bytes found: wifi config present FLASH: Magic bytes found: activation data present FLASH: Magic bytes not found: no stored FOTA data present FLASH: Loading Firmware Data CNFG: (Firmware HASH (sha256)) F9 CA A6 83 1B C8 10 F5 A1 35 33 92 9E 32 C9 E9 43 61 94 86 3D A2 29 9B D4 0A 29 3E 6C E6 F8 BD FLASH: Loading WiFi Data CNFG: WiFi SSID: CNFG: WiFi key: *** CNFG: WiFi conn_type: 1 CNFG: WiFi sec_type: 4 FLASH: Loading Activation Data CNFG: Gateway ID: CNFG: Gateway Key: *** CNFG: Account Server URL: https://account.thethingsnetwork.org CNFG: Locked: true CNFG: Locked first time: false MAIN: Leaving state 1 MAIN: Entering state 2 INET: State change to 0 LORA: Initialisation complete LORA: Changing state from 0 to 1 WIFI: Entering state 1 ETH: IP Address: 0.0.0.0 WIFI: Entering state 4 WIFI: Entering SCAN state 1 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 2 WIFI: Disabling modules Head magic match void: trying to free an already freed block, ignore WIFI: Entering state 3 SNTP: State change from 0 to 1 WIFI: Enabling modules for client WIFI: Entering state 6 >WIFI: IP Address: 0.0.0.0 CB: INET: Gateway has WiFi INET: State change to 2 INET: Connected to a network, waiting for DHCP lease, checking validity with ping SNTP: State change from 1 to 2 WIFI: IP Address: LORA: Wait init complete, waiting for application. LORA: Changing state from 1 to 2 INET: State change to 3 INET: Ping probe INET: Error sending probe on Eth INET: Ping response from MRF24WN, set as default INET: State change to 4 SNTP: State change from 2 to 3 MON: SYS Stack size: 3965 MON: TCPIP Stack size: 3828 MON: APP Stack size: 7951 MON: LoRa Stack size: 3877 MON: heap usage: 163KB (172KB), free: 176KB SNTP: State change from 3 to 4 SNTP: State change from 4 to 5 SNTP: State change from 5 to 6 SNTP: State change from 6 to 7 INET: State change to 5 MAIN: Leaving state 2 MAIN: Entering state 3 CNFG: Load online user config state change to 4 HTTP: Close active socket 0 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1292 bytes HTTP: Connection Closed HTTP: Close active socket 1 CONF: Parsing response token: HTTP/1.1 200 OK CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883 CNFG: Load online user config state change to 6 FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1232 bytes HTTP: Connection Closed HTTP: Close active socket 1 CNFG: LSNTP: State change from 0 to 0 SNTP: State change from 0 to 0 ************************** * The Things Network * * G A T E W A Y * ************************** Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525685972 Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 Build time: May 7 2018 11:40:11 Reboot reason: 0x10 BOOT: (persisted info) 6F 72 72 65 01 10 BD DD FF FE F9 BA 67 6A 2D E7 WIFI: Entering state 0 WIFI: Entering SCAN state 0 MAIN: Initialisation complete LORA: Changing state from 0 to 0 MAIN: Leaving state 0 MAIN: Entering state 1 FLASH: Magic bytes found: wifi config present FLASH: Magic bytes found: activation data present FLASH: Magic bytes not found: no stored FOTA data present FLASH: Loading Firmware Data CNFG: (Firmware HASH (sha256)) F9 CA A6 83 1B C8 10 F5 A1 35 33 92 9E 32 C9 E9 43 61 94 86 3D A2 29 9B D4 0A 29 3E 6C E6 F8 BD FLASH: Loading WiFi Data CNFG: WiFi SSID: CNFG: WiFi key: *** CNFG: WiFi conn_type: 1 CNFG: WiFi sec_type: 4 FLASH: Loading Activation Data CNFG: Gateway ID: CNFG: Gateway Key: *** CNFG: Account Server URL: https://account.thethingsnetwork.org CNFG: Locked: true CNFG: Locked first time: false MAIN: Leaving state 1 MAIN: Entering state 2 INET: State change to 0 LORA: Initialisation complete LORA: Changing state from 0 to 1 WIFI: Entering state 1 ETH: IP Address: 0.0.0.0 WIFI: Entering state 4 WIFI: Entering SCAN state 1 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 2 WIFI: Disabling modules Head magic match void: trying to free an already freed block, ignore WIFI: Entering state 3 SNTP: State change from 0 to 1 WIFI: Enabling modules for client WIFI: Entering state 6 >WIFI: IP Address: 0.0.0.0 CB: INET: Gateway has WiFi INET: State change to 2 INET: Connected to a network, waiting for DHCP lease, checking validity with ping SNTP: State change from 1 to 2 WIFI: IP Address: LORA: Wait init complete, waiting for application. LORA: Changing state from 1 to 2 INET: State change to 3 INET: Ping probe INET: Error sending probe on Eth INET: Ping response from MRF24WN, set as default INET: State change to 4 SNTP: State change from 2 to 3 MON: SYS Stack size: 3965 MON: TCPIP Stack size: 3828 MON: APP Stack size: 7951 MON: LoRa Stack size: 3915 MON: heap usage: 163KB (172KB), free: 176KB SNTP: State change from 3 to 4 SNTP: State change from 4 to 5 SNTP: State change from 5 to 6 SNTP: State change from 6 to 7 INET: State change to 5 MAIN: Leaving state 2 MAIN: Entering state 3 CNFG: Load online user config state change to 4 HTTP: Close active socket 0 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1292 bytes HTTP: Connection Closed HTTP: Close active socket 1 CONF: Parsing response token: HTTP/1.1 200 OK CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883 CNFG: Load online user config state change to 6 FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1232 bytes MON: SYS Stack size: 2870 MON: TCPIP Stack size: 3828 MON: APP Stack size: 3294 MON: LoRa Stack size: 3915 MON: heap usage: 244KB (249KB), free: 95KB HTTP: Connection Closed HTTP: Close active socket 1 CNFG: LSNTP: State change from 0 to 0 SNTP: State change from 0 to 0 ************************** * The Things Network * * G A T E W A Y * ************************** ```
Logfile after pressing the button during power cycle ``` =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2018.05.07 12:13:30 =~=~=~=~=~=~=~=~=~=~=~= SNTP: State change from 0 to 0 SNTP: State change from 0 to 0 ************************** * The Things Network * * G A T E W A Y * ************************** Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525685972 Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 Build time: May 7 2018 11:40:11 Reboot reason: 0x03 BOOT: (persisted info) 6F 72 72 65 01 03 BD 79 EF FE F9 BA 67 6B 2C E7 WIFI: Entering state 0 WIFI: Entering SCAN state 0 MAIN: Initialisation complete LORA: Changing state from 0 to 0 MAIN: Leaving state 0 MAIN: Entering state 1 SDCARD: Mounted disk FLASH: Magic bytes not found: no stored wifi config present FLASH: Magic bytes not found: no stored activation data present FLASH: Magic bytes not found: no stored FOTA data present FLASH: Loading Firmware Data CNFG: (Firmware HASH (sha256)) FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF MAIN: Leaving state 1 MAIN: Entering state 2 INET: State change to 0 INET: No Ethernet and no WiFi config INET: State change to 1 LORA: Initialisation complete LORA: Changing state from 0 to 1 WIFI: Entering state 1 ETH: IP Address: 0.0.0.0 WIFI: Entering state 4 WIFI: Entering SCAN state 1 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 2 WIFI: Disabling modules Head magic match void: trying to free an already freed block, ignore WIFI: Entering state 3 SNTP: State change from 0 to 1 WIFI: Entering state 4 WIFI: Entering SCAN state 1 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 3 Head magic match void: trying to free an already freed block, ignore SNTP: State change from 1 to 1 WIFI: Entering SCAN state 4 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 5 WIFI: Enabling modules for server WIFI: Entering state 6 >WIFI: IP Address: 192.168.84.1 CB: LORA: Wait init complete, waiting for application. LORA: Changing state from 1 to 2 MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3891 MON: heap usage: 162KB (172KB), free: 177KB MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3891 MON: heap usage: 162KB (172KB), free: 177KB MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3891 MON: heap usage: 162KB (172KB), free: 177KB MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3882 MON: APP Stack size: 7951 MON: LoRa Stack size: 3891 MON: heap usage: 162KB (172KB), free: 177KB CB: MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3746 MON: APP Stack size: 7951 MON: LoRa Stack size: 3891 MON: heap usage: 164KB (172KB), free: 176KB SNTP: State change from 1 to 2 SCAN LENGHT: 6 -- NAME: -- RSSI: 31 -- NAME: -- RSSI: 9 -- NAME: -- RSSI: 9 -- NAME: -- RSSI: 36 -- NAME: -- RSSI: 23 -- NAME: -- RSSI: 23 SCAN LENGHT: 6 -- NAME: -- RSSI: 31 -- NAME: -- RSSI: 9 -- NAME: -- RSSI: 9 -- NAME: -- RSSI: 36 -- NAME: -- RSSI: 23 -- NAME: -- RSSI: 23 SNTP: State change from 2 to 6 SCAN LENGHT: 6 -- NAME: -- RSSI: 31 -- NAME: -- RSSI: 9 -- NAME: -- RSSI: 9 -- NAME: -- RSSI: 36 -- NAME: -- RSSI: 23 -- NAME: -- RSSI: 23 MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3700 MON: APP Stack size: 7951 MON: LoRa Stack size: 3891 MON: heap usage: 164KB (172KB), free: 175KB SCAN LENGHT: 6 -- NAME: -- RSSI: 31 -- NAME: -- RSSI: 9 -- NAME: -- RSSI: 9 -- NAME: -- RSSI: 36 -- NAME: -- RSSI: 23 -- NAME: -- RSSI: 23 GOT GWID via post: GOT ASRV via post: https://account.thethingsnetwork.org GOT gateway-key via post: ttn-account-v2.1_ GWID:1 GOT GWKY:1 GOT ASRV:1 GOT SSID:1 GOT KEY:1 GOT SEC:1 GOT WLAN:1 Set ASRV to application Set GWID to application Set GWKY to application MAIN: Leaving state 2 MAIN: Entering state 7 CNFG: Store user config state change to 0 FLASH: Erasing Activation Data CNFG: Store user config state change to 1 FLASH: Storing Activation Data CNFG: Store user config state change to 2 FLASH: Erasing WiFi Data CNFG: Store user config state change to 3 FLASH: Storing WiFi Data CNFG: Store user config state change to 4 CNFG: Store user config state chan *** Application reboot SNTP: State change from 0 to 0 SNTP: State change from 0 to 0 ************************** * The Things Network * * G A T E W A Y * ************************** Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525685972 Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 Build time: May 7 2018 11:40:11 Reboot reason: 0x40 BOOT: (persisted info) 6F 72 72 65 01 03 BD 79 EF FE F9 BA 67 6B 2C E7 WIFI: Entering state 0 WIFI: Entering SCAN state 0 MAIN: Initialisation complete LORA: Changing state from 0 to 0 MAIN: Leaving state 0 MAIN: Entering state 1 FLASH: Magic bytes found: wifi config present FLASH: Magic bytes found: activation data present FLASH: Magic bytes not found: no stored FOTA data present FLASH: Loading Firmware Data CNFG: (Firmware HASH (sha256)) FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FLASH: Loading WiFi Data CNFG: WiFi SSID: CNFG: WiFi key: *** CNFG: WiFi conn_type: 1 CNFG: WiFi sec_type: 4 FLASH: Loading Activation Data CNFG: Gateway ID: CNFG: Gateway Key: *** CNFG: Account Server URL: https://account.thethingsnetwork.org CNFG: Locked: false CNFG: Locked first time: true MAIN: Leaving state 1 MAIN: Entering state 2 INET: State change to 0 LORA: Initialisation complete LORA: Changing state from 0 to 1 WIFI: Entering state 1 ETH: IP Address: 0.0.0.0 WIFI: Entering state 4 WIFI: Entering SCAN state 1 SNTP: State change from 0 to 1 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 2 WIFI: Disabling modules Head magic match void: trying to free an already freed block, ignore SNTP: State change from 1 to 1 WIFI: Entering state 3 WIFI: Enabling modules for client WIFI: Entering state 6 >WIFI: IP Address: 0.0.0.0 CB: INET: Gateway has WiFi INET: State change to 2 INET: Connected to a network, waiting for DHCP lease, checking validity with ping SNTP: State change from 1 to 2 WIFI: IP Address: LORA: Wait init complete, waiting for application. LORA: Changing state from 1 to 2 MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3827 MON: APP Stack size: 7980 MON: LoRa Stack size: 3917 MON: heap usage: 163KB (172KB), free: 177KB INET: State change to 3 INET: Ping probe INET: Error sending probe on Eth INET: Ping response from MRF24WN, set as default INET: State change to 4 SNTP: State change from 2 to 3 SNTP: State change from 3 to 4 SNTP: State change from 4 to 5 SNTP: State change from 5 to 6 SNTP: State change from 6 to 7 INET: State change to 5 MAIN: Leaving state 2 MAIN: Entering state 3 CNFG: Load online user config state change to 4 HTTP: Close active socket 0 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1293 bytes HTTP: Connection Closed HTTP: Close active socket 1 CONF: Parsing response token: HTTP/1.1 200 OK CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883 CNFG: Load online user config state change to 5 FLASH: Lock Activation Data CNFG: Gateway activation locked CNFG: Load online user config state change to 6 FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1232 bytes MON: SYS Stack size: 2847 MON: TCPIP Stack size: 3827 MON: APP Stack size: 3251 MON: LoRa Stack size: 3917 MON: heap usage: 244KB (249KB), free: 95KB HTTP: Connection Closed HTTP: Close active socket 1 CNFG: Load online user config state change to 7 CNFG: Configuring LoRa module LORA: Changing state from 2 to 4 LORA: Starting reconfiguration SNTP: State change from 0 to 0 SNTP: State change from 0 to 0 ************************** * The Things Network * * G A T E W A Y * ************************** Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525685972 Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 Build time: May 7 2018 11:40:11 Reboot reason: 0x10 BOOT: (persisted info) 6F 72 72 65 01 03 BD 79 EF FE F9 BA 67 6B 2C E7 WIFI: Entering state 0 WIFI: Entering SCAN state 0 MAIN: Initialisation complete LORA: Changing state from 0 to 0 MAIN: Leaving state 0 MAIN: Entering state 1 FLASH: Magic bytes found: wifi config present FLASH: Magic bytes found: activation data present FLASH: Magic bytes not found: no stored FOTA data present FLASH: Loading Firmware Data CNFG: (Firmware HASH (sha256)) F9 CA A6 83 1B C8 10 F5 A1 35 33 92 9E 32 C9 E9 43 61 94 86 3D A2 29 9B D4 0A 29 3E 6C E6 F8 BD FLASH: Loading WiFi Data CNFG: WiFi SSID: CNFG: WiFi key: *** CNFG: WiFi conn_type: 1 CNFG: WiFi sec_type: 4 FLASH: Loading Activation Data CNFG: Gateway ID: CNFG: Gateway Key: *** CNFG: Account Server URL: https://account.thethingsnetwork.org CNFG: Locked: true CNFG: Locked first time: false MAIN: Leaving state 1 MAIN: Entering state 2 INET: State change to 0 LORA: Initialisation complete LORA: Changing state from 0 to 1 WIFI: Entering state 1 ETH: IP Address: 0.0.0.0 WIFI: Entering state 4 WIFI: Entering SCAN state 1 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 2 WIFI: Disabling modules Head magic match void: trying to free an already freed block, ignore WIFI: Entering state 3 SNTP: State change from 0 to 1 WIFI: Enabling modules for client WIFI: Entering state 6 >WIFI: IP Address: 0.0.0.0 CB: INET: Gateway has WiFi INET: State change to 2 INET: Connected to a network, waiting for DHCP lease, checking validity with ping SNTP: State change from 1 to 2 LORA: Wait init complete, waiting for application. LORA: Changing state from 1 to 2 INET: State change to 3 INET: Ping probe INET: Error sending probe on Eth SNTP: State change from 2 to 6 MON: SYS Stack size: 3965 MON: TCPIP Stack size: 3828 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 163KB (172KB), free: 176KB CB: MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3828 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 163KB (172KB), free: 176KB WIFI: IP Address: SNTP: State change from 6 to 1 SNTP: State change from 1 to 2 MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3700 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 163KB (172KB), free: 176KB SNTP: State change from 2 to 6 MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3700 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 164KB (172KB), free: 176KB SNTP: State change from 6 to 1 SNTP: State change from 1 to 2 SNTP: State change from 2 to 3 SNTP: State change from 3 to 4 SNTP: State change from 4 to 5 SNTP: State change from 5 to 6 SNTP: State change from 6 to 7 MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3700 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 164KB (172KB), free: 176KB MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3700 MON: APP Stack size: 7951 MON: LoRa Stack size: 3917 MON: heap usage: 164KB (172KB), free: 176KB INET: Ping Timeout of :60 seconds INET: Ping probe INET: Error sending probe on Eth INET: Ping response from MRF24WN, set as default INET: State change to 4 INET: State change to 5 MAIN: Leaving state 2 MAIN: Entering state 3 CNFG: Load online user config state change to 4 HTTP: Close active socket 0 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1293 bytes MON: SYS Stack size: 2845 MON: TCPIP Stack size: 3700 MON: APP Stack size: 4157 MON: LoRa Stack size: 3917 MON: heap usage: 244KB (249KB), free: 95KB HTTP: Connection Closed HTTP: Close active socket 1 CONF: Parsing response token: HTTP/1.1 200 OK CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883 CNFG: Load online user config state change to 6 FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1232 bytes HTTP: Connection Closed HTTP: Close active socket 1 CNFG: Load online user config state change to 7 CNFG: Configuring LoRa module LORA: Changing state from 2 to 4 LORA: Starting reconfiguration MON: SYS Stack size: 2845 MON: TCPIP Stack size: 3700 MON: APP Stack size: 3294 MON: LoRa Stack size: 3859 MON: heap usage: 167KB (249KB), free: 172KB SNTP: State change from 0 to 0 SNTP: State change from 0 to 0 ************************** * The Things Network * * G A T E W A Y * ************************** Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525685972 Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 Build time: May 7 2018 11:40:11 Reboot reason: 0x10 BOOT: (persisted info) 6F 72 72 65 01 03 BD 79 EF FE F9 BA 67 6B 2C E7 WIFI: Entering state 0 WIFI: Entering SCAN state 0 MAIN: Initialisation complete LORA: Changing state from 0 to 0 MAIN: Leaving state 0 MAIN: Entering state 1 FLASH: Magic bytes found: wifi config present FLASH: Magic bytes found: activation data present FLASH: Magic bytes not found: no stored FOTA data present FLASH: Loading Firmware Data CNFG: (Firmware HASH (sha256)) F9 CA A6 83 1B C8 10 F5 A1 35 33 92 9E 32 C9 E9 43 61 94 86 3D A2 29 9B D4 0A 29 3E 6C E6 F8 BD FLASH: Loading WiFi Data CNFG: WiFi SSID: CNFG: WiFi key: *** CNFG: WiFi conn_type: 1 CNFG: WiFi sec_type: 4 FLASH: Loading Activation Data CNFG: Gateway ID: CNFG: Gateway Key: *** CNFG: Account Server URL: https://account.thethingsnetwork.org CNFG: Locked: true CNFG: Locked first time: false MAIN: Leaving state 1 MAIN: Entering state 2 INET: State change to 0 LORA: Initialisation complete LORA: Changing state from 0 to 1 WIFI: Entering state 1 ETH: IP Address: 0.0.0.0 WIFI: Entering state 4 WIFI: Entering SCAN state 1 SNTP: State change from 0 to 1 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 2 WIFI: Disabling modules Head magic match void: trying to free an already freed block, ignore SNTP: State change from 1 to 1 WIFI: Entering state 3 WIFI: Enabling modules for client WIFI: Entering state 6 >WIFI: IP Address: 0.0.0.0 CB: INET: Gateway has WiFi INET: State change to 2 INET: Connected to a network, waiting for DHCP lease, checking validity with ping SNTP: State change from 1 to 2 WIFI: IP Address: LORA: Wait init complete, waiting for application. LORA: Changing state from 1 to 2 MON: SYS Stack size: 3965 MON: TCPIP Stack size: 3823 MON: APP Stack size: 7980 MON: LoRa Stack size: 3917 MON: heap usage: 163KB (172KB), free: 177KB INET: State change to 3 INET: Ping probe INET: Error sending probe on Eth INET: Ping response from MRF24WN, set as default INET: State change to 4 SNTP: State change from 2 to 3 SNTP: State change from 3 to 4 SNTP: State change from 4 to 5 SNTP: State change from 5 to 6 SNTP: State change from 6 to 7 INET: State change to 5 MAIN: Leaving state 2 MAIN: Entering state 3 CNFG: Load online user config state change to 4 HTTP: Close active socket 0 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1293 bytes HTTP: Connection Closed HTTP: Close active socket 1 CONF: Parsing response token: HTTP/1.1 200 OK CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883 CNFG: Load online user config state change to 6 FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1232 bytes MON: SYS Stack size: 2833 MON: TCPIP Stack size: 3787 MON: APP Stack size: 3294 MON: LoRa Stack size: 3917 MON: heap usage: 244KB (249KB), free: 95KB HTTP: Connection Closed HTTP: Close active socket 1 CNFG: Load online user config state change to 7 CNFG: Configuring LoRa module LORA: Changing state from 2 to 4 LORA: Starting reconfiguration SNTP: State change from 0 to 0 SNTP: State change from 0 to 0 ************************** * The Things Network * * G A T E W A Y * ************************** ```
ReiniervdL commented 6 years ago

My gateway has been running stable since the 1.03 update, more than a month, but suddenly stopped this morning (May 10). Power cycling did not help, and I updated the SD card to the stable release candidate. Also did a new setup. It's rebooting since. Log below:


WIFI: Entering state 0 WIFI: Entering SCAN state 0

MAIN: Initialisation complete LORA: Changing state from 0 to 0

MAIN: Leaving state 0 MAIN: Entering state 1 FLASH: Magic bytes found: wifi config present FLASH: Magic bytes found: activation data present FLASH: Magic bytes not found: no stored FOTA data present FLASH: Loading Firmware Data CNFG: (Firmware HASH (sha256)) FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FLASH: Loading WiFi Data CNFG: WiFi SSID: xxxxxxxxx CNFG: WiFi key: CNFG: WiFi conn_type: 1 CNFG: WiFi sec_type: 4 FLASH: Loading Activation Data CNFG: Gateway ID: wilson-creek-winery CNFG: Gateway Key: CNFG: Account Server URL: https://account.thethingsnetwork.org CNFG: Locked: true CNFG: Locked first time: false

MAIN: Leaving state 1 MAIN: Entering state 2 INET: State change to 0 LORA: Initialisation complete LORA: Changing state from 0 to 1 WIFI: Entering state 1 ETH: IP Address: 0.0.0.0 WIFI: Entering state 4 WIFI: Entering SCAN state 1 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 2 WIFI: Disabling modules Head magic match void: trying to free an already freed block, ignore WIFI: Entering state 3 SNTP: State change from 0 to 1 WIFI: Enabling modules for client WIFI: Entering state 6

WIFI: IP Address: 0.0.0.0 CB: INET: Gateway has WiFi INET: State change to 2 INET: Connected to a network, waiting for DHCP lease, checking validity with ping SNTP: State change from 1 to 2 WIFI: IP Address: 192.168.0.xxx LORA: Wait init complete, waiting for application. LORA: Changing state from 1 to 2 INET: State change to 3 INET: Ping probe INET: Error sending probe on Eth INET: Ping response from MRF24WN, set as default INET: State change to 4 SNTP: State change from 2 to 3 MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3828 MON: APP Stack size: 7951 MON: LoRa Stack size: 3883 MON: heap usage: 163KB (172KB), free: 176KB SNTP: State change from 3 to 4 SNTP: State change from 4 to 5 SNTP: State change from 5 to 6 SNTP: State change from 6 to 7 INET: State change to 5

MAIN: Leaving state 2 MAIN: Entering state 3

CNFG: Load online user config state change to 4 HTTP: Close active socket 0 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1535 bytes HTTP: Connection Closed HTTP: Close active socket 1 CONF: Parsing response token: HTTP/1.1 200 OK CONF: ROUTER URL: mqtts://bridge.us-west.thethings.network:8883

CNFG: Load online user config state change to 6 FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/US_902_928 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect MON: SYS Stack size: 2833 MON: TCPIP Stack size: 3828 MON: APP Stack size: 3294 MON: LoRa Stack size: 3883 MON: heap usage: 244KB (249KB), free: 95KB HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1179 bytes HTTP: Connection Closed HTTP: Close active socket 1

CNFG: Load online user config state change to 7

CNFG: Configuring LoRa module LORA: Changing state from 2 to 4 LORA: Starting reconfiguration LORA: version: 02 LORA: Configuration failed, retry LORA: Starting reconfiguration LORA: version: 02 LORA: Configuration failed, retry LORA: Starting reconfiguration MON: SYS Stack size: 2833 MON: TCPIP Stack size: 3828 MON: APP Stack size: 3294 MON: LoRa Stack size: 3855 MON: heap usage: 167KB (249KB), free: 172KB LORA: version: 02 LORA: Configuration failed, retry LORA: RESET MODULE LORA: ChaSNTP: State change from 0 to 0 SNTP: State change from 0 to 0

avbentem commented 6 years ago

@ReiniervdL and @eddyvdh can you please edit your earlier comments to put the long log into something like the following?

<details>
<summary>Reboot loop in 1.0.3</summary>

```text
your
log
here
```
</details>

...which will get you:

Reboot loop in 1.0.3 ```text your log here ```


Thanks! (I will delete this comment later.)

Lahorde commented 6 years ago

Same thing here : lot of reboots (~10min period) with GW connected over WIFI.

>WIFI: IP Address: 0.0.0.0                                                                                                                                                                                                                                                                
CB: INET: Gateway has WiFi                                                                                                                                                                                                                                                                
INET: State change to 2                                                                                                                                                                                                                                                                   
INET: Connected to a network, waiting for DHCP lease, checking validity with ping                                                                                                                                                                                                         
LORA: Wait init complete, waiting for application.                                                                                                                                                                                                                                        
LORA: Changing state from 1 to 2                                                                                                                                                                                                                                                          
SNTP: State change from 1 to 2                                                                                                                                                                                                                                                            
WIFI: IP Address: 192.168.43.36                                                                                                                                                                                                                                                           
MON: SYS Stack size: 3959                                                                                                                                                                                                                                                                 
MON: heap usage: 147KB (156KB), free: 193KB                                                                                                                                                                                                                                               
INET: State change to 3                                                                                                                                                                                                                                                                   
INET: Ping probe                                                                                                                                                                                                                                                                          
INET: Error sending probe on Eth                                                                                                                                                                                                                                                          
INET: Ping response from MRF24WN, set as default                                                                                                                                                                                                                                          
INET: State change to 4                                                                                                                                                                                                                                                                   
SNTP: State change from 2 to 3                                                                                                                                                                                                                                                            
SNTP: State change from 3 to 4                                                                                                                                                                                                                                                            
SNTP: State change from 4 to 5                                                                                                                                                                                                                                                            
SNTP: State change from 5 to 6                                                                                                                                                                                                                                                            
SNTP: State change from 6 to 7                                                                                                                                                                                                                                                            
INET: State change to 5                                                                                                                                                                                                                                                                   

MAIN: Leaving state 2                                                                                                                                                                                                                                                                     
MAIN: Entering state 3                                                                                                                                                                                                                                                                    

CNFG: Load online user config state change to 4                                                                                                                                                                                                                                           
HTTP: Close active socket 0                                                                                                                                                                                                                                                               
HTTP: Starting connection                                                                                                                                                                                                                                                                 
HTTPS: Connection Opened: Starting TLS Negotiation                                                                                                                                                                                                                                        
HTTP: Wait for TLS Connect                                                                                                                                                                                                                                                                
SNTP: State change from 0 to 0                                                                                                                                                                                                                                                            
SNTP: State change from 0 to 0                                                                                                                                                                                                                                                            

**************************                                                                                                                                                                                                                                                                
*   The Things Network   *                                                                                                                                                                                                                                                                
*      G A T E W A Y     *                                                                                                                                                                                                                                                                
**************************                                                                                                                                                                                                                                                                
Firmware name: AmazingAckermann, type: 0, version: 1.0.2, commit: 475aef56, timestamp: 1521106500                                                                                                                                                                                         
Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298                                                                                                                                                                                                                           
Build time: Mar 15 2018 09:35:17
Reboot reason: 0x10
BOOT: (persisted info) 6F 72 72 65 01 10 25 0B 9D F4 25 0B 9D 8D 7F AC
metaneutrons commented 6 years ago

Hi there, got my brand new gateway yesterday and right from the beginning I was stuck in a boot loop. Tried all firmware versions and always the same: got 2 LEDs on, 3rd one blinking slowly, then the 3rd LED goes off and the gateway reboots...and everything starts from the beginning.

Log of reboot loop in 1.0.4 ``` ************************** * The Things Network * * G A T E W A Y * ************************** Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525259181 Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 Build time: May 2 2018 11:07:39 Reboot reason: 0x03 BOOT: (persisted info) 6F 72 72 65 01 03 E2 3F 6C C4 68 A6 25 01 80 6F WIFI: Entering state 0 WIFI: Entering SCAN state 0 MAIN: Initialisation complete LORA: Changing state from 0 to 0 MAIN: Leaving state 0 MAIN: Entering state 1 SDCARD: Mounted disk FLASH: Magic bytes found: wifi config present FLASH: Magic bytes found: activation data present FLASH: Magic bytes not found: no stored FOTA data present FLASH: Loading Firmware Data CNFG: (Firmware HASH (sha256)) 65 0D 50 41 6F 3C 7A 21 B0 6A 61 4A FF BE C3 DD 3F 8A 2C 8F D1 98 70 9F 71 EF C5 53 6A 7D 31 AF FLASH: Loading WiFi Data CNFG: WiFi SSID: Things-Gateway-001EC03F9250 CNFG: WiFi key: *** CNFG: WiFi conn_type: 4 CNFG: WiFi sec_type: 4 FLASH: Loading Activation Data CNFG: Gateway ID: everloh CNFG: Gateway Key: *** CNFG: Account Server URL: https://account.thethingsnetwork.org/ CNFG: Locked: true CNFG: Locked first time: false MAIN: Leaving state 1 MAIN: Entering state 2 INET: State change to 0 LORA: Initialisation complete LORA: Changing state from 0 to 1 WIFI: Entering state 1 ETH: IP Address: 0.0.0.0 WIFI: Entering state 4 WIFI: Entering SCAN state 1 SNTP: State change from 0 to 1 INET: Gateway has Ethernet INET: State change to 2 INET: Connected to a network, waiting for DHCP lease, checking validity with ping SNTP: State change from 1 to 2 Scan is completed successfully WIFI: Entering SCAN state 2 WIFI: Entering SCAN state 5 WIFI: Entering SCAN state 0 WIFI: Entering state 2 WIFI: Disabling modules Head magic match void: trying to free an already freed block, ignore SNTP: State change from 2 to 1 WIFI: Entering state 3 WIFI: Enabling modules for server WIFI: Entering state 6 >WIFI: IP Address: 192.168.84.1 ETH: IP Address: 192.168.88.81 SNTP: State change from 1 to 2 INET: State change to 3 INET: Ping probe INET: Error sending probe on WiFi INET: Ping response from PIC32INT, set as default INET: State change to 4 CB: LORA: Wait init complete, waiting for application. LORA: Changing state from 1 to 2 SNTP: State change from 2 to 3 SNTP: State change from 3 to 4 MON: SYS Stack size: 3959 MON: TCPIP Stack size: 3785 MON: APP Stack size: 7951 MON: LoRa Stack size: 3899 MON: heap usage: 163KB (173KB), free: 176KB SNTP: State change from 4 to 5 SNTP: State change from 5 to 6 SNTP: State change from 6 to 7 INET: State change to 5 MAIN: Leaving state 2 MAIN: Entering state 3 CNFG: Load online user config state change to 4 HTTP: Close active socket 0 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1296 bytes HTTP: Connection Closed HTTP: Close active socket 1 CONF: Parsing response token: HTTP/1.1 200 OK CONF: ROUTER URL: mqtts://bridge.eu.thethings.network:8883 CNFG: Load online user config state change to 6 FREQ: APP_URL_Buffer: https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870 HTTP: Starting connection HTTPS: Connection Opened: Starting TLS Negotiation HTTP: Wait for TLS Connect HTTP: TLS Connection Opened: Starting Clear Text Communication HTTP: Got 1232 bytes HTTP: Connection Closed HTTP: Close active socket 1 CNFG: Load online user config state change to 7 CNFG: Configuring LoRa module LORA: Changing state from 2 to 4 LORA: Starting reconfiguration MON: SYS Stack size: 2837 MON: TCPIP Stack size: 3743 MON: APP Stack size: 3294 MON: LoRa Stack size: 3873 MON: heap usage: 168KB (253KB), free: 171KB SNTP: State change from 0 to 0 SNTP: State change from 0 to 0 ************************** * The Things Network * * G A T E W A Y * ************************** Firmware name: AmazingAckermann, type: 0, version: 1.0.4, commit: a7beae91, timestamp: 1525259181 Bootloader revision: 1, commit: 7167873a, timestamp: 1496411298 Build time: May 2 2018 11:07:39 Reboot reason: 0x10 BOOT: (persisted info) 6F 72 72 65 01 03 E2 3F 6C C4 68 A6 25 01 80 6F ```
smbunn commented 6 years ago

I have read the markdown guide, but don't see how you have been adding your log files as some form of link. How do you do this?