I’m trying to flash my photon locally on Ubuntu but dfu-util doesn’t find the photon no matter what I do. I have the photon in dfu mode and connected via usb. However, dfu-util doesn’t see the device. It seems I don’t have enough permission for my user to access the USB port fully so I’m running the commands as root.
Here’s the output I get when I try to flash:
$ particle flash --usb photon_firmware_1437378093909.bin
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
Error writing firmware... no dfu device found.
And here’s the output of dfu-util -l:
$ dfu-util -l
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 Runtime: [05ac:8289] ver=0099, devnum=6, cfg=1, intf=3, alt=0, name="UNKNOWN", serial="UNKNOWN"
Anyone have any idea what I’m doing wrong?
Can you try sudo dfu-util -l
and dfu-util -l
to see if there is a difference?
Thanks for the quick reply
Running dfu-util without sudo doesn’t even allow me to use the USB device. As I mentioned, the above output was from running as root:
$ dfu-util -l
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
dfu-util: Cannot open DFU device 05ac:8289
The device id definitely looks weird for a Photon.
For now can you use:
rm *.bin;particle compile photon .;sudo dfu-util -d 05ac:828 -a 0 -s 0x80A0000 -D *.bin
and see what happens?
I ran the commands separately and compilation went fine. Here’s the output of dfu-util. I think I may have hit on a Linux kernel bug of some kind because running this command kills Bluetooth on my machine!! Linux says there aren’t any Bluetooth controllers anymore. Very strange.
$ sudo env "PATH=$PATH" dfu-util -d 05ac:8289 -a 0 -s 0x80A0000 -D photon_firmware_1437379057417.bin
[sudo] password for ian:
Sorry, try again.
[sudo] password for ian:
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
dfu-util: Invalid DFU suffix signature
dfu-util: 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 05ac:8289
Run-time device DFU version 0100
Claiming USB DFU Runtime Interface...
Determining device status: state = appIDLE, status = 0
Device really in Runtime Mode, send DFU detach request...
Resetting USB...
Opening DFU USB Device...
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 64
dfu-util: Could not read name, sscanf returned 0
dfu-util: Failed to parse memory layout
It sounds like the device detected is not the Photon…
Can you check that the USB cable is ok and that the Photon is in DFU mode?
Yah. The photon was in DFU mode for sure but it looks like the cable I was using doesn’t work. Using a different cable seemed to fix it. I do get the following error when flashing but IIRC that’s a known issue that can be ignored.
dfu-util: Error during download get_status
Error writing firmware...
3 Likes