Hello,
I’m having problems flashing firmware on my photon. It’s connected to the cloud, I can see it and I can signal it from the console. I tried to do an OTA update, and it failed.
So I installed the cli and dfu-util (on last osX) and tried to update the firmware using both --serial and --usb, both in both case I get an error.
Using serial I get:
$ particle flash --serial firmware.bin
! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE
sending file: firmware.bin
Error writing firmware: Transfer cancelled
While using usb (flashing yellow), I get:
Antonio$ particle flash --usb firmware.bin
Error writing firmware: dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
UPDATE: particle flash --serial bootloader-0.7.0-photon.bin did work!
Upgrading the bootloader solved the problem. Now I’m able to flash the firmware both using the --serial and OTA.
Thanks a lot @ScruffR
Old thread but I thought I’d add a different solution.
I had this problem but I could not get the bootloader to flash.
david@ash:/mer/spark/devel/core-firmware$ particle flash --serial bootloader-0.7.0-photon.bin
! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE
sending file: bootloader-0.7.0-photon.bin
! serial:
Error writing firmware...Transfer cancelled
undefined
In the end I ran this (cite: build.md docs) from a checkout of 0.7.0 using the 5.4 toolchain (gcc-arm-none-eabi-5_4-2016q3)
david@ash:/mer/spark/devel/core-firmware$ make bootloader PLATFORM=photon
david@ash:/mer/spark/devel/core-firmware$ particle flash --serial ./build/target/bootloader/platform-6-lto/bootloader.bin
And that worked.
I later found out that the bootloader hadn’t downloaded properly so I was trying to flash garbage. Anyway…