Photon Firmware Up/Down Grade Problems

Hi All,

I am trying to flash a photon that has this version of firmware on the photon

Your system firmware version is 0.8.0-rc.8

Now in the cli interface I have selected this version with the --target switch

particle compile photon --target 0.8.0-rc.8

The compile is good.

Now I try flashing in dfu mode (flashing yellow LED) using my favorite serial com standard USB.

particle flash --usb photon_firmware_XYYY.bin

the command completes and the photon connects to the cloud with a breathing magenta LED.

Now I cannot see any variables or functions in the console.

I tried an OTA flash as

particle flash <my_device_id> photon_firmware_XYYY.bin

and get the same results.

A couple of the libraries that I am using won’t work with the current web build IDE so I have to use the cli method.

How can I determine what version of the firmware that the CLI is compiling when I don’t use the --target switch?

I see from aother thread that presently each release uses a different flash End Point so moving back to 0.6 is not possible.

One more item. I went into the web IDE build and was able to build and flash a simple tinker like program using 0.8.rc-8 but I can’t downgrade to 0.6 which is what my cli is using.

Suggestions are needed as I am at a all stop.

ChipMonk

Not answering your questions about down-grading, but… breathing magenta is safe mode. If your photon boots and continuously goes to safe mode, there is a problem with your application that causes the Photon crash.

https://docs.particle.io/faq/particle-devices/led-troubleshooting/photon/#breathing-magenta

Hi Ninjatill,

I mistyped. My photon is “breathing cyan” so the photon is connected to the particle cloud.

It seems that the firmware on the device 0.8.0-rc.8 is not working with what I compile on the particle cli.

In the cli

MacBook-Air:8_19_18 AirChipMonk$ particle --version
1.33.0

but I can’t find out what the default version the cli is using.

ChipMonk

@chipmonk, the default target used by the CLI is the latest release version, aka 0.7.0. If you want to compile to 0.8.0-rc.8 or later, you would run particle compile photon --target 0.8.0-rc.8 . for example.

@chipmonk I think you need to get the web IDE working first with your libraries and 0.8.0-rc.8. I have experienced some funny behaviour with 0.8.0-rc.8 and 10. When in the web IDE with the target photon online (breathing cyan) and the device selected (yellow star) what on device firmware is showing? Try selecting target 0.8.0-rc.8 and doing a compile then fix any library issues.

If you can USB connect photon then put it in listening mode (flashing blue) and try particle serial inspect. This will identify if any odd modules - I have had bootloader incompatibility issues which usually can be cleared with particle device update or particle flash serial "bootloader-0.8.0-rc.8.photon.bin",

Lastly, 0.8.0-rc.8 requires CLI version 1.33.0 (and as confirmed by @rickkas7 this has some bugs in it with wifi security setting).

1 Like

Hi Armor,

I checked the particle --version

-MacBook-Air:8_19_18 ChipMonk$ particle --version
1.33.0

Next I put the device in listening mode and did a particle serial inspect command

Platform: 6 - Photon
Modules
Bootloader module #0 - version 201, main location, 16384 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #1 - version 307, main location, 262144 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #2 - version 204
System module #2 - version 307, main location, 262144 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #1 - version 307
Bootloader module #0 - version 201
User module #1 - version 5, main location, 131072 bytes max size
UUID: E5EC03F8B88F3E9D7B07DCB5ECB2E2B588034735795C46E6EAE70C9385041185
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #2 - version 307
empty - factory location, 131072 bytes max size

I am going to try to roll this firmware os back to 0.7 and see if it works better.

I have a couple of other particles operation with os 0.8.0-rc2 which are connecting to the web and operating fine but after a web outage they show up on the cloud/console but not variables are shown.

I can do a signal on the Console and the person by the units sees the signal flashing on the RBG LED.

One of the particles was able to show it’s variables after a power cycle. The others are much more difficult to power cycle and thus restore to full operation.

ChipMonk

Hello Forum,

I need someone to give me a couple of details on how to downgrade the particle that is currently running 0.8.0-rc.8.

Looking a the Git Hub I see some text on downgading this version 0.8.0-rc.8 os as follows.

Note: Downgrading [Electron/Photon/P1] OTA or YModem transfer:
If you need to downgrade, you must downgrade to 0.7.0 and then 0.6.3(Photon/P1), 0.6.4(Electron) to ensure that the bootloader downgrades automatically. When downgrading to older versions, downgrade to 0.7.0 first, then 0.6.3(Photon/P1), 0.6.4(Electron), then to an older version such as 0.5.5.

So the procedure as I understand for a photon is using the dfu serial mode

  1. Flash system-part1-0.7.0-rc.4-photon.bin
  2. Flash system-part2-0.7.0-rc.4-photon.bin

Now do I flash the bootlooadeer

Flash bootloader-0.7.0-rc.1-photon.bin

Then it appears I need to repeat this with 0.6.3 system.part-1 / system.part-2

Do I have to reflash the boot loader ?

Understand I am a hardware guy and don’t like to flash things unless I am 100% sure what I am doing will work. Silicon bricks are a pain to restore :frowning:

ChipMonk

There are official (not RC) release binaries available for 0.7.0.

However, if you just run particle update in DFU Mode the Device OS should be rolled back to 0.7.0 - providing you first flashed a user application that doesn’t trigger an auto-update cycle immediately after that. Hence it’s advisable to run a particle flash --usb tinker first (assuming these are not “product” devices).

BTW, these devices aren’t that easily bricked just by flashing wrong binaries.

Thanks ScruffR,

This was straight forward and worked. I have moved many of my local devices back to 0.7.0 how.

thanks again.
ChipMonk

ScruffR,

One more thing, How can I determine what the default firmware OS for the particle CLI on my MAC is using when I don’t use the --target switch?

ChipMonk

Hi ScruffR,

I am still having problems. I moved back to tinker and compile it with 0.7.0 in the Web IDE.

Now the first time I go to read or write a digital pin, the photon will disconnect and then reconnect to the cloud. I am nearby the WiFi source and the RSSI was 24.

After the second connect the tinker will work for a while but after a couple of writes the write call returns -2 and the console reports it.

I added to tinker a serial write of the pin number and value and can see it execute when the function is being called.

It seems something is still not correct in the photon and the firmware. Can you give me some ideas on what to try?

ChipMonk

I put the particle in listing mode and did a particle serial inspect

Platform: 6 - Photon
Modules
Bootloader module #0 - version 101, main location, 16384 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #1 - version 207, main location, 262144 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #2 - version 207, main location, 262144 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #1 - version 207
Bootloader module #0 - version 7
User module #1 - version 5, main location, 131072 bytes max size
UUID: E22D93768A8726C4885CB96EC288BD89B2EC0C9F649F16D335D8753ECB88B243
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #2 - version 207
empty - factory location, 131072 bytes max size

Can you share a link to your Web IDE project?

BTW, the RSSI reading should be a negative number IIRC.

Sure,

Here is the like to my web IDE

https://build.particle.io/build/5b8c214686747d77c5000014

Yes the RSSI is a negative number.

ChipMonk

This is a “shared link”

https://go.particle.io/shared_apps/5b8cb36086747d172e000b80

chipMonk

I can’t reproduce your disconnection issue with my Photons.

One thing I noticed is that a digitalRead() does also reset the pin to LOW - is this intended?

The just before digital read call invokes a pull-down as the pads are defined in the read function as:

            pinMode(pinNumber, INPUT_PULLDOWN);
	return digitalRead(pinNumber);

If “Tinker” did not have this the input pad would be a “float” since Tinker has no drivers.

Still seems I have something wrong as the photon is not stable for a while after a OTA.

ChipMonk