-
Notifications
You must be signed in to change notification settings - Fork 66
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
Dongle: "Bt security failed: right" #1019
Comments
Yeah, my UHK connects to the Dongle (at least it says so in the display shortly after I plug in the Dongle) but then it does not work anymore. No keystrokes, no mouse movements, and even when I disconnect the Dongle it won't work anymore over USB either. Have to reboot the right half to get it working again (over USB). |
Exactly the same for me. The dongle just never works anymore, even though it says it's connected on the UHK80 display. I also tried connecting to an ASUS USB-BT500 adapter in Windows. Sometimes it will connect and work fine a few times. Sometimes it'll get stuck in an endless connect/disconnect loop. After the first successful connection, the most common behavior is that I need to remove the UHK80 from the Windows Bluetooth device list and reset the right half. Then it'll usually connect on the next attempt. Connecting to my Samsung phone via BLE will usually only work once, and then I need to reset the UHK80 right half to get it to connect again. |
I don't know if this is related or not, but I figured I'd go ahead and mention it now. If I disable all instances of "Xbox 360 Wireless Receiver for Windows" in the Windows Device Manager, and then reboot, all subsequent shutdown/restarts are fine. This has actually been happening intermittently for a few weeks, but until now, I thought it was caused by a bad Windows update. I guess it still might just be a Windows issue, but I don't have any other PC to test it with. I don't have any other Xbox 360 Wireless devices either. I didn't realize that the UHK80 was recognized by Windows as an "Xbox 360 Wireless Receiver for Windows". Weirdly enough, everything on the UHK80 still seems to work fine with it disabled. The left and right halves still communicate without the spiral cable, and the Bluetooth still connects (with the same issues as above). What's the Xbox 360 Wireless Receiver used for on the UHK80? Anyone else experience this in Windows? If I need to create an issue, I guess I can later tonight or tomorrow. I've never actually started an issue before though, so I might need help with that. Anyway, sorry if this is out of place or whatever. |
I'm running my Dongle experiments on Linux. |
Old bonds were not secured. The master-paired increases bond security repaired, so after upgrading to pairing-enabled agent/firmware, the old bonds still exist but their security is not sufficient, so you need to re-pair both left-right link as well as dongles via Agent |
How exactly do I do that? I don't seem to find any option for that in Agent. |
Dongle via host connections, left half via advanced settings |
But how? Both halves connected with spiral cable, right half connected to Laptop via USB. Agent shows this: Dongle not visible. If I plug in the Dongle, the keyboard stops working, and Agent just displays: When I now unplug the Dongle, the keyboard does not recover. I have to reset the right half to get it to work again. Where are "advanced settings"? |
@ert78gb What is the state of unpairing and left half pairing Agent features? Are there any userfriendly scripts that Max could use in the meantime? |
Dongle pairing implemented. Bluetooth pairing waiting to firmware to implement then new USB command that mentioned in #980 Laci and I waited for you because looks like when the keyboard uses Dongle or BLE to communicate with the computer then the keyboard stop exposing the USB interfaces. The BLE behaviour are same on Mac and Linux. I hope I summarised correctly @mondalaci and my experiences. |
That new command is already implemented and merged I believe. As for rest of the logic, Laci accidentally closed it i UltimateHackingKeyboard/firmware80#342 |
Anyways, the question wasnt about ble hid pairing, but about dongle unpairing. |
Dongle unpairing works after dongle paired. The pairing does not work without UltimateHackingKeyboard/firmware80#342 if I understand well. |
Well, Max should then be able to unpair his dongle when the dongle is not connected, shouldnt he? |
But I can't, because the Dongle is nowhere to be seen in Agent. There is no "unpair" button or anything similar. |
Ah, I see. Then please see https://github.com/UltimateHackingKeyboard/firmware-uhk80/blob/master/doc-dev%2Fother%2Fpairing%2Fpair.sh and send the delete all command to your right half. (Or run the entire script.) |
Or flash a build of the mentioned UltimateHackingKeyboard/firmware80#342 and power ycle the board |
I just checked the code of Agent and it currently expect the dongle is connected to the computer because it deletes bonds of the Dongle too. I could fix it.
Because Agent detects/reads the paired devices from the host connections of the user config. |
Yes.
Exactly. |
I think Agent should unpair even a dongle that is not connected - in that case, you should unpair just right half.
Indeed.
Well, I am not so sure about that - what if I just load another user config? In any case UltimateHackingKeyboard/firmware80#342 should take care of that so we don't need to do anything except for merging that pr. |
I think I better wait until the two of you agree what steps I should do now. If you want me to install a specific build of Agent or firmware, can you please direct me to the exact action page that I should use? I am lost in half-merged branches and master-paired, bt-something etc. to know which would be the correct combination. |
Agent offer the dongle pairing option when
So Agent will offer the dongle pairing when you load another user config of which host connections don't contain the dongle |
I tried, but that didn't change anything. I plug in the Dongle and the UHK says "Dongle" and becomes unresponsive. Agent says "Can't find your UHK, please plug it in". When I unplug the Dongle, the UHK says "Disconnected" and never connects to USB anymore. It was still visible on Bluetooth. When I tried to connect/pair it on Bluetooth, the right half rebooted. After that it would connect to USB again and generally work again -- but only over USB. |
Tried connecting via Bluetooth again, keyboard reboots. At least that now gives me a convenient way of rebooting after failed Dongle tests 😉 |
You don't have access to right half logs, do you? |
How would I? I can't login to a shell via USB, can I? Maybe after running a secret macro command it should expose a USB file storage with all logs. 😊 |
@mhantsch Laci mentioned you need a script that delete the bonds of the Dongle. The UltimateHackingKeyboard/agent80#134 PR contains To run the script:
|
@mhantsch Please hold on. Based on my testing, the suggested fix doesn't work. @kareltucek The first problem is that Agent expects the dongle to be connected upon deleting it from host connections, which shouldn't be required. UltimateHackingKeyboard/agent80#135 addresses this issue, but we should think deeply about the correct solution before merging it. As for UltimateHackingKeyboard/agent80#134, after running this script, the UHK asks for the 6-digit pairing code when the dongle tries to connect. I assume that the /uh/addr/right settings key is still set. The UHK should reject such dongle connections that have been invalidated on either end. Do you have any ideas about how? |
i don't have npm installed anyway, and I didn't necessarily want to run a bunch of complicated things. I think the user-level software must offer a way for an end user to get out of stuck situations such as mine. I'll wait until the three of you have all agreed on how to continue. |
OK, with this firmware at least there are no more crashes, and if I try the Dongle then at least the keyboard stays functional when I plug it back on USB. I still can't pair it with my Laptop over BT, but I think that's a different issue. It doesn't crash or reboot anymore, though. |
@mhantsch Can you use your UHK via the dongle with the latest build I linked?
Please elaborate on this. |
No, I can't use the Dongle, but at least it no longer crashes my UHK. Ever since some changes were done to the pairing system several weeks ago, I could not use the Dongle anymore. Also, it doesn't show up in Agent on the Connections tab. And I have never seen any pairing button either. BT doesn't work either with my Laptop because I can't initiate pairing. BT only works with my phone. So the only connectivity that works with my UHK80 is USB. |
@kareltucek Agent does not support the dongle firmware update, only in a cumbersome way via recovery mode, which only flashes the firmware version bundled with Agent. Given this limitation, @mhantsch probably runs an old firmware version on his dongle. I think this causes his dongle issue. Agreed? |
So how is end user supposed to update dongle firmware? |
By pressing the dongle's reset button, Agent will offer firmware recovery, but the firmware bundled with Agent may be too old. We're discussing implementing a proper firmware update for the dongle other than the recovery mode. |
It is possible. Still not sure why Agent doesn't show it though. I would expect Agent to show it and then throw a bunch of errors about failed usb commands. |
See the comments starting from UltimateHackingKeyboard/agent#2433
Dongle zephyr log:
The text was updated successfully, but these errors were encountered: