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

Configurable pairing timeout #1112

Open
mondalaci opened this issue Feb 2, 2025 · 6 comments
Open

Configurable pairing timeout #1112

mondalaci opened this issue Feb 2, 2025 · 6 comments

Comments

@mondalaci
Copy link
Member

Based on https://forum.ultimatehackingkeyboard.com/t/uhk-80-switch-off-battery-and-ble/1980/18?u=mlac

Add a new user config variable. I propose a int16 containing the number of minutes, or 0 (pairing disabled) or -1 (pairing allowed forever)

I also propose a start advertising device action that'd use the above variable or 5 minutes if the variable is 0 or -1.

@mhantsch
Copy link
Contributor

mhantsch commented Feb 5, 2025

Btw, another strategy that I have seen is that other devices automatically advertise themselves as connectable as long as they are currently not connected to a device. Once they are connected, they stop advertising. To connect them to a new device (and possibly store a new bluetooth connection profile) you have to disconnect them (but not unpair) from the current connection. Or you can press the "make it visible for a short while" button.

@pcooke9
Copy link

pcooke9 commented Feb 5, 2025

I just wanted to mention that in Windows 11, the UHK80 BLE connection doesn't offer a disconnect option. It only offers the option to remove it entirely. Then you need to restart the Bluetooth radio to pair it again.

@mhantsch
Copy link
Contributor

mhantsch commented Feb 5, 2025

I just wanted to mention that in Windows 11, the UHK80 BLE connection doesn't offer a disconnect option. It only offers the option to remove it entirely. Then you need to restart the Bluetooth radio to pair it again.

In that case you'd have to turn off Bluetooth for a moment on the Windows 11 system to get your device to become disconnected and restart advertising. But that's why a "make visible for a while" button makes sense.

Maybe the point is: as long as the keyboard is not connected at all then it should just keep advertising.

Once it's connected, the advertising stops, and only comes back if the "make visible for pairing" button (= smart macro) is used. (Or becomes disconnected again.)

@pcooke9
Copy link

pcooke9 commented Feb 5, 2025

In that case you'd have to turn off Bluetooth for a moment on the Windows 11 system to get your device to become disconnected and restart advertising

Pretty annoying if you have multiple devices connected to the same adapter though.
The two devices I have highlighted here are both connected to the same Bluetooth adapter:

Image

Anyone know if adding a disconnect button is something planned in the future? Sorry if it's been mentioned elsewhere. I don't remember seeing it, if so.

@mondalaci
Copy link
Member Author

The second strategy is also sensible, but given that the UHK 80 can connect to multiple devices, I'd keep advertisements on by default which should result in the best usability. If someone messes with connection attempts, the user can change the default behavior.

@mhantsch
Copy link
Contributor

mhantsch commented Feb 5, 2025

Yeah, I'd set mine to timeout after 5 or 10 minutes, and only turn BT advertisement on when I press some button (to run the appropriate smart macro action).

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

3 participants