Dongle stuck in pairing mode (violet)

Hi, I was happily using the UHK 80 during a gaming session when suddenly it dropped the connection to the Dongle and wouldn’t reconnect anymore. The dongle is violet now which seems to indicate it is in pairing mode, but not paired.

I tried updating firmware to 16.0.0, resetting the right half, removing and readding the dongle connection - and yes, I get the yellow banner after removing the connection, and it seems to pair fine - only that the Dongle doesn’t seem to want to know anything about it and insists on staying violet instead of becoming blue. :sweat_smile:

I also added a switchHost next macro, but the UHK seems to only know about the USB (“My PC”) connection, despite two connections (USB to right half and Dongle) listed in the agent.

Adding and executing the reboot macro also didn’t help.

Now I can only use my UHK if the right half is connected via USB which is a shame. :disappointed_face:

Violet means it is paired, but not currently connected.

Dongle colors:

  • red means the dongle is either not paired to any device, or not actively trying to connect.
  • violet means the dongle is paired to some UHK and is actively trying to establish a connection.
  • blue means a dongle is connected to some uhk, but is not its usb report target. These are dongles that are prepared for action and can be immediately switched to via switchHost command.
  • green is the currently active dongle.

Do you have BLE advertising disabled via something like bluetooth toggle advertise, or set bluetooth.alwaysAdvertiseHid false, etc.?

BLE advertising needs to be enabled before you can connect to the dongle, but if advertising is disabled while the dongle is already connected (blue, or green), it will remain working unless it loses connection (violet). If the dongle loses connection while BLE advertising is disabled (turns violet), it won’t reconnect until advertising is re-enabled (even when using switchHost commands), which might be a bug :man_shrugging:.

You can try using bluetooth toggle advertise to re-enable advertising. If the dongle turns blue after toggling advertising back on, then you should be able to switch back to it again.


Another possible bug I’ve experienced; sometimes if you have both the dongle and any BLE devices connected at the same time, and you switch between them, then they might stop working until you disconnect one or the other, and reboot the UHK. Sometimes unplugging/reconnecting the dongle, and/or toggling the Bluetooth radio on the host device is also necessary.

1 Like

Here is a guide on how to sget to logs. How to report firmware issues? - Ultimate Hacking Keyboard

May or may not be useful when hunting for the cause.

Apart from that, Phil has said everything.

Post the logs if you want me to take a look at them. Be sure to explain what scenario you have captured.

Thanks @pcooke9 ! :folded_hands: That’s exactly what seems to have caused the issue!

I had turned off BLE advertising in $onInit as I don’t use BLE and don’t want the keyboard in advertising mode all the time. Once I had reenabled advertising and rebooted the keyboard it worked again instantly.

@kareltucek I’ll make sure to capture logs if it happens again, but seems indeed a bug. Why would you need to have BLE advertising enabled to connect to the dongle?

I really don’t want to keep it enabled all the time.

1 Like

If I’m not mistaken, I think the dongle uses a BLE signal too.

I use set bluetooth.alwaysAdvertiseHid false in my $onInit as well, but I mapped bluetooth toggle advertise to a key on my Fn2 layer. I just toggle it on long enough to connect the dongle or other BLE devices. As soon as the dongle turns blue, you can just immediately toggle advertising back off, and then use switchHost to activate the dongle (green) again. It should continue working afterward (unless it drops out for whatever reason again).

2 Likes

Because dongle communicates over bluetooth.

Given this, everything seems to work as expected.

If enything, feel free to reduce the peripheral connection count to 1 - that will effectively stop advertising when any bluetooth host (dongle included) is connected.

2 Likes

If I’m not mistaken, I think the dongle uses a BLE signal too.

That explains a lot, thanks!

That works exactly the way I need it! :folded_hands:

For anyone coming here at a later point, add the following to the $onInit macro:

set bluetooth.peripheralConnectionCount 1
1 Like

I hope without that minus sign?

Oh my, I do have the minus sign there indeed. But still seems to work. :person_shrugging:

Editing the line in my previous post.

1 Like

Ah, right, I had set the limits in a way that it gets coalesced to the nearest allowed value, which is 1 in this case.

Somehow this one slipped past me, but it seems useful :wink:.

Just added these colors to Dongle quick start guide - Ultimate Hacking Keyboard, which should have contained them from the start.

2 Likes

Bringing this back….

I have my UHK80 wired, and BLE connected, and is all good there.

I can pair the Dongle and see it in violet. I’ve no advertising or the like in my $onInit.

No matter what I do I cannot get it to connect to the dongle. (That being said most of what I am trying to do is just change the connections to 2:Dongle.

Any thoughts on what else to try?

Only the two connections and cannot get the dongle to be connected.

Ah right got it, setting bluetooth on didn’t work but toggling it did.

1 Like