I'm using an E0 dev board at the moment preparing for production. I'm in the process of writing the setup script to update and flash the devices as they come off the line. From a rough overview, I'm using the following sequence:
particle usb list
... Ensure device detected before proceeding particle usb dfu particle update
... delay for device reboot particle usb list
... Ensure device detected before proceeding
... Record device ID from response for activation and tracking purposes particle usb dfu particle serial flash --usb PROD-FIRMWARE.bin
At first I had issues across the board with 'particle usb', but based on another forum post I removed existing drivers and installed using Zadig 2.4. Now usb commands appear to work... sometimes.
I am seeing very inconsistent results with 'particle usb dfu'. In a test I just ran the first attempt at 'particle usb dfu' failed. A second 'particle usb dfu' actually succeeded, but reported that it failed (success measured by the fact that the signal LED changed to yellow). A third 'particle usb dfu' instantly reported back "Done."
I have run other tests previously where 5 commands in a row failed and I ended up using the RESET/MODE buttons to enter DFU mode.
Other notes: I am testing with a 3G E0. I am only powering through USB (so it doesn't have enough power to connect to the network and is therefore blinking green.) Nothing else is connected to the dev kit aside from "E0 USB" and antenna. I used the work-around with the buttons to at least get the firmware updated so it shouldn't be deprecated firmware.
Is there any existing explanation for this behavior? How would you recommend further troubleshooting?
No apparent change in behavior. The lines below were all performed in series without delay or any other change.
C:\Users\brendan\Downloads>particle usb dfu --all
Request timeout
C:\Users\brendan\Downloads>particle usb dfu --all
Request timeout
C:\Users\brendan\Downloads>particle usb dfu --all
Request timeout
C:\Users\brendan\Downloads>particle usb -v dfu --all
Sending a command to the device...
Request timeout
VError: Request timeout
at Timeout.req.reqTimer.setTimeout (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\lib\device-base.js:318:36)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
C:\Users\brendan\Downloads>particle usb -v dfu --all
Sending a command to the device...
Request timeout
VError: Request timeout
at Timeout.req.reqTimer.setTimeout (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\lib\device-base.js:318:36)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
C:\Users\brendan\Downloads>particle usb list
[2e001c000947373334363431] (Electron)
C:\Users\brendan\Downloads>particle usb -v dfu 2e001c000947373334363431
Sending a command to the device...
Request timeout
VError: Request timeout
at Timeout.req.reqTimer.setTimeout (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\lib\device-base.js:318:36)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
C:\Users\brendan\Downloads>particle usb -v dfu 2e001c000947373334363431
Sending a command to the device...
IN control transfer failed: LIBUSB_ERROR_NOT_FOUND
VError: IN control transfer failed: LIBUSB_ERROR_NOT_FOUND
at wrapUsbError (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\lib\usb-device-node.js:39:10)
at Device._dev.controlTransfer (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\lib\usb-device-node.js:107:25)
at C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\usb\usb.js:139:43
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickCallback (internal/process/next_tick.js:181:9)
caused by: Error: LIBUSB_ERROR_NOT_FOUND
at Device.usb.Device.controlTransfer (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\usb\usb.js:136:12)
at _promise.default (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\lib\usb-device-node.js:105:17)
at new Promise ()
at new F (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules@babel\runtime-corejs2\node_modules\core-js\library\modules_export.js:36:28)
at UsbDevice.transferIn (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\lib\usb-device-node.js:104:12)
at Electron._sendServiceRequest (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\lib\device-base.js:910:22)
at Electron._checkNextRequest (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\lib\device-base.js:593:10)
at Electron._process (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\lib\device-base.js:508:14)
at Timeout.setTimeout [as _onTimeout] (C:\Users\brendan\AppData\Local\particle\node_modules\particle-cli\node_modules\particle-usb\lib\device-base.js:891:12)
at ontimeout (timers.js:498:11)
C:\Users\brendan\Downloads>particle usb -v dfu 2e001c000947373334363431
Sending a command to the device...
Done.
Iāve been using the cable supplied with the dev kit. I just switched to a Zagg cable I have on hand and saw the same results. Switched to the other USB port on this laptop and same results.
I appear to be having a similar experience with āparticle usb resetā. The only time it has worked so far is after the device was in DFU mode. However, āparticle usb listā works every single time.
If you are on Windows, this is most likely a drivers issue. Please use the driver installer bundled with CLI or you can download it manually from here making sure that both targets (Uninstall and Install) are selected.
I did as you suggested and uninstalled/installed the drivers from the link you posted. Rebooted the machine. Same behavior. Once it eventually does go into DFU mode it seems to take other commands well, but getting it into DFU mode when it is in āLooking for Cellularā is still very inconsistent.
Edit: I followed the same suggestion on a second PC and am getting the same results with this board. I also fired up an E0 LTE board with the first PC and am seeing exactly the same behaviorā¦
So I might have solved this on Ubuntu 18.04 on accident. Iām on a 64-bit architecture, but while troubleshooting another application I installed lib32z1 and lib32ncurses5. Now all particle usb commands are working fine first tryā¦
Iām going to continue some further testing, but wanted to go ahead and post this update.