注:以下內(nèi)容主要來自https://wiki.archlinux.org/index.php/bluetooth_keyboard
1乍赫、lsusb看看能不能找到本機的藍牙/USB藍牙
2谴分、 bluetoothctl -a
注意,這個指令用root權(quán)限算柳,否則可能會找不到設(shè)備
進入[bluetooth]#提示符
[bluetooth]# power on激活藍牙
[bluetooth]# agent KeyboardOnly
[bluetooth]# default-agent
告訴主機去找藍牙鍵盤設(shè)備
[bluetooth]# pairable on進入配對模式外厂,第一次才需要
[bluetooth]# scan on 開始掃描
[bluetooth]# pair 01:02:03:04:05:06 后面的mac地址是你的鍵盤mac地址
[bluetooth]# trust 01:02:03:04:05:06 把鍵盤設(shè)置為可信設(shè)備
[bluetooth]# connect 01:02:03:04:05:06 進行對接
顯示yes就對接成功了劝赔。
補充:以下內(nèi)容針對羅技K系列藍牙丁鹉,如k380這種可以對接多個藍牙設(shè)備的
這類設(shè)備有多個藍牙服務(wù),但是mac地址只有一個
因此恳不,如果不是默認連接的linux主機檩小,則每次都需要重新去連接。也就是第一次配對成功之后烟勋,每次power on一下规求,然后scan on,然后鍵盤切換到對應(yīng)的F2或者F3卵惦。具體原因我也不明白為什么阻肿。
如果是一對一的藍牙鍵盤,就不會出現(xiàn)這個問題沮尿。