Photon not accepting new code [solved]

Everything was working fine until a few days ago. Now I can’t load any new program on my Photon. It will start the Magenta thing and appears to load a new application but when it restarts it still runs the old application. I can’t even load the Tinker application anymore. What’s strange is that I can make a change to the application it is running and it will load the new version of that application but no other application. I am new to this and don’t know what other debugging tools there is. I used the dfu-util to load the latest firmware again but that didn’t help. I tried to install the particle-cli but so far haven’t been successful to get that loaded properly as I always have some problem when npm tries to install the package.

Help - what can I do?

Dan

Problem solved! The Wifi signal strength was marginal and apparently loading a larger application failed but the very small test application I had didn’t have the problem. It would seem that the transfer code could use a bit more robustness and some checksum mechanism to make sure it all is transferred properly and completely. Of course an error message would be nice too as it just always said “flashing successful”

The transfer code does use a checksum, both for individual packets and for the entire file. If WiFi loss of signal causes the update process to not receive any data for 30s it will timeout and restart the device.

Hm, thanks. The device never lost connection though and the update only ever took a few seconds, then Photon would restart but with the old code. When I moved the Photon closer to the access point updates worked immediately. Moving the Photon back to the previous location and the update problems started again. So the behavior definitely has something to do with the wifi strength. The one test program I used publishes an event out from the loop variable so I know the device is connected when I initiate the update.