When I try to flash code via USB, it will ask me to flash via OTA What should I do?

I try to flash the code via USB as it guide in the document but then it ask me to flash via OTA. I don’t know why. I try both when the electron is breathing cyan and blue. And when I try to flash via OTA, it failed. I don’t know what to do, please help me.

As I already told you in two other threads:

Put your device in DFU Mode and run this

particle flash --usb firmware.bin

To acquire the binary you either download it via the :cloud: symbol next to the app name in Web IDE or via CLI

particle compile electron <yourProjectPath> --saveTo firmware.bin

or just use the one that you got from your previous attempt.

1 Like

I’m sorry for wrong typing. I have the problem about flashing via USB. I have already done flashing firmware.
But I don’t understand that you told me. May I check my under standing please?
I have 3 parts of firmware including system-part1-0.6.0-rc.2-electron.bin, system-part2-0.6.0-rc.2-electron.bin, and system-part3-0.6.0-rc.2-electron.bin.
So, after I flashed these firmware, I have to flash another firmware.bin which I download from the :cloud: symbol and flash it. Then complie by using this…
particle compile electron --saveTo firmware.bin (is this still in dfu mode?)
Then
particle flash code.ino (is this still in dfu mode?)

Are these steps correct?

The three system parts only need to be applied once when you update to a new system version (0.6.0-rc.2 is your current state).
But that does not contain your application firmware.

To flash your own application you need to upload/flash that binary too.

Your command

particle flash <deviceName> source.ino

does the building source.ino to firmware.bin first and the attempts an OTA flash.

To do that via USB you need to trigger the build and flash as two seperate steps.

You can’t flash an .ino direct!

1 Like

On top of @ScruffR comment you also need either --serial or --USB depending on what you’d want to use over USB

1 Like

Thank You so much. I can flash my code on my device now. :relaxed:

But sir I still have another problem. Hope you are not annoyed me. :wink:

What would that be?

When I do the particle list it’s still call itself electron but when I try to set up via command it call itself photon. I used to flash firmware of photon in there but I’ve already flashed three new electron firmware.

Where do you see the device being called “Photon”?
particle list clearly states (Electron) is online.

particle setup will clearly not find an Electron via WiFi (to setup the WiFi credentials) since these don’t have WiFi radios.
To claim your Electron you’d use particle device add <deviceID> where <deviceID> needs to be replaced witb that long hex number 46005f......3037 you already got.
But since you’ve already named the device I guess it’s claimed already.

1 Like

Thank you. I might misunderstood because it ask to scan for nearby photon.

Thanks @ScruffR, @Moors7 for helping out!

1 Like