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

usb_usb: 2.4G Dongle Chilkey ND75 #778

Closed
tmk opened this issue Oct 22, 2024 · 9 comments
Closed

usb_usb: 2.4G Dongle Chilkey ND75 #778

tmk opened this issue Oct 22, 2024 · 9 comments

Comments

@tmk
Copy link
Owner

tmk commented Oct 22, 2024

The keyboard dongle doesn't work with the converter.
It does not identify itself as a boot keyboard and not even a keyboard in its USB descriptor.

It seems interface 0/1 is boot keyboard/mouse compatible but it does not assert 'Boot Interface' in bInterfaceSubClass, nor keyboard/mouse in bInterfaceProtocol.

https://geekhack.org/index.php?topic=69169.msg3194615#msg3194615

https://gist.github.com/tmk/c3bfa6df5c19de2e01447489e80a600d

tmk added a commit to tmk/USB_Host_Shield_2.0 that referenced this issue Oct 23, 2024
@tmk
Copy link
Owner Author

tmk commented Oct 23, 2024

@tmk tmk closed this as completed Oct 23, 2024
@timdodge
Copy link

Hi Hasu, thanks again for looking into this issue.

I've compiled a hex from scratch but was having some issues with it, so did some digging and I think that the vendor and product IDs in hidboot.h are slightly wrong.

I've changed it like so, and it's now working for me:

diff --git a/hidboot.h b/hidboot.h
index 8e6310e..1df9682 100644
--- a/hidboot.h
+++ b/hidboot.h
@@ -452,7 +452,7 @@ uint8_t HIDBoot<BOOT_PROTOCOL>::Init(uint8_t parent, uint8_t port, bool lowspeed
                                 }
 
                                 // https://github.com/tmk/tmk_keyboard/issues/778
-                                if (device->idVendor == 0xfefe && device->idProduct == 0x0123) {
+                                if (device->idVendor == 0xc45 && device->idProduct == 0xfefe) {
                                     // HID / not boot / not keyboard
                                     ConfigDescParser<
                                             USB_CLASS_HID,


Regards,
Tim

@timdodge
Copy link

I've been using the 2.4G dongle & usb-usb converter most of the day today...
When it recognised, it works just as well as the usb cable connection; all my layers etc work fine.

However:

  • It isn't always recognised correctly: most of the time, if the keyboard is already in wireless-mode and paired, it will work as long as the dongle and converter are plugged in (while attached together) and then waiting a couple of seconds before touching a key.
  • If the keyboard isn't connected properly, either no key presses work or the first key press will get stuck on repeat.
  • If the keyboard goes to sleep, then the connection is lost and the dongle/converter needs to be unplugged and plugged back in.

I think the issue with key presses sometimes working and sometimes not is the reason I didn't think your first changes worked initially, in the forum thread.

Anyway, thank you again for your software and time!

tmk added a commit to tmk/USB_Host_Shield_2.0 that referenced this issue Oct 25, 2024
@tmk
Copy link
Owner Author

tmk commented Oct 25, 2024

Thanks for the patch. The code was updated in repo. I used wrong vid/pid for no reason...

Those issues don't happen when connecting it as usb wired keyboard with the converter, right?

With debug firmware you can see useful info in debug log, perhaps.
It is very difficult to debug issues on sleep/wake because logging doesn't work firmly during wakeup.

You can build debug firmware with make -f Makefile.debug or just download it here.
https://github.com/tmk/tmk_keyboard/blob/master/converter/usb_usb/binary/usb_usb_debug.hex

@timdodge
Copy link

Thanks - yes you are correct, there are no issues at all using the usb converter and wired connection to the ND75.

I'll try to capture some info on the sleep/wake wireless issue and post it here.

@timdodge
Copy link

Unfortunately there's no output at all when the keyboard falls asleep or wakes.

Initial connection:

Waiting for new device:......
Listening:

TMK:0d2e24/LUFA:d6a7df/UHS2:a1ee5c
u:[S]12
u:20
u:40
u:50
u:51
[W][W][W]BM Init
Addr:01
NC:01
vid:0C45
pid:FEFE
HID_PROTOCOL_KEYBOARD
bNumEP:02
Cnf:01
bIfaceNum:01
bNumIface:00

Interface:00
SET_PROTOCOL: 00
SET_IDLE: 00
RPIPE: 00
RWU: 00
BM configured
u:90
s:f

USB configured.
[i]
Loop start.
usb_state: 90
speed: full
input 1: 00 00 0D 00 00 00 00 00
00 00 0D 00 00 00 00 00 
input 1: 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00

And then no output at all on fall asleep or wake.

@tmk
Copy link
Owner Author

tmk commented Nov 2, 2024

Sorry for late reply.

Which OS are you using?

I guess that power saving code causes the problem.
Can you try attached hex file if you have time?

nopowerdown.zip

@timdodge
Copy link

timdodge commented Nov 2, 2024

No worries at all - I'm using the usb-usb converter wired with no issues at all.

I'm running on Linux: kernel 6.6.52-gentoo.
I'll reboot into Win11 later to see how it works there.

I tried the nopowerdown firmware, but it also output nothing when the keyboard fell asleep or woke up:

usb_state: 20
usb_state: 40
usb_state: 50
usb_state: 51
BM Init
Addr:01
NC:01
vid:0C45
pid:FEFE
HID_PROTOCOL_KEYBOARD
bNumEP:02
Cnf:01
bIfaceNum:01
bNumIface:00

Interface:00
SET_PROTOCOL: 00
SET_IDLE: 00
RPIPE: 00
RWU: 00
BM configured
host.Task: 2327
usb_state: 90
speed: full
input 1: 00 00 0A 00 00 00 00 00
00 00 0A 00 00 00 00 00 
ginput 1: 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 
input 1: 00 00 0A 00 00 00 00 00
00 00 0A 00 00 00 00 00 
ginput 1: 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 
input 1: 00 00 04 00 00 00 00 00
00 00 04 00 00 00 00 00 
ainput 1: 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00

then no output from the time the keyboard falls asleep

@tmk
Copy link
Owner Author

tmk commented Nov 4, 2024

Thanks for testing.
No clue on the debug log. I have no idea on debugging further now.

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

No branches or pull requests

2 participants