# Photon: dfu-util on Ubuntu fails to flash

**URL:** <https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958>\
**Category:** Troubleshooting\
**Created:** [March 10, 2016, 7:46pm UTC](https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958 "2016-03-10T19:46:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![gustavotemple](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@gustavotemple](https://community.particle.io/u/gustavotemple)\
**Post date:** [March 10, 2016, 7:46pm UTC](https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958/1 "2016-03-10T19:46:09Z")

</div>

Hi there,

I have setted my Photon to DFU mode:  
[https://docs.particle.io/guide/getting-started/modes/photon](https://docs.particle.io/guide/getting-started/modes/photon)

And I am trying to flash this blink example (session _Compile Locally, Flash Locally - Over USB_):  
[https://learn.sparkfun.com/tutorials/photon-development-guide/all](https://learn.sparkfun.com/tutorials/photon-development-guide/all)

But my Photon always got back to blinking blue.

Any help/suggestions?

My versions are:

$ uname -a  
Linux 3.16.0-62-generic #83~14.04.1-Ubuntu SMP Fri Feb 26 22:52:39 UTC 2016 x86\_64 x86\_64 x86\_64 GNU/Linux

$ particle help  
Welcome to the Particle Command line utility!  
Version 1.11.0

$ dfu-util -V  
dfu-util 0.9

---

<div class="post-metadata">

**Author:** ![gustavotemple](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@gustavotemple](https://community.particle.io/u/gustavotemple)\
**Post date:** [March 10, 2016, 7:53pm UTC](https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958/2 "2016-03-10T19:53:02Z")

</div>

$ dfu-util -v -v -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D blink.bin  
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.  
Copyright 2010-2016 Tormod Volden and Stefan Schmidt  
This program is Free Software and has ABSOLUTELY NO WARRANTY  
Please report bugs to [http://sourceforge.net/p/dfu-util/tickets/](http://sourceforge.net/p/dfu-util/tickets/)

dfu-util: Invalid DFU suffix signature  
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!  
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 "  
Memory segment at 0x08000000 3 x 16384 = 49152 ®  
Memory segment at 0x0800c000 1 x 16384 = 16384 (rew)  
Memory segment at 0x08010000 1 x 65536 = 65536 (rew)  
Memory segment at 0x08020000 7 x 131072 = 917504 (rew)  
Downloading to address = 0x080a0000, size = 2936  
Download [] 0% 0 bytesErasing page size 131072 at address 0x080a0000, page starting at 0x080a0000  
Poll timeout 50 ms  
Poll timeout 0 ms  
Download from image offset 00000000 to memory 080a0000-080a0b77, size 2936  
Poll timeout 50 ms  
Poll timeout 0 ms  
File downloaded successfully  
Poll timeout 50 ms  
Poll timeout 0 ms  
dfu-util: Error during download get\_status

---

<div class="post-metadata">

**Author:** ![gustavotemple](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@gustavotemple](https://community.particle.io/u/gustavotemple)\
**Post date:** [March 10, 2016, 7:53pm UTC](https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958/3 "2016-03-10T19:53:36Z")

</div>

$ particle flash --usb blink.bin  
running dfu-util -l  
Found DFU device 2b04:d006  
checking file blink.bin  
spawning dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D blink.bin  
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.  
Copyright 2010-2016 Tormod Volden and Stefan Schmidt  
This program is Free Software and has ABSOLUTELY NO WARRANTY  
Please report bugs to [http://sourceforge.net/p/dfu-util/tickets/](http://sourceforge.net/p/dfu-util/tickets/)

dfu-util: Invalid DFU suffix signature  
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!  
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 = 2936  
Download [=========================] 100% 2936 bytes  
Download done.  
File downloaded successfully  
dfu-util: Error during download get\_status

Error writing firmware…dfu-util: Invalid DFU suffix signature  
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

dfu-util: Error during download get\_status

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [March 10, 2016, 7:56pm UTC](https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958/4 "2016-03-10T19:56:21Z")

</div>

> [@gustavotemple](#):
>
> Downloading to address = 0x080a0000, size = 2936Download [=========================] 100% 2936 bytesDownload done.

The above means that it worked. You can safely ignore the `dfu-util: Error during download get_status` error as that is not a real error.

If your device is still blinking dark blue, then it does not have WiFi credentials yet.

---

<div class="post-metadata">

**Author:** ![gustavotemple](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@gustavotemple](https://community.particle.io/u/gustavotemple)\
**Post date:** [March 10, 2016, 8:30pm UTC](https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958/5 "2016-03-10T20:30:45Z")

</div>

@bko,

Yes, I have tryed this too, but my Photon got back to blinking magenta (Safe Mode) and the led D7 did not blink.

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [March 10, 2016, 9:23pm UTC](https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958/6 "2016-03-10T21:23:52Z")

</div>

How did you run `make`? Did you include the platform option so it knows to build for a Photon? If not, that would give you the kind of thing you are seeing.

Try this with your device in dfu mode:

`make PLATFORM=photon APP=blink program-dfu`

---

<div class="post-metadata">

**Author:** ![gustavotemple](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@gustavotemple](https://community.particle.io/u/gustavotemple)\
**Post date:** [March 10, 2016, 9:33pm UTC](https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958/7 "2016-03-10T21:33:45Z")

</div>

@bko,

Yes, as follow below:

cd firmware/main  
make PLATFORM=photon clean all  
make PLATFORM=photon APP=blink

And after that:

1. make PLATFORM=photon APP=blink program-dfu
2. particle flash --usb blink.bin
3. dfu-util -v -v -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D blink.bin

But the result is the same

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [March 10, 2016, 9:47pm UTC](https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958/8 "2016-03-10T21:47:04Z")

</div>

> [@gustavotemple](#):
>
> make PLATFORM=photon APP=blink program-dfu

This command, with the part in dfu mode, compiles the blink APP and downloads it over dfu, so all the other commands are not needed.

---

<div class="post-metadata">

**Author:** ![gustavotemple](https://avatars.discourse-cdn.com/v4/letter/g/eb8c5e/32.png) [@gustavotemple](https://community.particle.io/u/gustavotemple)\
**Post date:** [March 14, 2016, 4:06pm UTC](https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958/9 "2016-03-14T16:06:48Z")

</div>

@bko,

I have tried with another device Photon that I have, it flash normally and worked fine the example “_blink_”, and does not returned any error like “_dfu-util: Error during download get\_status_”.

Do you know the reason why that happened?

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [March 14, 2016, 5:42pm UTC](https://community.particle.io/t/photon-dfu-util-on-ubuntu-fails-to-flash/20958/10 "2016-03-14T17:42:00Z")

</div>

It might have more recent software that implements the get\_status command in DFU mode.

That issue was closed last Sept. in this change:

> <https://github.com/particle-iot/firmware/issues/599>
