debian 安装蓝牙鼠标

安装驱动
apt-get install bluez-utils
/etc/init.d/bluez-utils restart

启动服务并搜索蓝牙设别(这时需要按一下蓝牙鼠标的connect键)

sudo hidd --server
sudo hidd --search

一会你就可以看到这个设备的MAC码 xx:xx:xx:xx:xx:xx

修改 /etc/default/bluetooth
sudo vi /etc/default/bluetooth

注意下面红色的地方,那里改成你鼠标的MAC码,然后保存

# Defaults for bluez-utils

# This file supersedes /etc/default/bluez-pan. If
# that exists on your system, you should use this
# file instead and remove the old one. Until you
# do so, the contents of this file will be ignored.

# start bluetooth on boot?
# compatibility note: If this variable is not found bluetooth will
# start
BLUETOOTH_ENABLED=1

# This setting will switch HID devices (e.g mouse/keyboad) to HCI mode, that is
# you will have bluetooth functionality from your dongle instead of only HID.
# Note that not every bluetooth dongle is capable of switching back to HID
# mode, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=355497
HID2HCI_ENABLED=1

############ HIDD
#
# HID daemon
HIDD_ENABLED=1
HIDD_OPTIONS="--connect AA:BB:CC:DD:EE:FF --server"

# to make hidd always use a particular interface, use something
# like this, substituting the bdaddr of the interface:
# HIDD_OPTIONS="-i AA:BB:CC:DD:EE:FF --server"

设置开机自动连接鼠标,编辑rc.local

$ sudo gedit /etc/init.d/rc.local

在后面加上

hciconfig hci0 down
hciconfig hci0 up
hidd --search

保存

大功告成,重启动下你的计算机看看,是不是可以用啦。