Skip to content

USB HID device only detected after replugging #14627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Qbicz opened this issue Mar 18, 2019 · 3 comments
Closed

USB HID device only detected after replugging #14627

Qbicz opened this issue Mar 18, 2019 · 3 comments
Assignees
Labels
area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@Qbicz
Copy link
Collaborator

Qbicz commented Mar 18, 2019

Describe the bug
Device uses USB HID class. It used to register to host and send HID data over USB without issues.
However, with Zephyr revision 19de7ec (Nordic NCS 812f5d5) device is not recognized after boot. You need to unplug and replug it to make USB HID work.

Sequence of USB callbacks that I receive:

- Device boot (cable connected from start)

USB_DC_CONNECTED,
USB_DC_SUSPEND,
USB_DC_RESUME,
USB_DC_RESET,
USB_DC_RESET,
USB_DC_RESET,
USB_DC_RESET,
USB_DC_CONFIGURED.

- Device is started, but not recognized by host.
- Unplug

USB_DC_SUSPEND,
USB_DC_DISCONNECTED,

- Replug
USB_DC_CONNECTED,
USB_DC_SUSPEND,
USB_DC_RESUME,
USB_DC_RESET,
USB_DC_RESET,
USB_DC_RESET,
USB_DC_RESET,
USB_DC_CONFIGURED.

- Now the device is found by USB host and reports can be sent.

Impact
Showstopper. Device should be operational right after boot.

@Qbicz Qbicz added bug The issue is a bug, or the PR is fixing a bug area: USB Universal Serial Bus labels Mar 18, 2019
@Qbicz
Copy link
Collaborator Author

Qbicz commented Mar 18, 2019

FYI @pawelzadrozniak @masz-nordic

@carlescufi carlescufi added the priority: medium Medium impact/importance bug label Mar 19, 2019
@Qbicz
Copy link
Collaborator Author

Qbicz commented Mar 19, 2019

I checked and the problem was introduced between cf85618 (good, February 22) and d9876be (bad, merged on March 5). I cannot bisect further because I would have to make project compile for every revision in between (which would take quite some time).

In other words, it first occured on NCS upmerge 5eea43c.

@Qbicz
Copy link
Collaborator Author

Qbicz commented Mar 22, 2019

Bug was in application - it was not handling multiple RESET / RESUME callbacks. Fixed in nrfconnect/sdk-nrf#566

@Qbicz Qbicz closed this as completed Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants