Teensy 4.1 USBHOST_T36 problem with logitech keyboard using unifying dongle

ptitneo

Member
Hello,

my project uses usb host to read keyboard input on a teensy 4.1. Using the examples from the library I was able to get it to work with a random noname keyboard using a wireless dongle. Now switching to a Logitech (POP Keys keyboard) with unifying dongle, keypresses aren't registering. I can tell something isn't initializing because the caps lock led doesnt light up when I press that key (unlike on PC with the same dongle).

Using the code from this example: https://github.com/PaulStoffregen/U.../examples/keyboard_viewer/keyboard_viewer.ino (but removing the TFT-related stuff)

It shows up as 3 devices:

Code:
*** Device HID1 46d:c548 - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** Device HID2 46d:c548 - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** HID Device Keyboard 46d:c548 - connected ***
  manufacturer: Logitech
  product: USB Receiver

Where my noname keyboard just shows
Code:
*** Device HID1 6901:2701 - connected ***
*** HID Device Keyboard 6901:2701 - connected ***

Now the fun detail: if I first connect the noname keyboard and press a key, then swap the dongle for the Logitech one, it works. The keypresses are received, the caps lock led responds etc.
Any clue as to what's going on ?

Thanks!

PS: this is my first post but I've been lurking here for a while, usually finding the insights I needed. Teensy is an incredibly fun and powerful platform, huge thanks to Paul and the community here !
 
Last edited:
Which Logitech Keyboard is this? Model # or better yet link to Amazon or the like.
What version of Arduino and Teensyduino are you running?
Probably pretty recent?

You might check to see if your sources are up to date with the current ones up on Paul's github... There was a recent PR pulled in.
In the process of converting Keyboards to work in HID mode.

But wondering about again which Logitech, as there is a Logitech G wireless Mouse that uses a combined wireless receiver that had some interesting issues, that it created both a mouse and
keyboard object, even though there was only a Mouse.
 
Ok so I was using this platformio.ini:

Code:
[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
lib_deps = paulstoffregen/USBHost_t36@^0.2.0

Teensy loader is 1.55.

Switching only the lib_depts to github master gave me a couple of compilation error, switching the platform to upstream as well seemed to fix everything:

Code:
[env:teensy41]
platform = https://github.com/platformio/platform-teensy.git
board = teensy41
framework = arduino
lib_deps = https://github.com/PaulStoffregen/USBHost_t36.git


Now it Just Works ! (well, with QWERTY mapping instead of AZERTY here, but that's a smaller problem that I need to look into - not sure if that's supported or if I just need to do my own raw keypress mapping).

Cheers,
 
Back
Top