简单几步连接蓝牙键盘
Tofloor
poster avatar
ablog
deepin
2018-01-27 00:12
Author
用deepin自带的蓝牙管理工具连接蓝牙键盘总失败。经过分析原来是没有pin码的验证。下面简单几步来教你用linux终端连接蓝牙键盘。
1.确定蓝牙已经正常启动
  1. systemctl status bluetooth
Copy the Code
我的运行后返回
bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-01-26 14:29:13 CST; 1h 14min ago
     Docs: man:bluetoothd(8)
Main PID: 447 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/bluetooth.service
           └─447 /usr/lib/bluetooth/bluetoothd

如果是禁用状态,输入命令启动。/etc/init.d/bluetooth start

2.用root权限运行蓝牙控制中心
  1. sudo bluetoothctl
Copy the Code
返回以[bluetooth]#开头的蓝牙shell,可以输入help,查看更多命令
list就显示当前电脑上的蓝牙模块

3.扫描附近的蓝牙设备
  1. scan on
Copy the Code
用devices可以打印出扫描到的设备,返回的格式
Device xx:xx:xx:xx:xx 设备名。
选中xx:xx:xx:xx,复制

4.信任选中的蓝牙设备
  1. trust xx:xx:xx:xx # 刚才复制的内容
Copy the Code


5.与设备进行配对
  1. pair xx:xx:xx:xx:xx # 同上
Copy the Code
在蓝牙键盘上输入pin,输完按回车。


6.连接设备
  1. connect xx:xx:xx:xx:xx:xx
Copy the Code


当看到Connection successful,你的蓝牙键盘以可以尽情发挥了。




Reply Favorite View the author
All Replies
avatar
mhlan
deepin
2018-03-03 00:16
#1
我输入
  1. scan on
Copy the Code


显示得到结果
  1. Failed to start discovery: org.bluez.Error.NotReady
Copy the Code


请问这个该怎么解决啊?
Reply View the author
avatar
nerosong
deepin
2018-06-03 01:32
#2

我遇到的是:
  1. Failed to start discovery: org.bluez.Error.InProgress
Copy the Code
然后也没有扫描出来的列表
重启两次蓝牙就好了
Reply View the author
avatar
nerosong
deepin
2018-06-03 01:37
#3
顺便报一个极有意思的坑:

我用的是罗技K380,可以在三台设备上随时切换,长按F1到F3分别进行绑定。
终端里输入pin码连接的时候,绑定的是F2,但是connect不上,尝试着按了一下F1又连接成功了

但是我F1默认配置是一台win7,所以下次切到win7时又得重新绑一次
Reply View the author
avatar
ablog
deepin
2018-06-22 19:16
#4
https://bbs.deepin.org/post/152424
顺便报一个极有意思的坑:

我用的是罗技K380,可以在三台设备上随时切换,长按F1到F3分别进行绑定。

我也有相同的键盘,在 mac 和 win 平台下切换无问题,在 linux 就不行,也没时间去研究怎么会事。主要平时用 mac。
Reply View the author
avatar
墨翼。。。。
deepin
2019-10-27 21:06
#5
我的是logicthch K375s ,按照步骤一次配对连接上了。都不用装罗技的驱动。。。。。谢谢 大神!!!!
Reply View the author
avatar
alexdai
deepin
2023-11-15 18:16
#6

尝试了一下,搞定,原来用gui怎么弄都不对,谢谢啊

Reply View the author