[SOLVED] Gateway doesn't reconnect after a router restart


#1

I’ve noticed the hardware gateway (thumb drive thing) doesn’t reconnect to my network after I restart my router. I have to manually power cycle it to get it to connect. Is this known? Is a fix coming?


#2

How long after the network failed did you power cycle the device? It can take up to 60 seconds for the gateway to realize it isn’t connected and try to reconnect.

Also, what is the status of the LEDs on the gateway? Both the RGB LED (which is hooked to the P1) and the white LED (which represents the nrf51 status)?


#3

Typically hours later. The led’s look normal, breathing cyan and blinking white.


#4

What’s the symptom you are worried about? So other devices can’t connect through this gateway unless you power cycle it? How are you determining it isn’t coming back online?

You said the white LED was flashing, but at what rate? Once every two seconds or two times every second?

What code are you running on the gateway? Have you updated its firmware to the latest from console.bluz.io? Is the P1 running the latest version of the bluz library from the Web IDE?


#5

My devices publish data at regular intervals and this stops working after a router reset.

So apparently not a known issue, so maybe it’s my code :wink:

I’ll do some tests and report back.


#6

Definitey make sure your gateway has the latest code by checking on console.bluz.io, there were some enhancements to make connections more stable.

This isn’t a known issue, so let me know if you find anything else.


#7

I did 3 tests and found after a router reboot my 2 DKs lose the Particle connection and don’t reconnect. I waited 10-15min after each reboot. The DK is blinking green (BLE state=3). The gateway is blinking blue and blinking white every 2 sec.

The gateway P1 was on 0.5.1; how do I upgrade it to 0.6.0? I’m pretty sure the bluz gateway firmware has the latest version which I updated a few weeks ago from the staging console site. I tried going to both sites, neither shows an upgrade button, both detect my gateway. The DKs have beta 5 firmware.


#8

Thanks for the details. I assume after a router reboot, the P1 LED does a normal lose connection/reconnect cycle?

I will take a look. I wouldn’t worry about the P1 version, what you have should be fine. I’ll post more details if I can recreate.


#9

According to particle docs blinking blue is listening mode. So it goes from breathing cyan to blinking green (while the router reboots) to blinking blue (when the internet comes back online). FYI, the same thing happens if I have no DKs connected. Technically in these reboot cases, on the gateway, there is a brief period of blinking cyan and a quick blue blink before the blinking green which lasts the minute it takes the reboot to happen. There may have been a flash of white in the middle as well but I didn’t see that every time.


#10

Ah, ok, this has been fixed.

We included code in the gateway for it to enter listening mode if it didn’t have a WiFi connection after 60 seconds. This was meant to protect against moving the gateway from one physical location to another, without automatically entering listening mode then you would have to crack open the case to get to the button.

The issue was, if the connection went away for 60 seconds at all, it would enter listening mode. This would happen even if it was connected and the WiFi dropped for more than 60 seconds, without powering off, which doesn’t make a lot of sense. This is what it sounds like is happening in your case.

We fixed this in the P1 library, so now it will only enter listening mode if it hasn’t been connected for 60 seconds AND it was never connected in the first place (since the last reboot).

So, if you update the P1 to the latest code, it should fix your issue. Go to the Web IDE and select the P1 module. Then in the Library selection, choose the bluz gateway library and select the example. Flash this to your P1 and it should solve the issue.


#11

That fixed it, thanks.