桌面无线进化 连接蓝牙鼠标和键盘

鼠标键盘

键盘:RK 61 Cherry 茶轴 黑色

鼠标:达尔优 LM108 垂直人体工学鼠标

软件包: bluetoorhctl

连接鼠标

打开鼠标开关

达尔优 LM108 底面左上角有一个黑色按钮,为蓝牙配对按钮

长按进入蓝牙配对模式

电脑上使用 bluetoothctl 进行蓝牙管理

1
2
3
4
5
bluetoothctl
Agent registered
[CHG] Controller 60:57:18:1C:C1:8F Pairable: yes
[bluetooth]# scan on
Discovery started

当扫描到对应蓝牙设备的 mac 时,使用

1
pair <mac-of-mouse>

进行配对连接

此时会弹出提示框输入 yes 以确认配对设备

配对之后输入 connect 连接鼠标

1
connect <mac-of-mouse>

至此鼠标连接成功。

接下来以蓝牙方式连接键盘

连接键盘

去 RK 官网查看 RK 61 双模键盘使用方式

我这里为第一版, Tab 和 P 键上都有镭射标记

Fn + Tab 为蓝牙有线连接方式切换,出厂默认为蓝牙连接方式

Fn + P 进入蓝牙配对模式

首先打开键盘背部开关开启键盘

出厂默认为蓝牙连接方式,则按下 Fn + P 进入蓝牙配对模式,此时 P 键连续闪烁

在电脑上进入 bluetoothctl 进行蓝牙配对

1
2
3
4
5
6
7
bluetoothctl
scan on
# 扫描到蓝牙键盘后使用 pair <mac-of-keyboard> 进行配对
pair <mac-of-keyboard>
# 输入 yes 以确认配对
# 配对成功之后使用 connect <mac-of-keyboard> 进行连接
connect <mac-of-keyboard>

至此键盘和鼠标的连接完成

接下来进行鼠标延迟的优化

鼠标延迟优化

修改鼠标轮询率

查看蓝牙鼠标 mac 地址

1
2
3
4
5
6
bluetoothctl
Agent registered
[CHG] Controller 60:57:18:1C:C1:8F Pairable: yes
[RK-Bluetooth keyboard]# devices
Device DC:2C:26:D0:08:02 RK-Bluetooth keyboard
Device FA:0C:38:6A:EC:CE LM108 Bluetooth

查看系统蓝牙适配器 mac 地址

1
2
[RK-Bluetooth keyboard]# list
Controller 60:57:18:1C:C1:8F BiGOranGe [default]

var 下目录需要超级管理员权限才可以查看修改

在超级管理员状态下修改 /var/lib/bluetooth/<mac-of-adaptor>/<mac-of-mouse>/info添加/修改以下字段

1
2
3
4
5
[ConnectionParameters]
MinInterval=6
MaxInterval=9
Latency=44
Timeout=216

修改之前的值

1
2
3
4
5
[ConnectionParameters]
MinInterval=6
MaxInterval=9
Latency=100
Timeout=600

可以自己根据自己的需求调节这两个值进行优化,以达到自己满意的状态

设置蓝牙自动连接

修改/添加 /etc/bluetooth/main.conf[Policy]下添加AutoEnable=true将蓝牙设备设置为开机自动连接