I have started recently using my Particle Photon and writing firmware and came to a problem. I initially tried Particle Build (Web IDE) to compile small project and it worked perfectly. Then I started using Particle Dev - had a trouble installing it with installer tripping over long path so I downloaded standalone ZIP file.
But with Particle Dev I quickly run into problem - when compiling my project, it compiles on a cloud fine, then starts flashing the Photon and when this ends (successfully) nothing happens. I.e. Photon goes through flashing cycle (magenta blinking) and eventually stops and restarts but firmware is not updated.
Web IDE compilation and flashing is absolutely fine. Any help please?
I don’t know but I had the same problem yesterday a couple of times.
It did all the things it should have , but did change the firmware , I even checked with biuld to see if 0.4.8 was out and that was my problem.
In the end it took 3 or 4 goes before it did it right ,never had that problem before.
I do not see the relation there. I am using SYSTEM_THREAD instead of manual or automatic mode and have no problem updating with Web IDE. My problem is that Particle Dev fails to flash my compiled code and I cannot understand why.
One file test.ino - can’t be simpler, it configures one of the pins as output, then sets it to high, sleeps 50msec and sets to low and sleeps 50msec (just to verify the pulses on the output with logical analyzer).
The Particle Dev compiles it fine and I can see firmware bin appearing briefly before it goes to upload, then uploading starts and Photon starts flashing magenta (programming firmware), that goes on for quite some time until it goes to cyan breathing again but then absolutely nothing hapens. Attached logical analyzer shows the older firmware is still running (I move to a different pin every time to track the changes).
Web IDE, the same file uploads fine and takes a few seconds to flash (magenta flashing a few seconds, restart and all works).
I see no errors in either process - nothing whatsoever.
I really need to resolve it but so far I cannot even find information where and what to look for. I also found that post Arduino or PIC32 experience, the scattered all over the place information about various problems arount Photon tools does not really work in favour of this little device - it’s really frustrating.
This may be caused by mismatch between system version on your Photon and version your code is compiled against. Dev builds your code always against the latest version. Could you try to use latest firmware in Build IDE and flash some app using it?
So the issue may be that compiled firmware is not for the right platform - how can I debug/investigate this? I only have one Photon device and always select it in Particle Dev so it should target that.
It’s not only the hardware platform that counts but also the system firmware version (currently 0.4.7).
For the time being Dev and CLI always target the latest version, while Web IDE has the option to choose and even will trigger an update if required.
So if it’s a version conflict and you haven’t got CLI installed just go to Web IDE, select your device and target version Latest (0.4.7) flash any dummy sketch (e.g. blinky) and wait for up to three flash/reboot cycles till your 0.4.7 app firmware starts running (e.g. the blinking starts as expected).
Once you got the latest system on-board Dev should be working again.
My Photon has 0.4.7 already - when I got it I had problems registering it so I had to go through manual flashing of the 0.4.7 and updating the keys procedure as described on one of the threads here. WebIDE compiles and uploads on 0.4.7 fine and it takes seconds to complete. So I am none the wiser what to look at next to make Particle Dev working.
I had a closer look and it seems that Particle Dev sees my Photon as Core (according to the icon it shows). Web Ide (Particle Build) shows it as Photon. What is going on and why are they different? I am using the same account logging in in both of them and only have one device? Any cache I need to clean somewhere?
My Particle CLI sees device as Core as well not as Photon. The WebIDE shows it as Photon. I have just tried removing and adding it back in CLI and it is still the same (device id in listing below is bogus of course):
Spectron [3a0021000f47343339383037] (Core) is online
C:\Development\ParticleDev>particle device remove 3a0021000f4734333974747
Are you sure? Please Type yes to continue: yes
releasing device 3a0021000f4734333974747
No devices found.
This thread Cloud thinks my Photon is a Core seems to be having exactly the same issue as I am having and setup sequence people used is similar to mine. This really need to be sorted out and the cause of this misidentity found. I have scanned thye soures of Particle CLI and Particle Dev and see that priduct_id is used extensively to identify what to do with the device and how to compile the code. What is not clear yet is how/from where the product_id is getting setup in cloud. One thing in common with all these problems is the keys regenerating issue.