-
Notifications
You must be signed in to change notification settings - Fork 203
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
Corsair RGB Strafe Keyboard and Corsair Scimitar Elite mouse not working #45
Comments
Please do: usbhid-dump --entity=descriptor to dump the HID descriptors for these (when plugged directly into the computer) and usbhid-dump --entity=stream and then try to type and move the mouse and paste the output somewhere please. The mouse problem sounds like the descriptor might have not been parsed correctly. The keyboard device specifies 500 mA of current, not sure how much it uses but perhaps try to disable the RGB lights temporarily and see if that changes anything? As far as screen reversal goes, I just swap the cables :D have to make that a software-configurable option... |
usbhid-dump : usbhid-dump --model=1b1c:1b20009:037:001:DESCRIPTOR 1706533974.582343 009:037:000:DESCRIPTOR 1706533974.587347 usbhid-dump --model=1b1c:1b8b009:036:001:DESCRIPTOR 1706534023.516541 009:036:000:DESCRIPTOR 1706534023.518819 |
|
The keyboard has a 2nd USB connector for power, this USB is plugged on a powered USB hub, so It should not be a problem ? switching off lights does not help. |
How are you plugging this? one in port A, one in port B on the box or both through a hub? |
The USB hub is only used to power the 2nd USB (power usb) of the keyboard. The main USB keyboard is directly plugged on USB A Mouse directly plugged to USB B micro usb are respectively plugged direcly on computers. |
Thanks, first thing I notice mouse is reporting 32 buttons and 16 was set as hard limit (because I thought nothing would ever top that). Will try taking a look after work... |
Ok, I discovered something. The Keyboard has a "BIOS" mode ... When you long press F1 + Windows lock button (5 seconds) it switch to "BIOS" mode as called on the web. Then it is correcty working, but the "insert" led blinks constently (a bit annoying). In this mode, the leds are stuck to hardware default mode, and I can't even disable/switch off leds at all. I never needed this "BIOS" mode until now, with or without Corsair drivers (they are not installed on corporate laptop). Here is the lsusb output in this BIOS mode :
Don't know what it means |
Just a wild guess, does this do anything for the mouse? As for the keyboard, it seems to refuse the BOOT mode unless manually switched with the keyboard shortcut. Full hid report protocol for the keyboard is on the to-do list, might get done alongside descriptor proxying at some point... |
Same as latest official FW. when I move the mouse, nothing appens unless I also click on a (right or left) button at the same time. And the only thing it does is it moves from left to right no matter the way I move it. |
Hmmm, it's like the mouse refuses to switch modes. This makes any difference? |
Same behaviour... whereas it works OK with Logitech G500s. |
I have just one idea left for debugging in the blind |
No change, same behaviour. |
That mouse is cursed :) There is something odd happening with the initial mode setting on Corsair devices apparently. I'll see if there is anyone around with a Corsair mouse to check what's going on there. If you'll be open to doing some more debugging, that would be helpful. |
I'm willing to do any debugging you need, just tell me what you want me to do. |
Debug pin are soldered and ready to use, if you guide me with the needed hardware to plug it (that I might already have (USBasp ?)) |
Write this debug firmware which will create additional serial port for output, then open your serial terminal of choice (screen -L /dev/ttyACM0 or similar, depending on the device created, works), plug in the mouse, wait a few seconds, click buttons and move it a bit... upload the output here as a zipfile. |
With 2 mice connected, G500s on computer, and Corsair on deskhop, as soon as I plug the Corsair to deskhop, the left click is stuck clicked on the G500s, I can't left unclick anymore, I have to unplug the micro USB from board B to get back left click |
Here are the debug logs from the keyboard USB on board A : I was in BIOS mode, I ran the screen command, unplugged the keyboard, switched it to normal mode (with other board help) Plugged it in to USB A then once no more logs on screen, switched back to BIOS mode to get back working keyboard
|
Adding log from mouse with movements and clicks |
Ok, I still don't know why such behavior but I can tell you what's going on. The mouse descriptor you sent earlier from the computer is:
... etc (it's a bit longer, it's even a keyboard) What the box gets is:
which translates to:
but the reports sent are based on the descriptor you sent earlier from the PC 01 00 00 00 00 FF FF 00 00 00 I think what happens here is this - mouse sends some sort of simplified boot protocol report, then gets switched to hid report but descriptor is not re-read and data gets misinterpreted. |
Okay... any ideas ? what about keyboard output logs ? :) |
Let's try to get one working first :) It might be reasonable to add a check - if provided report length doesn't match what the descriptor specifies it should be, re-read the descriptor. Now the tricky part is, how to cleanly do this with tinyusb :) |
Can you try yet another one that probably won't work with this stubborn rodent? :) Important thing - make sure to plug mouse in B. |
It works ! |
Awesome! I think I have an idea what's happening but I'll need to test-drive this change for a few days before committing it. :) |
Now the keyboard :p |
I'm having an issue I did not have until now, at least I did not catch it earlier... On my Ubuntu Cinnamon, running Nemo as File Manager, after some time/hours, org.Nemo process hangs... and I can't open it anymore, I must reboot the OS. Reading from internet, it is usually to be related to some USB mount issue... So I unplugged Deskhop and I will check in some hours how Nemo is working or not... If it works fine, I will put back original 0.42 FW and test it with standard Logitech G500s... I'll keep you updated, it may be totally unrelated to Deskhop. |
I assume the usb mount issue for the Nemo file manager is mostly related to storage. If you updated the firmware, rp2040 bootloader will exit abruptly and disappear from the system which might in theory get the file manager to get stuck on trying to do something with it. You can try attaching to it with strace -p to see what it's doing when it hangs, it can point in the right direction. |
I'm sorry but I'm not sure to follow you... I should run strace -p on Nemo's pid ? Edit : strange thing is killing nemo pid, and even logging off/on user session does not fix it, must reboot. I replugged everything and running strace on nemo's pid. |
If you were updating the pico board firmware by pressing the button and connecting it, that made the rp2040 bootloader create a usb storage device, you drag .uf2 to it and then the device abruptly disappears from the system. Maybe something like that triggered it... check by running "mount" if you still have any devices mounted. |
Well I don't think it is this then. I did not play with FW since yesterday, and I already had to reboot the OS... The only thing I did is enabling anti screensaver mode (I love it, don't ask why :p) Currently running strace, but I don't know when it happens, if it happens while process is running, or when I try to re-open File manager after a period of time I closed it. I have to find reproducible steps to trigger it. Currently I'm swimming in the sea... Edit : BTW I'm running the test B default FW compatible with my Corsair mouse. |
My hunch is - not related, but who knows. I've been daily-driving it for a while now and found it to be pretty reliable, but then again my requirements are basic and I can't tell the difference between 6kro and nkro keyboards, high-dpi mouse etc. :-) |
Well, plugged since yesterday, no issue yet... I can't reproduce it... Maybe it was actually related to FW update / storage boot... wait & see... thanks ! If you need anything for my keyboard issue, I'm available :D |
That's a more complicated one - it refuses to negotiate working in boot mode and full descriptor parsing, nkro support etc. need to be added. Should happen but will likely take some time... |
There is src/user_config.h where you can define #define HOTKEY_TOGGLE HID_KEY_CAPS_LOCK and you can find the keys here: https://github.com/hathach/tinyusb/blob/master/src/class/hid/hid.h The problem is, many keyboards are smaller than TKL nowadays and don't have that key anymore - choosing a good hotkey is a nightmare. I've thought perhaps using left shift+caps lock if you actually need caps lock. Btw, nice graphic! :) |
It would do the job :) |
Hello :) Is there any progress with keyboard compatibility ? Thanks :) |
You have NKRO if I remember correctly, some of the problematic keyboards got fixed in this release but NKRO is still pending :) Sorry about that. |
I don't know what is NKRO but I thrust you on that :D |
NKRO is n-key rollover, basically keyboards before that could only transmit up to 6 keys pressed at once, and apparently that wasn't enough, so nkro sends a bit array of all keys so you can press as many as you want. I never understood how 6 keys at once would be a limitation, maybe some stenography software or gaming shortcuts. I need to rewrite the hid parser to something more universal in order to support keyboard descriptors as well, and not break anything :) |
Ah OK Looking right now at keyboard specs from corsair website : Key Rollover : Full Key (NKRO) with 100% Anti-Ghosting |
Hello, @hrvach I tried 0.60 release, my mouse went crazy with it. whereas it works with 0.52 :) I couln't try NKRO support. As I lose mouse support, it seems the default CAPS shortcut to switch between computers does not work anymore on 0.60 |
Thanks for trying it out, I must have made a mistake of some sort. Apologies! |
as a reminder my mouse is a Corsair Scimitar Elite you had to work on and fix it... as we discussed above in this issue already. |
cc: @OrpheeGT apologies to bug you, I'd appreciate some help with testing a potential fix if you have a moment? |
@hrvach Hi ! Keyboard does not seems to react in NKRO mode. still needs to be in BIOS mode for it to work. |
Managed to get my keyboard working in NKRO, but I'm probably still missing something (obvious). Really appreciate your help with testing, back to the drawing board... :) |
You did fix the mouse issue here : |
What I'm trying to do is remove the need for that fix in the first place (and failing obviously). :-) |
Here is in NKRO mode (below after there is BIOS mode) :
Here is in BIOS mode :
|
Hello,
I successfuly built the board today
I plugged my keyboard and mouse it did not work.
Keyboard LED was blinking (no computer detected)
Mouse was only moving to the right of the screen only when I was clicking on left or right button
I tried the test_fw mentionned in wiki but mouse did not work at all with this one, no move at all.
I plugged another mouse, Logitech G500s and a spare Mac keyboard, and they both instantly worked fine.
So I guess FW if well flashed and solders are OK
Please find my lsusb result from my corsair keyboard/mouse :
Edit : and my screens are reversed, my left screen is detected right side, did not find how to swap them yet :D
The text was updated successfully, but these errors were encountered: