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

Keyberon does not work with windows #112

Closed
tkonolige opened this issue Apr 3, 2023 · 3 comments
Closed

Keyberon does not work with windows #112

tkonolige opened this issue Apr 3, 2023 · 3 comments

Comments

@tkonolige
Copy link

I can't get keyberon to work with Windows on an nrf52840. I've narrowed it down to the USB device not configuring correctly. I'm not sure why though. I've created an example here: https://github.com/tkonolige/keyberon_failed_configure that creates a keyberon usb device and a serial usb device. The keyberon device is forever in the Default usb device state, while serial device reaches the Configured state. On MacOS, both the keyberon and serial devices reach the Configured state. Any help or pointers for debugging would be appreciated.

@TeXitoi
Copy link
Owner

TeXitoi commented Apr 3, 2023

The pointed repository doesn't use keyberon.

Did you tried an already validated firmware? There is some in https://github.com/TeXitoi/keyberon/blob/master/KEYBOARDS.md

The problem seems more related to nRF than keyberon. I have users that use their keyboard on Windows. Also, I don't have a nRF52840, so maybe it would be easier to ask some help on the nRF crates? And why you didn't use the hal version, that is recommended?

Another good place for help in embedded rust is the matrix channels: https://github.com/rust-embedded/awesome-embedded-rust#community-chat-rooms and especially https://matrix.to/#/#nrf-rs:matrix.org for your case.

Hope you'll find a solution, and please update the issue with the solution when you find it!

Good luck and enjoy embedded rust!

@tkonolige
Copy link
Author

The issue is that nrf-usbd will split the get device descriptor response into multiple packets unless you set a large enough maximum packet size. I've posted an issue here: nrf-rs/nrf-usbd#14. A workaround is to manually create a usb device with a large packet size instead of using keyberon::new_device.

@TeXitoi
Copy link
Owner

TeXitoi commented May 31, 2023

Thanks for explaining the solution!

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