Flashing my Photon has no effect

Dear all,

I set up my Proton today and started testing some code on it. At some point though, flashing code to the Proton didn’t update the program on it (it did flash magenta, though).

After reseting the Proton, deleting it from my list of devices and re-adding it through the webinterface (the Android app seems not to be capable of re-adding devices which were previously linked to your own account), the error still persists - I see the device as online, it breathes and I can use the flash-button - but after the magenta, green and cyan blinking the device just falls back to breathing cyan.

Is there any solution to this? I can’t use DFU right now but might be able to use it sometime this weekend …

It’s a Photon

@xrm, how do you determine that code is not updated on the device?

It doesn’t blink which it is supposed to do.

Dang, I always mess up Proton and Photon, sorry.

Can you paste the code that you flashed here using:

``` <-- insert this

//paste code here

``` <-- insert this

It’s just the standard “Blink An LED”-example.

I also tried the following code which worked earlier:

void setup() {
}

void loop() {
  RGB.control(true);
  for (int i = 255; i >= 0; i--) {
      RGB.color(i, 0, 0);
      delay(4);
  }
  for (int i = 0; i <= 255; i++) {
      RGB.color(0, i, i);
      delay(4);
  }
  RGB.control(false);
}

Could you download the compiled firmware binary from the IDE and tell me how large it is?

2.072 kB for the latter one, 2.236 for the blink-example.

Thanks! That sounds correct.

Can you try the blink an led example?

:innocent:

Opps sorry i missed that part. Did your photon automatically update itself during the first connection to the :cloud: (blink magenta)

Also, this is a new Photon that you received from your purchase right?

Yes and yes again.

Ok can you place the device in SAFE mode - hold down both buttons and release the RESET and release MODE when it blinks magenta.

Flash the blink an led example again.

Didn’t change anything; I click “flash”, it blinks magenta, shows white for a short moment, then blinks green, blinks cyan and breathes cyan.

Weird. Not sure what’s going on there…

@mdma or @kmmonk will have to assist you on this.

Could you download the firmware and then try flashing via usb using particle cli?

particle flash --usb firmware.bin

Found DFU device 2b04:d006
Apparently I didn't find a DFU device? util said  dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Deducing device DFU version from functional descriptor length
Found DFU: [2b04:d006] ver=0200, devnum=2, cfg=1, intf=0, alt=1, name="@DCT Flash   /0x00000000/01*016Kg", serial="00000
000010C"
Found DFU: [2b04:d006] ver=0200, devnum=2, cfg=1, intf=0, alt=0, name="@Internal Flash   /0x08000000/03*016Ka,01*016Kg,0
1*064Kg,07*128Kg", serial="00000000010C"

checking file  downloads/firmware.bin
spawning dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D downloads/firmware.bin
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x080a0000, size = 2072
Download        [=========================] 100%         2072 bytes
Download done.
File downloaded successfully
Error during download get_status
Error writing firmware...

Edit: Oh, but the code runs despite the error :smiley:

Edit2: But flashing another code from the webinterface still doesn’t work.

push :blush:

Could you please email me the binary you downloaded from the web IDE and I’ll try flashing it to my photon also, see if I can reproduce the problem.