Unable to flash using particle serial flash

Hi there, I am having trouble flashing .bin files using particle serial flash for both Argons and Photons right now and I swear I have followed the same process many times for previous devices. It says Flash success! and the device restarts, but it does not receive the new firmware. I have tried flashing in dfu mode as well, to no avail. Flashing via web IDE works fine. Is anyone else encountering issues, or am I missing something?

Can you check the validity of the binary via particle binary inspect?
Also when trying to flash via DFU, add the -v flag to get a more verbose output about possible reasons for a flash failing.
Finally it could be your USB cable, try some other ones.

Well that was embarrassing, it was the micro USB cable. Thanks @ScruffR.

1 Like

So I have it working for Argons / Borons, but now for Photons (2.1.0) when I do particle serial flash it says “sending file firmware.bin” and reboots without a flash success message, and for particle flash --usb I get the Error writing firmware: Incorrect platform id (expected 6, parsed 12), use --force to override". What am I doing wrong again? Thanks.

Here is the verbose output for DFU (the same firmware flashes fine using Web IDE):

Error writing firmware: Incorrect platform id (expected 6, parsed 12), use --force to override
VError: Error writing firmware: Incorrect platform id (expected 6, parsed 12), use --force to override
    at /Users/pwd/.particle/node_modules/particle-cli/dist/cmd/flash.js:214:13
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async CLI.runCommand (/Users/pwd/.particle/node_modules/particle-cli/dist/app/cli.js:160:7)
    at async CLI.run (/Users/pwd/.particle/node_modules/particle-cli/dist/app/cli.js:190:14)
caused by: Error: Incorrect platform id (expected 6, parsed 12), use --force to override
    at /Users/pwd/.particle/node_modules/particle-cli/dist/cmd/flash.js:151:17
    at tryCatchReject (/Users/pwd/.particle/node_modules/particle-cli/node_modules/when/lib/makePromise.js:845:30)
    at runContinuation1 (/Users/pwd/.particle/node_modules/particle-cli/node_modules/when/lib/makePromise.js:804:4)
    at Fulfilled.when (/Users/pwd/.particle/node_modules/particle-cli/node_modules/when/lib/makePromise.js:592:4)
    at Pending.run (/Users/pwd/.particle/node_modules/particle-cli/node_modules/when/lib/makePromise.js:483:13)
    at Scheduler._drain (/Users/pwd/.particle/node_modules/particle-cli/node_modules/when/lib/Scheduler.js:62:19)
    at Scheduler.drain (/Users/pwd/.particle/node_modules/particle-cli/node_modules/when/lib/Scheduler.js:27:9)
    at processTicksAndRejections (internal/process/task_queues.js:79:11)

This suggests that you are not flashing a Photon (Platform ID 6) binary but trying to push a Argon (Platform ID 12) binary into a Photon, which won’t fly well :wink:

That’s what one of my previous suggestions was aiming at

1 Like

Oh geez, I missed your suggestion there as well. I did not realize when I downloaded firmware from Web IDE that it’s compiled for a device type! Thanks again @ScruffR .

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.