-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Bluetooth security failing on windows machine #805
Comments
Have you tried switching the bluetooth profile for your work machine? |
I've tried these two scenarios Personal + work PCs
Only work PC
|
Maybe related: I've noticed an issue when using BT_CLR you have to remove+repair the paired device from the list and restart the pc before it will register input. It may be worth doing a full settings clear and trying again without touching BT_CLR |
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." |
I'm having the same problem with my nrf52840 based custom board, it will connect, allow me to type a couple inputs, and then disconnects, on both my mac and my iphone. |
I seem to have a different problem than yours. Windows displays the device as connected briefly but it never detects any input. I just rebuilt and flashed firmware with latest ZMK hoping that maybe the zephyr 2.5 thing fixed the issue but it didn't. Is there something else I can do to further debug this problem? It's kind of a bummer that I have this wireless keyboard that I can't use wirelessly... I was considering building another one but I'm having doubts since it's likely going to have the same problem. Edit: added reply to @Kikokeyco |
I just tested my board with BlueMicro and that firmware does connect to the work laptop successfully. |
I got the same problem.On Windows it can’t detect any input.But on my Ubuntu,and my IOS,it works.Also,I tested my keyboard with BlueMicro on my Windows,it works, too . |
Just to add to the list here, I have experienced the same thing. I have tested two different keyboards on 6 different devices. Consistent behavior between Keyboard A and Keyboard B (both nice!nanos). All machines are Windows or Android OS:
Similar to comments above, I have tried clearing profiles, flashing the reset settings uf2, clearing and re-pairing. I even tried connecting after a full reformat and reinstallation of windows on the personal laptop 1. Consistent behavior. |
@sadekbaroudi Are you sure your BT adapters support BLE? It needs to support BT version 4.2 for the security ZMK uses, if I remember correctly. |
@caksoylar I went and checked bluetooth versions on all my laptops / desktop. Interestingly, the ones that work are Bluetooth 5.0, and the ones that don't are Bluetooth 5.2 |
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. |
Thanks for confirming that! |
I also have had alot of trouble with a BT60. I have done every possible combination of clearing profiles, using reset firmware, etc, and have also done usb logging, tried different zmk versions, etc. For me it is also several months and I am wondering if it isn't the AX200, perhaps there was a problematic driver update. I installed the latest driver from Intel and that didn't help. |
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. |
It seems that Pete's branch [zephyr/3.1](git clone --branch zephyr/3.1-upgrade https://github.com/petejohanson/zmk.git) might be a good fix. I have a corne (simple, no oled or rgb) with nice_nanos and so far I'm able to clear the profile and remove the device from windows and re-pair the keyboard. One thing to note is that once you remove the device from windows you need to restart the host, then you can re-pair the keyboard. I'm assuming zephyr 3.1[3.2 based on app/west.yml] seems to improve bluetooth connectivity with hosts. |
For reference, #1499 is the associated PR for the Zephyr upgrade. |
Awesome, looking forward to the merge. If I run into any issues with the PR branch, I report them accordingly. |
Oooh, yay! Looking forward to trying that out as well! |
I also really hope this gets resolved. My new Corne with niceNano are not staying reliably connected to my Win10 machine. I increased the bluetooth power, and removed all profiles and started over to no avail. IT will work temporarily then stop until I remove and re-pair. My laptop has a Intel® Wi-Fi 6E AX210 No vPro®... My laptop reports LMP 12.14198 |
If you don't have too much features with your corne keyboard, you can use the following repo and branch: I've been running this for over a month and I don't experience any connectivity issues. |
I hate to ask this kind of question here @greyhatmiddleman but I am out of practice. |
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. |
@vanessa-luna @caksoylar beat me to answer your questions. He is correct with his response. |
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. |
The PR has worked for me in Win10 with LMP 12. Have you also ensured you remove ALL BT profiles on the keyboard before pairing after the firmware update? It will be discouraging if this doesn't fix it for everyone. When you say it doesn't work, does it fail in the same way others are describing above? |
@vanessa-luna Yeah, I tried it for several times. and the Split battery reporting branch works at the first time, it fails to connect after restart. PR #1499 fails at the first time. |
When I reflash my controllers, I normally would initially flash with a 'settings_reset' uf2 firmware to clear anything in the controllers before flashing any new firmware. Check Troubleshooting, although this is in reference to the halves not pairing, it ensures anything stuck in Flash is cleared. Once you've created a 'settings_reset' uf2 firmware you can keep this for future resets, no need to constantly recompile a settings reset uf2. |
I'm seemingly having the same connection issues, using Zephyr 3.2. On Windows 11 : device is detected, but most of the time I get the following error message : "try connecting your device again". When I don't get this error, connection is successful, but I can only type for a few seconds, then status switches randomly between "connected" and "paired". On Manjaro : Connection fails immediately, no specific message. On Android : sometimes it works, but most of the time I get an error about incorrect PIN or security key. I tried to reset the firmware and to clear bluetooth profiles, no cookie so far. |
It looks like PR #1499 was merged, but unfortunately the Windows BLE 5.1+ issue still persists. My nice!nano board does not connect on Windows 10 w/ BLE 5.1. I get the error "Couldn't connect. Try connecting again." It works when the connected via USB. |
Can confirm this solution worked for me as well! (And I couldnt give a shit about the security of my windows shitbox. its a fine solution. Though I'm curious if this is something that needs to be patched on the keyboard side? or a bug in intel driver that can eventually be patched in a future update) |
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)
|
I had the same issue (corne split, 2x nice nanos). I recently updated my Windows drivers and returning to an older bluetooth version solved the problem |
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 |
Same here. My keyboard (running ZMK from July 2023) would not pair with my new Windows 11 laptop. I Rebuilt with 3.5 just now and it paired to the same win 11 laptop w/o any problems. I did not have to reset keyboard settings, roll back Bluetooth drivers or anything else besides update to ZMK 3.5 |
Zephyr 3.5 Corne keyboard and NRF52840. Same here. Using win11 and a BT 5.3 dongle. If I try to connect with my win10 laptop's intel card it works properly. I've tried #805 (comment) too and isn't working for me. |
Zephyr 3.5 Corne, NRF52840, Win 11 23H2, Generic bluetooth adapter 5.3 (tried 2 different ones) I am able to pair my keyboard fine and use it, but whenever I reboot my PC, the keyboard shows up as "not connected" and doesn't want to connect at all. "Forget this device.", clearing BT profile and re-pairing is the only thing that works. After I enabled debug and rebooted, the keyboard periodically sent the same error as in this issue. The keyboard reconnects just fine on MB pro 14.1.1 and another win 10 22H2 with same generic ble adapter 5.3. |
How did you rebuild with 3.5? Did you change something in the build.yml file? As far as I can tell, 3.5 is on the main branch now, and so should be the default choice when building, but I'm still facing this issue... |
Since it's a long thread and this hasn't been mentioned in a while; might be worth trying |
It worked! Thank you!! |
I tried this on my setup and it's not working. I believe I'm at the latest ZMK build (unsure how to check that against my config). I'm not using an intel driver for bluetooth, either. So I'm feeling a little stuck. Works on my android phone, and my wife's macbook, but not her work Intel Windows PC ("Try connecting your device again"), nor my own AMD W10 PC, or my work Intel W10 PC. Any additional thoughts? |
Working for me too with Zephyr 3.5.0 and Corne keyboard with NRF52840 and USB 5.3 dongle on Win11. |
Solution I had was that one of the dongles I was using was below BT4.2, so it was never going to connect. The other is that my small macropad wasn't set up to clear profiles and I didn't understand that it didn't clear profiles when you flash the firmware. So I added a setup to be able to switch and clear profiles on the board itself. |
So cool. |
I have one PC that I dual-boot Windows and Linux on, and could not have 2 different profiles working for 2 different OS, but this fixed it. Awesome job! |
First for me too. But now it stopped working. I went back for other things but nothing works. I read the dual boot part of the wiki https://zmk.dev/docs/troubleshooting/connection-issues#issues-with-dual-boot-setups but I don't understand it. Is it even not possible to pair on two different profiles with the same nice nano? |
Try to solve the problem of connection with several Windows devices by following the recommendation given in zmkfirmware/zmk#805 (comment).
Try to remedy the connection problem with several Windows machines by following the recommendation given in zmkfirmware/zmk#805 (comment)
Try to remedy the connection problem with several Windows machines by following the recommendation given in zmkfirmware/zmk#805 (comment)
Dual-booting is an unrelated issue; see #2026 (macOS users can try #549) But the short answer is no, and the long answer is not unless you are able to follow the instructions in the Arch wiki (linked from the ZMK docs) or similar (linked in this comment or found elsewhere on the internet) to use the same pairing key across both operating systems. And you should use the same profile for that. You could set up a dongle to avoid taking these extra steps, but that too is outside the scope of this issue. |
Ok. Then I'm going to sync the keys. I thought I had this running like that a few years ago. |
So it's not even that hard to do. Just synced my dual boot devices (Keyboard and Mouse) with the script linked in the arch wiki: https://github.com/nbanks/bluetooth-dualboot The ZMK NiceNano was easy, as I could just copy paste the keys from the script output. For my Logitech Mouse I had do copy more things and most importantly rename the folder as the MAC address on Windows was another one than on Linux. |
This worked form me! Windows 11, modified corne, nice!nano copeis, tplink bluetooth dongle. |
I'm still having this issue with latest zmk. If I pair to windows, then android on profile 2, I can no longer connect back to windows without flashing a settings reset and reflash firmware. I have tried adding all of the following to the conf: CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y nice!nanos v1 |
Do you have a key to reset a BT profile? |
I have BT_CLR key, which I try on both halves aswell as switching back and forth with the BT_SEL keys. I could add a BT_DISC key? Since I've disabled "Allow Winedoze to put the adaptor to sleep" I can get it to respond again after hitting BT_SEL on the same profile again. It seems to work until the nanos have sat for a while, (I don't know if they have a sleep state?) |
Hm, I have been fine with BT_CLR, as I was having a similar issue. Afraid I'm not much help beyond that. |
After multiple firmware reflashes and settings resets I will note that the issue is currently resolved in my case when using the aforementioned config. Perhaps it wasn't fully flashing. |
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)
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?
The text was updated successfully, but these errors were encountered: