I got a Photon from Sparkfun recently. I loaded some sample code onto it and it flashed ok and seemed to be running correctly. The cloud ide indicates that I’ve got the latest firmware 0.4.7 on it. While it is connected I am able to successfully send commands to the device from the web api. The issue I am seeing is that it connects on power up and I’ll see the cyan breathing and then periodically I’ll get quick green flashes and then it will reconnect again. I can see on https://dashboard.particle.io/user/logs that the device is coming online and then going offline. In the dashboard log there are ‘device came online’ messages between every few mins to every few tens of seconds. There doesn’t seem to be a clear pattern to the frequency of disconnects.
Is there something I can do to improve the network connection stability? It is brand new so I am wondering if there is defect that might be causing it.
What code have you got running on the device?
Do you see the same behaviour when you put the device into Safe Mode? (press and hold SETUP button then tap RESET, keep holding SETUP till the LED turns magenta).
I am running the unmodified blink an led example. When I put it into safe mode (it is breathing magenta), I still see the same intermittent disconnections.
Just a quick update on this. It looks like the issue was that my power supply was insufficient. I was powering it via the supplied usb cable off of my macbook pro laptop. I tried running it off of an ipad 2 charger and after about 30 mins I have seen no further intermittent disconnects.
2 Likes
So I think my diagnosis was incorrect on this. I see now that you should be able to run the photon off of the computer usb when you are monitoring the serial connection. I put in a Serial.println() in the setup() function and another Serial.println() in the loop(). I am seeing the setup print statement one time. The loop pauses for a couple secs when the device loses connectivity (A couple slower green blinks and then some rapid green blinks). The frequency of disconnects seems to increase the longer the device is connected to power.
Just to clarify: You only see the dropouts when connected to USB but not on the USB charger, or has this changed too?
While it is true that you should be able to run the device off a USB port this does not guarantee that your computer actually provides all the needed current.
There was a time when during the USB enumeration process for Particle devices were not able to negotiate 500mA supply current with some USB ports. Maybe this is also happening to you.
Can you try other USB ports on your computer or another computer?
Try not having other USB devices connected at the same time.
1 Like
So far results have been inconsistent. Seems like it drops connection more often while connected to the computer but still happens on the usb charger. I want to do some further testing to confirm this, though. I’ll post an update in the next day or two with my findings.
Ok, so after testing this device for quite a while on a battery power supply I haven’t seen any disconnects so I guess the issue is insufficient current when powered via the computer usb port. Thanks for your assistance.
2 Likes