-
Notifications
You must be signed in to change notification settings - Fork 106
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
Error: Handshake failed (USB-HID Gaming Keyboard) #102
Comments
I'm not sure. It detects the device but fails to send any data to it. The only thing I can think that might cause this is something else is already using interacting with the device so the write fails. |
Is there any way to enable debug output / increase output verbosity to maybe see at which step it fails? |
Do i need any external libraries? |
I'm assuming it's failing on the first write (I assume this because if one write is successful, all of them should be successful, all that matters for read/write is that you use the correct "report length", see the HID spec). GK6X/GK6X/KeyboardDeviceManager.cs Line 166 in ae10b13
The actual write occurs on a separate thread. The thread that waits for the write has a timeout value, at which point the write is aborted. The actual write call is made in HIDSharp here: There isn't any more verbose logging that you could add to GK6X. You might be able to check Your best bet is probably sniffing what's going on with wireshark's USB sniffer. Making sure there's the expected request, and a response from the device (I think these are always 65 bytes long). |
Well, sadly i don't have a whole lot of experience with c# and especially wireshark usb, but at least i can confirm that the program throws the error at the given line
|
Alright, here's a capture at the moment of connecting the device in wireshark, device should be at 1.10.0, which is at the end of the capture. maybe it might be of use? |
It looks like the keyboard responds to the first request, but there's no data in the response. The handshake is expecting a report response with a matching opcode. Packet No. 1064 (request):
Packet No. 1065 (response):
It's hard to tell why it would respond with an empty report. I'd probably suggest probing the device with other reports to see how it responds (i.e. the 0x0101 report), and if it always responds with empty reports. I'd also suggest seeing how it behaves under a different OS such as Windows. |
Well, the only thing i can say is that it does work in windows with the official software... (I don't have any experience with the USB protocol, i only figured out how to wireshark usb) maybe it has to do with the firmware on the keyboard? is there any way to update it? it seems like the official software doesn't come with any way to update it, it only reports the fw version (1.19, driver version 6.0.0.39) |
Does this project work on Windows for you? It could potentially be a bug in HIDSharp on Linux, or hidraw, or just something that I'm doing wrong with interacting with HID which is non-standard. I'm not super familiar with the protocol in general, I just implemented things based on what I saw. You shouldn't need to update the firmware if it works on Windows as that means the keyboard is operating correctly. There generally aren't firmware files available to download for GK6X boards either. |
Seems like it does work on windows! will look into the libraries you mentioned... The CLI on windows reports |
I guess that would mean it's either an issue with HIDSharp, hidraw, or a non-standard interaction. I'll make a wireshark log on windows at some point and compare to see if I see anything that stands out. If the outgoing report is correct/standard then I'd assume it could only be an issue in hidraw, or a lower level Linux API. Though I wouldn't have a clue as to exactly what in such case. |
I will try building the latest version of hidraw, maybe it already fixed some stuff. EDIT: Nope, didn't work... |
I've also been having this exact same issue on my arch install while it works fine on windows, did you ever figure it out? @stcraft |
Well, the script + GUI works on windows, but I just don't know how I can fix it on Linux... I think it is indeed some kind of bug in the libraries. |
I just tried it on a USB 2.0 port and that seemed to fix the issue for me, have you tried that? |
On Pop!OS 20.10, I was having similar problem, with keyboard attached through a USB hub, on a black USB1 port. Plugged directly into a USB2 (blue) plug I got this:
I plugged the hub into the same port, and the keyboard through that, and it also worked fine. Thanks for the pointer to check the USB port. |
hi guys, did you guys find any solution to this problem? I m using this is arch linux, and I am getting the same error as above, Can anyone help me solve this problem |
@abilash2574 The solution for me and @Invades was to use a USB2 port. |
I have the same issue in both Windows and Manjaro Linux. My model is GK64 and worked fine with the official driver on Windows. USB 3 port gives this:
While USB 2 port just gives this:
|
I got the similar error on arch linux: Expand
Surprisingly enough reconnecting cable to the same port did solve the problem for me this time:
I believe the reason could be faulty cable, so I would suggest you to test your keyboard with a different cable(s) just in case. It could be not related to the ports themself, just the movements of the cable. |
Hello!
I've recently finished my custom build using a GK64XS board.
When i try to run this software on linux (arch) it will throw this error:
lsusb:
Bus 001 Device 004: ID 1ea7:0907 SHARKOON Technologies GmbH Keyboard
So far tried:
sudo mono GK6X.exe
)I feel like i'm missing something... Any tips?
Thanks!
The text was updated successfully, but these errors were encountered: