Had to restart wifi today; then had to redo blink-up, why?

my wife’s laptop had wifi trouble today and ultimately I decided to restart the router since the other devices in the household were working fine. I shut down several of the devices in the household as well. The imp002 went offline and then would not come back up. After several power cycles ending in failure I finally decided to redo the blink-up and this brought it back to life.

Why would this happen? Could there be problems with the ip address on my local network? Another couple of imps came back up after this outage without apparent issue.

I have code in the device to switch wifi networks when there is trouble but the intention of this is to automatically switch between home and work wifi networks. I have not changed my home wifi ssid nor password.

any ideas?

Can’t think why this would be an issue; the imp stores just wifi credentials, it DHCPs to get an IP address and this happens every time it connects - not as if this is cached.

I suspect this could be related to your code, possibly? Were the imps that came back online no problem running similar code?

Related to device.isconnected problems. It gives false negatives
… I think based on behavior I saw later.
No other imps had exactly the same code and also went through the outage

This happened again. My ISP service went down today for a bit. I got it back (for my other devices such as laptop, tablets, etc) by restarting my DSL/wifi router.

  1. imp001 with no particular wifi-handling code came back up just fine later - no power cycle.

  2. imp002 however is not back up. This imp has code that will switch to different wifi networks. I have tested this code a couple of times and it has always been stable. I test it by using 3 different wifi networks, 2 of which I can turn off. When I have done this the imp will switch to a ‘good’ network.

It seems as though the ISP outage gets the imp into a different state that it does not recover from. To attempt recovery, I shut off power to it for a long time. I also powered it up and let it run for a long while giving it time to (at least hypothetically) try different wifi networks.

what could be going on? seems like I am going to have to blink-up again.

The blink up lights show

  1. Joining WiFi network


  1. Searching for WiFi network


lights out…

It’s hard to debug code like this; I’d recommend you use an FTDI serial cable and configure the imp to use a UART to output debug information so you can see what your code is attempting to do when this happens.

ah, good idea. I can do that with UART57. just have to delicately solder some wires and… possibly wait for the next service outage to understand that case.

One thing I did not try - and should have. I could have turned on some other networks I have from my cell phone account and see if the imp would have joined those. As it was, I only had it trying to connect to my household wifi router.