Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Timeout while waiting for USB device attachment after successful DFU for a device not supporting CDC ACM class #64

Open
borysjelenski opened this issue Aug 18, 2019 · 1 comment

Comments

@borysjelenski
Copy link

After completing a successful DFU via USB on PCA10059 (initiated while the target MCU runs an application which supports nRF DFU Trigger USB) the module reports an error 'Timeout while waiting for device to be attached and enumerated' despite the fact that the device has been properly enumerated by the system.

This is most likely due to the fact that after the DFU the device boots into an application that does not support CDC ACM class (it does however support nRF DFU Trigger USB) while at the end of prepareInDFUBootloader(device, dfu) function where the error occurs

// ...
return waitForDevice(device.serialNumber, DEFAULT_DEVICE_WAIT_TIME, ['serialport', 'nordicUsb']);

it explicitly waits for a device that supports such class (serial port).

This is confusing because, as far as I can tell, the documentation for PCA10059 does not mention that the application besides nRF DFU Trigger USB should support CDC ACM as well (which is unnecessary as the DFU Trigger is going to reset the target MCU back into the bootloader which does support it) to allow for DFU without manually resetting the board.

@borysjelenski borysjelenski changed the title Waiting for USB device attachment after successful DFU for a device not supporting CDC ACM class Timeout while for USB device attachment after successful DFU for a device not supporting CDC ACM class Aug 18, 2019
@borysjelenski borysjelenski changed the title Timeout while for USB device attachment after successful DFU for a device not supporting CDC ACM class Timeout while waiting for USB device attachment after successful DFU for a device not supporting CDC ACM class Aug 18, 2019
@bencefr
Copy link
Contributor

bencefr commented Aug 19, 2019

Hi @borysjelenski ,

The underlying nrf-device-lister module has been updated to only include PID 0xC00A device under nordicUsb trait, which in our case do indeed have a CDC ACM, besides the serialport trait can only be satisfied with it.

This has been done in an effort to minimise the faults we experience across the platforms and to aim for a usable experience in nRFConnect Desktop applications.

I agree that the rules could be more generic, should libusb and node-usb provide a robust and smooth functionality. This is unfortuantely not the case. I encourage you to suggest a solution or even contribute by pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants