Weird WiFi Behaviour [Solved - not a photon issue]

I have 13 (unlucky number I know) photons built into devices that have been burning in on test awaiting going to a beta customer. Just yesterday we noticed some very weird behaviour. I should say the devices are in a room with metal walls and ceiling and floor with its own WAP - a workshop. They have been there for a few days working fine. After a flash to all devices of new application code the devices initially worked fine (cloud connection, events, var and functions) then they all started to exhibit random behaviour rather like a buffer overrun. Putting them in Non - Wifi connect mode [this turns off the wifi module] followed by a hard restart [power off and on] and they still exhibited the same random behaviour. However, when taken out of the workshop and onto another WiFi network and restarted they all worked fine. I am at a loss to understand what would cause such behaviour - clearly something related to the WAP in the workshop or perhaps were the devices too close together? Unfortunately, I don’t know the exact setup of the workshop WAP but if this is the cause then I would like some advice/ideas to diagnose which settings on the WAP and Photon might cause this and what apart from not using the workshop can solve it.

Not saying it is the issue, but seeing a pattern like:“working fine -> flashed new code -> not working fine anymore”, makes me think it might have something to do with the new code. Any chance you could try the old code again to see if that makes a difference, or even something simple like “tinker”?

1 Like

@Moors7 Sorry, should have said - the last change I made was to add WiFi.listen(false); just before WiFi.connect(); The previous application version had been working fine so some time. I did try reverting this change on one device but it made no difference until that device was remove from the workshop at which point it worked normally again. [Edit] Mystery solved - it had nothing to do with the photon - an AC relay was chattering near to the device and this clearly put spikes in the DC power supply and signal lines into the photon.