I am using Dao keyboard with official ZMK configuration. I am able to connect it to my android phone just fine and I was once able to connect it to Manjaro and Win systems . even though all other bluetooth devices work just fine on my NixOS system I am unable to pair this particular keyboard:
[bluetooth]# pair <MAC>
Attempting to pair with <MAC>
[CHG] Device <MAC> Connected: yes
Failed to pair: org.bluez.Error.AuthenticationFailed
[CHG] Device <MAC> Connected: no
- resetting the keyboard
- rebooting the system
sudo systemctl restart bluetooth
- updating the system (my last update was a month ago)
bluetoothctl with sudo privileges
- removing all other bluetooth devices
- removing all bluetooth profiles on the keyboard
untrust <MAC> and
remove <MAC> before trying to pair
none of the above worked out for me. please help me fix the issue
Presumably when you pair the keyboard to a device for the first time, the device will ask you to type a pin code on the keyboard. Maybe failure to do this is the cause of
org.bluez.Error.AuthenticationFailed. You can test this on another system by first telling the system to forget the keyboard and then pairing it again.
Once the pairing succeeds, you should not have to enter the pin next time. Be aware that bluetooth devices have limited memory of what they are paired with. Some remember only the last paired device, while other remember several.
Also, be sure the keyboard is not trying to attach to your phone when you pair it to your computer. I would turn off bluetooth of the phone while sorting this out.
You may find helpful info in the Arch Wiki article on Bluetooth.
Be sure to check journalctl for more failure messages. When troubleshooting, I run
journalctl -f in a separate window so I can quickly see info about unexpected behavior.
@ericgundrum’s advice on ArchWiki is where the solution is.
I just ran into this issue myself with my new Corne + nice!nano combo. In case someone finds this page in the future, here’s how I solved it.
nice!nano is a Bluetooth Low Energy device, so some Linux Desktops may have issues scanning for them. To solve this issue, follow the instructions in this ArchWiki article: Bluetooth - ArchWiki
bluetoothctl and changing the scan transport to LE was enough for my system to detect the keyboard.