I was flashing my Xenon with code, setting it into DFU mode before flashing. Then after thinking that I had correctly flashed the device I noticed that it was still flashing yellow. Nothing I’ve done has been able to get it out of this state. I’m on the 0.9.0 firmware. What do I do now? The Xenon had been working fine for quite some time otherwise.
To spare us from having to suggest things you've already tried: what have you tried already?
Particle update and Particle flash --usb tinker, is mostly a good way to start.
Thanks. The Xenon no longer appears as a serial device, so none of that works. I had already tried the “particle flash --usb tinker” command.
particle update
Physically unplug and reconnect the Particle device and try again.
!!! There was an error trying execute DFU utilities.
!!! For help with installing DFU Utilities, please see:
https://docs.particle.io/guide/tools-and-features/cli/#advanced-install
!!! You may also find our community forums helpful:
https://community.particle.io/
> Error code: unknown
Also:
particle flash --usb tinker
Physically unplug and reconnect your Particle devices and try again.
Error writing firmware: Missing permissions to use DFU
I have the requisite udev rules to access the device without being root.
I’m on Ubuntu Linux btw.
OK if I plug the xenon that’s stuck with a flashing yellow led I get this in the system logs:
kernel: [ 2805.618044] usb 3-2: new full-speed USB device number 10 using xhci_hcd
kernel: [ 2805.767533] usb 3-2: New USB device found, idVendor=2b04, idProduct=d00e, bcdDevice= 2.51
kernel: [ 2805.767540] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: [ 2805.767544] usb 3-2: Product: Xenon DFU Mode
kernel: [ 2805.767548] usb 3-2: Manufacturer: Particle
kernel: [ 2805.767551] usb 3-2: SerialNumber: e00fce68a65eef6f7fb0d535
One of my other xenons that is healthy enumerates like this:
kernel: [ 2839.143260] usb 3-2: USB disconnect, device number 10
upowerd[1306]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
kernel: [ 2843.911104] usb 3-2: new full-speed USB device number 11 using xhci_hcd
kernel: [ 2844.061157] usb 3-2: New USB device found, idVendor=2b04, idProduct=c00e, bcdDevice= 1.01
kernel: [ 2844.061163] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: [ 2844.061167] usb 3-2: Product: Xenon CDC Mode
kernel: [ 2844.061171] usb 3-2: Manufacturer: Particle
kernel: [ 2844.061175] usb 3-2: SerialNumber: e00fce682d03364c5ddb3518
mtp-probe: checking bus 3, device 11: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2"
mtp-probe: bus: 3, device: 11 was not an MTP device
kernel: [ 2844.076040] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
kernel: [ 2844.076519] usbcore: registered new interface driver cdc_acm
kernel: [ 2844.076520] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
upowerd[1306]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
upowerd[1306]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.1
upowerd[1306]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0
How do I get the first device out of this state?
I also tried
particle flash --usb hybrid-0.9.0-xenon.bin
Physically unplug and reconnect your Particle devices and try again.
Error writing firmware: Missing permissions to use DFU
Same problem.
I can use dfu-util though, here’s the output of dfu-util --list
Found DFU: [2b04:d00e] ver=0251, devnum=14, cfg=1, intf=0, path="3-1.3", alt=2, name="@External Flash /0x80000000/1024*004Kg", serial="e00fce68a65eef6f7fb0d535"
Found DFU: [2b04:d00e] ver=0251, devnum=14, cfg=1, intf=0, path="3-1.3", alt=1, name="@DCD Flash /0x00000000/1*016Ke", serial="e00fce68a65eef6f7fb0d535"
Found DFU: [2b04:d00e] ver=0251, devnum=14, cfg=1, intf=0, path="3-1.3", alt=0, name="@Internal Flash /0x00000000/1*004Ka,47*004Kg,192*004Kg,4*004Kg,4*004Kg,8*004Ka", serial="e00fce68a65eef6f7fb0d535"
Also I’m able to run
sudo /home/username/bin/particle particle flash --usb tinker
This runs without error, but then nothing happens.
OK so this runs and gives the following output:
dfu-util -d 2b04:d00e -a 2 -s 0x80200000 -D tinker-0.9.0-xenon.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/
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 2b04:d00e
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #2 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "External Flash "
Downloading to address = 0x80200000, size = 11140
Download [=========================] 100% 11140 bytes
Download done.
File downloaded successfully
I’ve also tried the firmware and factory reset specified here to no avail:
Ok I finally fixed it.
I created an empty project, flashed it in Debug mode and it seems to have returned to normal. Flashing my original code then worked after this step too. No idea why I would have to do this, nor why this would work. It feels like a bug.
I’ve been able to reproduce this twice already. Usually flashing it with different code or different target (e.g. Flash application & DeviceOS (local)) seems to work…definitely buggy.
I’m using the latest Particle workbench to flash my code.
Thank you! It worked for me!