Particle Build working and Particle Dev failing to flash

Hi

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 tried quite a few times but never managed to flash it successfully. Web IDE works first time.

Can someone from Particle shed some light in what’s going on?

Look at bandwidth issues and the last bit says.

Also after doing that I face some difficulties to re-program new application using Web IDE.

So sould like it is a new common problem now.

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.

What does your folder structure look like? Can you take a Screenshot of the whole screen? Could you try flashing a really really simply app (blink an LED) to see if that works?

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.

My issue seems to be exactly the same as described on this thread (although on Windows) [SOLVED]Flashing with local ide via cloud not working
though solution is still unclear.

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?

I’ve tried to establish this in the parallel thread
https://community.particle.io/t/solved-flashing-with-local-ide-via-cloud-not-working/14045/11?source_topic_id=18099

I just moved the double post over here to keep things tidy - don’t double post!

This seems exactly the problem I am having but on Windows. Posted it in a new thread here Particle Build working and Particle Dev failing to flash

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):

C:\Development\ParticleDev>particle list
Spectron [3a0021000f47343339383037] (Core) is online

C:\Development\ParticleDev>particle device remove 3a0021000f4734333974747
Are you sure? Please Type yes to continue: yes
releasing device 3a0021000f4734333974747
Okay!

C:\Development\ParticleDev>particle list
No devices found.

C:\Development\ParticleDev>particle device add 3a0021000f4734333974747
Claiming device 3a0021000f4734333974747
Successfully claimed device 3a0021000f4734333974747

C:\Development\ParticleDev>particle list
Spectron [3a0021000f4734333974747] (Core) …

I repeated removing and re-adding the device via Web and via CLI and result is still the same. Web IDE shows it as Photon and local tools (CLI and Particle Dev) as Core.

No idea how to progress this

Could you try npm update -g particle-cli to get the most recent version of CLI and try again.

Meanwhile maybe @ Dave can get in touch to check the state of the device on the Particle side.
Additionally you could shoot them a message via the support contact (to right corner SUPPORT)


I've just seen that @ suda responded to you on the parallel thread

I am using the latest 0.4.7 on Build IDE - and it works fine there. But not on Particle Dev. And I my CLI is the latest version as well as ParticleDev.

I did some more digging through the ParticleDev and CLI code and it looks like the product_id for my claimed Photon is set to 0:

https://api.particle.io/v1/devices?access_token=NNNNN

returns this
[
{
“id”: “My Photon ID”,
“name”: “Spectron”,
“last_app”: null,
“last_ip_address”: “My IP Address”,
“last_heard”: “2015-12-10T00:08:29.256Z”,
“product_id”: 0,
“connected”: true
}
]

Strangely the Web IDE still sees it as Photon (product_id 6). Any ideas?

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.

Thanks to suda it was sorted out (not sure what exactly but it works) - thanks again