Photon goes offline – online every ten minutes

Yesterday I installed a new photon. Everything worked fine, firmware updated to 0.5.2 and it was running my code. Then I noticed that it sometimes blinked cyan for some seconds followed by the normal cyan breathing.

I checked the dashboard and noticed that it loses cloud connection every ten minutes (11:18, 11:28, 11:38…). I switched the photon off and on at 11:42 but it showed the same behavior and continued the same “rhythm” (11:48, 11:58…). So it’s not 10 minutes after startup but at a pretty constant time grid.

I flashed, “Tinker” from the Particle app with exactly the same behavior. Two other photons running on the same network have no issues at all. It’s not flashing red or green during these events, just from breathing cyan to blinking cyan (around 2-30 seconds) back to breathing cyan.

I hope someone has an idea what could be the problem here.

Ping @BDub

I’m not seeing the same thing here with Tinker and my 0.5.2 Photon overnight. No disconnects whatsoever.

Can you try these steps:

npm upgrade -g particle-cli

After that completely check to make sure the version is 1.15.0

particle --version

Put your photon in DFU mode and run

particle flash --usb tinker

Put back into DFU mode and run

particle update

After that completes check to insure you are running 0.5.2. Put your photon in Listening mode and run:

particle identify

You can also check all of the modules to make sure the two system modules are v17, with photon in Listening mode run:

particle serial inspect

Check that tinker is running on the device by interacting with from the Particle app

@BDub This is my only photon that shows this behaviour…

CLI is at version 1.15.0 but I have the photon soldered on a PCB already and I don’t have a USB cable that fits. Is there a way to check the stuff OTA (I’m not so familiar with the CLI).

I alway publish the firmware (System.version()) to the dashboard during startup and it shows 0.5.2.

Thanks for your help!

That’s probably good enough to know it’s running system 0.5.2… did you verify it’s running Tinker? Anything on your PCB that fires every 10 minutes?

Are you publishing events close to 1 per second?

did you verify it's running Tinker?

Yes, I flashed Tinker with the iOS app and was able to switch LED 7 on/off.

Anything on your PCB that fires every 10 minutes?

No. It has IR sensors, DS18B20 temperature sensors, LDRs, a pressure sensor breakout board and 2 MAX7219CNG chips to drive 114 LEDs. This is the sixth identical board that I soldered and this is the only one which acts like this so I'm really puzzled.

Are you publishing events close to 1 per second?

It's not publishing except the version information during startup.

If I PM you the photon ID, is there anything that you can see on the server side?

@Maarten_CH, am thinking it might be a good idea to perform this experiment - downgrade the firmware version from 0.5.2 to say 0.4.9 and see if the issue is resolved.

Cheers

thinking it might be a good idea to perform this experiment - downgrade the firmware version from 0.5.2 to say 0.4.9 and see if the issue is resolved.

@UMD,I think I need USB connection to do that, correct?

Sure I'll take a look at the logs to see if anything looks suspicious on the server side.

You can downgrade by flashing in this order OTA tinker -> system2-049 -> system1-049

You can watch the event stream after each flash to know when the flash has succeeded and the photon is back online.

I thought about this as well @mdma and that wouldn't necessarily explain disconnects every 10 minutes if true. However @Maarten_CH also observed the 10 minute disconnects with a Photon running Tinker I believe.

Yes, I see the same when running Tinker.

You can downgrade by flashing in this order OTA tinker -> system2-049 -> system1-049

Do you have to flash system 2 before system 1 because you downgrade?

@BDub I've sent you a message with the photon ID.

Yes because of the module dependency order, that is the correct reverse order to apply a downgrade.

Cool, I'll take a look.

It looks like your Photon is encountering errors in the TCP connection every 591 seconds, sometimes 1141/1191 seconds. I’m wondering if you have the ability to run a quick test. If you can turn your phone into a mobile hotspot, erase credentials completely on the Photon (hold Setup for > 10 seconds), then get it connected to your hotspot. See if it stays connected longer than 20 minutes. You could also try to force a different IP address on your Photon or Router, it’s possible something is trying to use that same IP address in your network, causing errors every 10 minutes.

@BDub It looks like it didn't drop the connection from the phone hotspot during the last 60 minutes.

You could also try to force a different IP address on your Photon or Router, it's possible something is trying to use that same IP address in your network, causing errors every 10 minutes.

I will try this tomorrow evening after work.

I'm very happy with the progress but still puzzled why this happened to this photon. I didn't see any issues with the other two photons on the same network and the several others that I installed during the last couple of months.

Thanks for your support!

@Maarten_CH, I ran a continuous connection overnight with only a one minute outage (I think due simply to an Internet issue) with v0.5.2.

It could well be an internal networking issue at our end - you will need to conduct more tests, eg run other devices side by side, etc.

Based on the MAC address of the devices, the Router will issue a lease for the device for a particular duration. It will reconnect to the router over and over dynamically with DHCP, but will be given the same IP address that was issued to it previously, until the lease expires. Then it will grab a new one based on the devices attached, and which sub address is currently the next one available. It might even keep grabbing the same one. So it's conceivable that something is funky with that IP address (multiple devices attempting to use the same one, usually because one is given a static IP after the first one has acquired an IP dynamically). Or I suppose it's possible that the Photon is on the edge of your WAP's range and frequently yielding errors... this seems less likely though considering the 10 minute error interval.

You might want to try logging into your router and checking out what IP addresses are in use, and if there are any rules set for particular IPs or MAC addresses that would coincide with your Photon. You could also check out the RSSI (or dB levels) reported by all of your Photons while you're in there.

The IP it got was 192.168.192.60. Now I've set it manually to 192.168.192.18 and it disconnected only once during the last eight hours so it seems that there is indeed something strange with the specific IP address.

The photons report dB levels in the range -65 to -75 which is 10 to 15 dB lower than the router reports for the same connections. However, I think signal strength is still ok.

So it seems like the problem is solved by manually assigning a different IP address. I'll update this thread in case the problem comes back.

Thank you very much for your help!
Maarten

Now that your photon is on .18, do you see anything connected to .60 in your router?

No, .60 is not in used.

Hmm... my Wi-Fi router :crystal_ball: is getting hazzy now. Hopefully you can figure it out because I'd sure like to know what it was.