zmk: Bluetooth security failing on windows machine
I’ve been using a split/nice!nano handwired built for a few months already with no issues on my personal PC. On the other hand, The keyboard pairs correctly with the my work laptop but doesn’t send any keypresses. Both of these are windows 10 machines. I finally took the initiative to enable debugging and saw this happen constantly (a couple of times per second)
[00:25:58.514,068] <err> zmk: Security failed: <redacted> (public) level 1 err 2
[00:25:58.639,770] <dbg> zmk.split_central_disconnected: Disconnected: <redacted> (public) (reason 19)
[00:25:58.639,831] <dbg> zmk.disconnected: Disconnected from <redacted> (public) (reason 0x13)
[00:25:58.639,862] <dbg> zmk.update_advertising: advertising from 2 to 2
[00:25:58.678,680] <dbg> zmk.split_central_connected: Connected: <redacted> (public)
[00:25:58.678,680] <dbg> zmk.split_central_process_connection: Current security for connection: 1
[00:25:58.679,901] <dbg> zmk.split_central_process_connection: New connection params: Interval: 48, Latency: 0, PHY: 1
[00:25:58.679,992] <dbg> zmk.connected: Connected thread: 0x20002e40
[00:25:58.679,992] <dbg> zmk.connected: Connected <redacted> (public)
[00:25:58.680,023] <dbg> zmk.update_advertising: advertising from 0 to 2
I may have the beginning/end of the log wrong but this is still the part that repeats. Does anybody know what the problem could be? Is there anything else I can I do to find more data about the problem?
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 50 (12 by maintainers)
For anyone who started getting this in the last couple of months, check the version of your Bluetooth driver (Settings > Apps > Installed Apps > search for “bluetooth”). If you have Intel Wireless Bluetooth driver version 22.250.0, try uninstalling it and installing version 22.240.0 instead.
You can do that following ZMK development docs, or change which ZMK fork/branch your config repo points to to build using Github actions.
This branch is related to PR #1499, features like underglow/displays might have issues potentially, but I believe it is pretty much ready for final testing so you shouldn’t expect many issues.
Looks like the latest release that includes Zephyr 3.5 fixes this issue. I’ve rebuilt my firmware using the docker container at the main tag, and I am having no issues connecting when my Intel Bluetooth driver is updated to 22.250.0.2
This is not a new problem BTW. I’ve dealt with it for around 5 months. I’ve done all the permutations of resets (BT_CLR and flashing), restarts and even tried a separate bluetooth dongle. No luck.
The other thing I’ve noticed though is some of the time the board will just not pair at all after clearing. I get the message “Couldn’t connect. Try connecting again.”
Solved by following #1487. I’m using a custom split w/Nice!nanos on Windows 11 with the newest Intel driver (22.250.0.2)
That would be good but I think it would be better if we directly refer to an existing resource rather than maintaining this ourselves. Arch wiki BT page (section 2.1) is a good and well-maintained candidate, although it doesn’t include information on the Windows-macOS pairing, naturally.
Dual booting will always have issues since hardware keys are shared across different OS: #549. This also sounds consistent with the error message you are getting.
It seems that both master and PR #1499 don’t work with BT 5.2( Window 10 with LMP 11). My Macbook Pro works fine.
@vanessa-luna @caksoylar beat me to answer your questions. He is correct with his response.
If you don’t have too much features with your corne keyboard, you can use the following repo and branch: https://github.com/petejohanson/zmk/tree/zephyr/3.1-upgrade
I’ve been running this for over a month and I don’t experience any connectivity issues.
I think this might be a zmk firmware issue with BT5.2 or greater. I have another nicenano with kmk (ble enabled) and I can connect, remove, clear and re-pair for the same host. Where as with ZMK, I’m unable to repair entirely.
As for other systems with BT5.0, zmk works accordingly.
I see, following this my adapter (AX200-based PCIe) reports LMP 11.9210 which indicates 5.2 also; it worked on both Windows 10 and 11. Maybe it is some other factor.