Skip to content
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

Add host example that prints out info of connected devices #1392

Merged
merged 2 commits into from
Mar 11, 2022

Conversation

tannewt
Copy link
Collaborator

@tannewt tannewt commented Mar 9, 2022

This example shows an issue with the host event queue filling up on iMX RT 1060 EVK without an RTOS.

@hathach
Copy link
Owner

hathach commented Mar 10, 2022

I run the example both with LOG=0 and LOG=1, it seems to work well. Could you post your Log here, also, do you have any other device (keyboard/mouse/drive) to test with. It is possible that the electrical stuff is not stable and cause lots of fake attach/remove event which overflow the stack.

PS: are you testing with low speed device, I may forget a thing or two with low speed.

@tannewt
Copy link
Collaborator Author

tannewt commented Mar 10, 2022

Yup, the device I'm seeing the failure with is low speed. Here is the device info output I get with LOG=3:

1 vid 045e pid 0040
Product: Microsoft 3-Button Mouse with IntelliEye(TM)
Manufacturer: Microsoft

I'll test with more devices I have here and follow up on this PR.

@tannewt
Copy link
Collaborator Author

tannewt commented Mar 10, 2022

A low speed (WASD Code) keyboard does seem to work:

1 vid 04d9 pid 0169
Product: 

Getting the product string does cause a stall though. That's why it is missing.

@tannewt
Copy link
Collaborator Author

tannewt commented Mar 10, 2022

I've added a speed print to the example.

I tested a second mouse of the same type and it shows the same issue. So, it is that particular mouse that has this issue.

I tested a bunch of other devices that do work:

Joystick from Thrustmaster:

1 vid 044f pid b10a
Full speed
Product: T.16000M
Manufacturer: Thrustmaster

EZUSB bootloader for Intellikeys:

1 vid 095e pid 0100
Full speed

Kensington trackball:

1 vid 047d pid 2048
Low speed
Product: Kensington Eagle Trackball
Manufacturer: Primax

BLE dongle:

1 vid 0a5c pid 21e8
Full speed
Serial: 5CF3708974A0
Product: BCM20702A0
Manufacturer: Broadcom Corp

Beagle 480:

1 vid 1679 pid 2001
Full speed
Serial: TP1126-722379
Product: Beagle USB 480 Protocol Analyzer
Manufacturer: Total Phase, Inc.

Card reader:

1 vid 0bda pid 0307
Full speed
Serial: 201006010301
Product: USB3.0 Card Reader
Manufacturer: Realtek

CP2104:

1 vid 10c4 pid ea60
Full speed
Serial: 01079392
Product: CP2104 USB to UART Bridge Controller
Manufacturer: Silicon Labs

USB stick:

1 vid 0930 pid 6545
Full speed
Serial: 0019E06B7102ED3110000081
Product: DataTraveler 2.0
Manufacturer: Kingston

CP2102:

1 vid 10c4 pid ea60
Full speed
Serial: 320c01251412ec11960c23c7bd930c07
Product: CP2102N USB to UART Bridge Controller
Manufacturer: Silicon Labs

RP2040 Feather

1 vid 2e8a pid 000a
Full speed
Serial: 4545373038053B38
Product: Pico
Manufacturer: Raspberry Pi

Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work, thank you for more testing

@hathach hathach merged commit ec6a8f0 into hathach:master Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants