Teensy 4.1 USBHost does not recognize Mouse and Keyboard

xiexie

New member
Hey!

I am trying to do some stuff with Teensy 4.1 and mouse input, but it does not seem to work. Currently, I am using the MouseKeyboardForwarder script from the examples, and it writes correctly to the microcontroller.

When I plug in a mouse (I tried two already) or a keyboard, the device's light doesn't even turn on. If I use an Xbox controller (Gamesir G7 Pro to be specific) and press the Xbox button, the controller turns gets lightning. My setup is the following:

https://www.digikey.com/en/products/detail/cvilux-usa/DH-20M50057/13177527 - MicroUSB data transfer cable
https://www.digikey.com/en/products/detail/sparkfun-electronics/CAB-28389/26523939 - USBHost cable (only one of the two ground pins is connected to the microboard, in total 4 pins)

Does anyone know what can cause this?
 
Which mice?

Try running the HIDDeviceInfo example sketch and paste the results into a post (in code tags)
 
This is the serial output when I plug-in the controller:

Code:
USB HID Device Info Program

This Sketch shows information about plugged in HID devices

*** You can control the output by simple character input to Serial ***
R - Turns on or off showing the raw data
C - Toggles showing changed data only on or off
<anything else> - toggles showing the Hid formatted breakdown of the data


USBDeviceInfo claim this=2000E22C

****************************************
** Device Level **
  vid=3537
  pid=100A
  bDeviceClass = 0
  bDeviceSubClass = 0
  bDeviceProtocol = 0
09 04 00 00 02 FF 5D 01 00 10 21 10 01 01 24 82 14 03 00 03 13 02 00 03 00 07 05 82 03 20 00 01
07 05 02 03 20 00 08 09 04 01 00 02 03 00 00 00 09 21 10 01 00 01 22 D6 00 07 05 84 03 40 00 01
07 05 04 03 40 00 05

USBDeviceInfo claim this=2000E22C

....

*** HID Device hdc1 3537: 1022 - connected ***
  product: GameSir-G7 Pro
*** HID Device hdc2 3537: 1022 - connected ***
  product: GameSir-G7 Pro
*** HID Device hdc3 3537: 1022 - connected ***
  product: GameSir-G7 Pro
*** HID Device hdc4 3537: 1022 - connected ***
  product: GameSir-G7 Pro
*** HID Device hdc5 3537: 1022 - connected ***
  product: GameSir-G7 Pro

When I put in the mice nothing is getting output.

The mice I am using are:
- Razer Deathadder V2
- Gigabyte Aorus M2

I also tried to connect a 4-Port-USB Hub from UGREEN (Model CM219) also with no success.
 
The USBDeviceInfo - Does not show anything about the Interfaces and HID stuff?
Not much to go on?

Also the information for a GameSir-G7 Pro, sounds like maybe a Gamer controller?
Yes, this is the controller that I am using. But nothing on the Mice, Keyboard, or the USB Hub - it only shows Controller data. I have already reinstalled multiple versions and downgraded from 1.60.0 to 1.59.0, but it still isn't working. A few weeks back, it worked just fine, then I tried to play a little bit around with a controller and installed this:
but I already replaced these overwritten files and reinstalled the Arduino IDE. Could this be the cause?
 
No idea about your ArduinoXInput_Teensy... But that is for USB to PC so should not matter.

Note: Would not expect that controller to do anything with a Mouse related sketch.

You might try the Joystick example sketch, although would not be surprised if it did not work.

Also you might turn on Debug output: Edit USBHost_t36.h header file
Uncomment the line (about line 63)
Code:
//#define USBHOST_PRINT_DEBUG

The VID/PID - does not currently match any of the ones that we have in our Joystick controller stuff, which knows
which type of joystick it is (XBOXONE, XBOX360, SWITCH, PS3, PS4, SpaceNav)...

But worth a try.
 
I'm confused, if you're trying to work out why the Teensy won't recognize your mouse why do you have anything else plugged in? Just remove it all and run the sketch with only the mouse connected.
 
Back
Top