Unable to downgrade firmware version

Per the documentation here:

https://docs.particle.io/reference/cli/#target-a-specific-firmware-version-for-compiling

I should be able to target specific firmware versions. My experience does not match that. Please see my CLI commands where I first put my photon into listening mode, identify to print the firmware version, reset the photon then flash with a downgraded target, then put it into listening mode again to identify one last time.

~/C/my-tinker ❯❯❯ particle identify                                                                                                                                                                       
particle-cli v1.19.2

! A newer version (1.19.4) of particle-cli is available.
! Upgrade now by running: npm install -g particle-cli


Your device id is XXXXXXXXXXXXXX
Your system firmware version is 0.6.0
~/C/my-tinker ❯❯❯ particle flash k1-photon src/my-tinker.ino --target 0.4.9
particle-cli v1.19.2

! A newer version (1.19.4) of particle-cli is available.
! Upgrade now by running: npm install -g particle-cli

Targeting version: 0.4.9

Including:
    src/my-tinker.ino
attempting to flash firmware to your device k1-photon
Flash device OK:  Update started
~/C/my-tinker ❯❯❯ particle identify
particle-cli v1.19.2

! A newer version (1.19.4) of particle-cli is available.
! Upgrade now by running: npm install -g particle-cli


Your device id is XXXXXXXXXXXXXXX
Your system firmware version is 0.6.0

What am I doing wrong?

By using that command, you target the user firmware. As long as the system firmware > user firmware, there shouldn’t be an issue. That is, you can flash 0.4.x user firmware to a 0.6.x system firmware.
If you want to downgrade your system firmware, you’ll have to flash the respective parts in DFU mode in reverse order.

particle identify only tells you the system firmware version you got installed, not the version of your application firmware.
You can use particle serial inspect to see what version the individual modules are - but these numbers are somewhat cryptic in relation to the commonly used x.y.z notation.

As @Moors7 said, flashing a lower version app firmware does not downgrade the system firmware.

So the targeted compile works, but why do you need such old version anyway - what’s not working with 0.6.0?
That would be good to know in order to fix that.

1 Like

So I’m confused, what is the step for downgrading the system firmware?

The reason is is that I have a mobile developer that is integrating a softap setup into a React Native app. His setup works and mine doesn’t and we noticed one of the differences is that his is running a different system firmware. So to rule that out the cause of the bug we wanted to just try downgrading my system firmware to his version to see if it started working.

Downgrading would work this way

You need to download the system binaries part 1 & 2 from the respective firmware repo tags and flash in reverse order.

But downgrading to anything pre 0.5.0 shouldn’t do any good with SoftAP, since that was only introduced with 0.5.0.

Hi ScruffR,
Could you please post a screenshot or the list of CLI commands for how to “download the system binaries part 1 & 2 from the respective firmware repo tags and flash in reverse order”?

I have a similar problem: I wrote a large chunk of code for an Electron running 0.5.3, then wanted to use it on an Electron running 0.6.1, and the Particle Web IDE was not able to compile the code for 0.6.1, though it compiles fine for 0.5.3. While yes, I could go through and figure out what in the libraries is breaking for 0.6.1 (it’s giving me an error in TinyGPS++.h), I was thinking it would be faster if I reverted to 0.5.3.

I ran the particle flash --usb tinker command in the CLI, and that gave me “Flash success!” Then I tried to run the particle_firmware_manager-v0.5.3-osx application, and it is unable to complete the update.

Screenshot/list of commands of what to do would be great!! Thank you.

@yoohsiu, can you try setting the target firmware to 0.6.0 for the electron in Web IDE and see if it compiles?

Tried it - it does compile under 0.6.0, but not 0.6.1.

Alright great! For now, you can do that for your code compilation. Once firmware version 0.6.2 is released, complication should work without making any changes. :wink:

Ah cool… do you have an estimate as to when 0.6.2 might come out? Thanks!

I don’t have an estimate but work has begun and I am sure the firmware team wants to have it available ASAP.