There are a couple questions about bluetooth switching behavior for you folks. Short version is here:
-
should UHK always advertise by default?
-
should UHK keep connections active in background?
-
should empty slots be shown in Agent’s host connection list, so that they can be reordered and so that low-numbered slots can be reserved for unregistered connections?
Full reasoning follows if you want to read it, but it is by no means required in order for you to contribute your preferences.
Click to show.
Background:
There was a discussion at Switchover logic: Unexpected switch to Bluetooth during boot · Issue #1471 · UltimateHackingKeyboard/firmware · GitHub .
Tl;dr;: multiple users expressed that they are uncomfortable with uhks automatic connection switching behaviors. As a result, we have redesigned bluetooth to be strictly slot oriented. Part of that transition is already released, however more changes are coming soon.
These changes can be tried out with this firmware for instance:
uhk-firmware-17.2.0-staging_260730.tar.gz
uhk-firmware-17.2.0-staging_260731_v2.tar.gz
The main changes:
-
By default, all host switching, as well as the first connection of a session, has to be initiated by the user. Once the connection is established, it is kept until the device disconnects.
-
Part of the reasoning is to have predictable behavior.
-
Part of the reasoning is security. Don’t switch unexpectedly, and don’t advertise all the time. Turn on advertising only when explicitly required by the user.
-
-
For those who prefer current behavior, there is a
set bluetooth.alwaysAdvertise truesettings which allows the devices to always connect to UHK. Still, uhk never switches to a different connection by itself. -
The
switchoverflag is mostly obsoleted. Newly, it allows the connection to be used as a “backup” when current connection becomes unavailable. -
Uhk will now support multiple bluetooth hosts at the same time, which should resolve a number of painful reconnection loop scenarios. But this change is mostly accidental, since Benedek came with the support around the right time to introduce it with the above.
Question: always advertise by default:
Should Uhk be in the “always advertising” by default, or not?
Above discussion says it should be off by default, but with the possibility to turn on. However the sample of users is clearly a bit biased.
Question: disconnect behaviors:
When testing the keyboard, I sometimes find it frustrating that uhk keeps connected to my phone, because when trying to use the phone, the onscreen keyboard doesn’t pop up when a ble keyboard is connected.
- Given the new philosophy of ble slots, should connections be kept connected when not active at all, by default?
Pros (of keeping them connected):
- instantaneous switching between multiple hosts
- prevents reconnection loops
Cons:
- background connections are increasing power consumption, although by a negligible amount.
- background connections may be increasing latency.
- connections kept “in background” may make the device “unusable” (the above onscreen keyboard glitch on android). It is non intuitive that a device is blocked by a keyboard when not its active host connection.
Possible solutions:
-
When switching to another connection, always disconnect the old one. Clearly, this is undesirable in some workflows, but is in line with the slot-oriented reasoning of making the keyboard less smart and more dependable, as well as more secure.
-
Allowing some easy way to disconnect a host.
-
Blame the device and let the user manage his phone’s behavior.
Slot addressing
At the moment, known, agent-registered host connections are mapped at the beginning of the connection slot list. After that, unregistered connections and empty slots are placed.
The registered slots are always identified by the registered host connection list index, which is frustrating.
This is frustrating, because those connections that can be easily identified by name occupy the low numbered slots, while the rest of the connections shift around in the unnamed slots depending on the number of registered hosts.
Proposed solution:
- Show empty slots in Agent as well, and so allow the user to reorder the slots as he pleases. E.g., having the first 5 slots reserved for unregistered connections, and addressing registered connections by names (via macros atm).
Also here is a tentative pre-release firmware. We would appreciate testing, feedback: uhk-firmware-17.2.0-staging_260731_v2.tar.gz