自动连接蓝牙鼠标

Mar*_*ing 8 mouse bluetooth kubuntu

我有一个与 Kubuntu (KDE) 一起使用的蓝牙鼠标 (Apple Mighty Mouse)。我总是必须手动连接到鼠标,尽管它被列为受信任的设备。如何在打开鼠标后自动连接鼠标?或者至少在挂起后重新连接?

Bud*_*hot 3

你可以用hciconfig它来做到这一点。

首先像平常一样手动连接鼠标,然后打开终端并运行hciconfig -a以检索其名称。它应该类似于hciXX的设备编号。您可以使用hcitool scan,它也应该给出名称。

完成此操作后,您可以通过运行强制蓝牙设备检测

sudo hciconfig <name_of_your_mouse> reset
Run Code Online (Sandbox Code Playgroud)

为了在每次启动时自动执行此操作,您需要编辑/etc/init.d/bluetooth魔术行并将其附加到文件末尾:hciconfig <name_of_your_mouse> reset。然后保存,重新启动,它应该永远有效。

还要确保您的鼠标在启动时已插入。如果您在启动后插入鼠标,则必须再次手动检测鼠标。

希望这可以帮助。


小智 0

我有一个罗技蓝牙旅行鼠标。我有 Ubuntu 20.04。我的笔记本电脑是联想ideapad。如何在 Ubuntu 中修复蓝牙

首先,如果安装了bluez。确保鼠标被检测到并配对。如果未删除鼠标图标,请按鼠标上的按钮配对并重新连接鼠标。

下一步:打开终端

要打开它,请输入:

sudo /etc/init.d/bluetooth start
Run Code Online (Sandbox Code Playgroud)

要使其在启动系统时永久生效,请输入:

sudo systemctl enable bluetooth
Run Code Online (Sandbox Code Playgroud)

还:

rfkill list # to see if anything is blocked
Run Code Online (Sandbox Code Playgroud)

如果蓝牙堆栈和程序已损坏,则要删除并重新安装它,请使用:

sudo apt purge python-bluez  
sudo apt install python-bluez  
Run Code Online (Sandbox Code Playgroud)

安装蓝人:

sudo apt install blueman
Run Code Online (Sandbox Code Playgroud)

编辑main.conf文件:

sudo nano /etc/bluetooth/main.conf
Run Code Online (Sandbox Code Playgroud)

取消注释ReconnectAttemps=7(删除#字符)并取消注释(删除#)

AutoEnable=true
Run Code Online (Sandbox Code Playgroud)

保存,退出nano并重新启动。

要删除右上角的 blueman 图标,请右键单击 blueman 图标,然后取消选中插件下的 appindicator。

确保合上盖子并关闭鼠标。等待挂起模式发生(电源指示灯闪烁),然后打开鼠标,然后打开盖子。鼠标将自动连接。