WiFi reliability

To begin with, I love the Electric Imp platform. My comments are meant constructively, not simply a complaint. That being said, my perception is that WiFi reliability has taken a big hit since the firmware upgrade. I’ve seen multiple devices going offline this week running the same software they’ve had for quite some time. The networks have also not changed in any relevant way.

In one case, I have 2 imp002s sitting next to one another. One wants to go offline for no apparent reason while the other chugs away. I had blamed my code for being a contributing factor with my avoidance of agent.send() if server.isconnected() is false. This had helped avoid situations where the execution was blocked when the connection was down and helped me maintain my 60 second update period. However, I began to think that the lack of an agent.send() or any other communication from the device was causing the server connection to stay down permanently. I’ve since commented out checking server.isconnected() and will accept pausing execution until the connection comes back up. By the way, the device is in SOE mode. I find myself having to power cycle some imps just to get them back online. Others seem to run along happily with the same application code.

Has the WiFi state diagram changed in any fashion due to the firmware update?

No changes to the wifi state diagram, no. Would be good for you to send your code and we’ll take a look and suggest changes to use ROE mode and then you can see if this works better for you?

Considering I’m not a student of OOP, you’ll shudder when you see my code, but I will package it up and send your way this weekend. Thanks!

No problem, it’s just good to have something here which we can hammer on and see if we can determine why it’s failing for you. We do have automated tests that check the various things work when networks go away, but nothing is ever perfect.

I posted a few lines of code on another thread which gives basic active connection management. It’d be good if you could also try this and see whether it helps your devices whilst we try to replicate the issue here.