Apple Magic 鼠标频繁断开连接并重新连接

Apple Magic 鼠标频繁断开连接并重新连接

我有一只 Apple Magic Mouse,在安装了 Ubuntu 14.04 的 Lenovo Thinkpad T440s 上使用。我已成功配对该设备,并且它可以工作一小段时间。

鼠标似乎断开连接几秒钟然后重新连接。

偶尔,我会收到电池电量低(0%)的错误消息。电池是新的。

我已经将内核更新到最新版本,希望能解决这个问题。但并没有。我该如何让它停止断开连接?

答案1

我也遇到了同样的问题,最近我尝试禁用eSCO模式在蓝牙模块中:

echo 1 | sudo tee /sys/module/bluetooth/parameters/disable_esco
sudo /etc/init.d/bluetooth restart
# persist setting
echo "options bluetooth disable_esco=1" | sudo tee /etc/modprobe.d/bluetooth-tweaks.conf

鼠标的连接现在看起来更稳定了,调整此设置后我没有看到断开连接的现象。

我的笔记本电脑联想 W530 有一个 Broadcom 蓝牙适配器(内部 USB 是接口)。

如果您有 Broadcom 蓝牙适配器,您可能需要从 Windows 驱动程序中获取 .hex 固件文件并将其放在 /lib/firmware 目录中以支持所有蓝牙功能。更多信息 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/106540​​0/comments/11https://bugs.launchpad.net/ubuntu/+source/linux/+bug/106540​​0

使用 hex2hcd 将 Windows 驱动程序 .hex 文件转换为 .hcd: https://github.com/jessesung/hex2hcd

我在以下位置找到了 Broadcom .hex 文件这个 Windows 驱动程序包. 找到Win7/Win32/bcbtums-win7x86-brcm.inf文件并搜索适配器的 USB ID。

$ lsusb |grep Bluetooth
Bus 001 Device 006: ID 0a5c:21e6 Broadcom Corp. BCM20702 Bluetooth 4.0 [ThinkPad]

搜索RAMUSB<usb product id in upper case>,例如RAMUSB21E6我的适配器。在那里你会找到 .hex 文件名:

[RAMUSB21E6.NTX86.hw.reg]
HKR,,LowerFilters, 0x00010000, "bcbtums"
HKR,,%RAMPatchFileName%,0x00000, "BCM20702A1_001.002.014.1315.1387.hex"
HKR,,%RemoteWakeEnabled%,0x00010001,1
HKR,,%DeviceRemoteWakeSupported%,0x00010001,1

就我而言,文件是Win7/Win32/BCM20702A1_001.002.014.1315.1387.hex

然后我使用 hex2hcd 将文件转换为 /lib/firmware/fw-0a5c_21e6.hcd(该文件名再次包含您的 Broadcom USB 蓝牙适配器的 USB ID)。

答案2

我也遇到过这个问题,但最近我找到了一种方法来大大改善这种情况,断开连接的次数减少了(数量级),并且重新连接的速度更快。

操作系统:OpenSuse Tumbleweed 最新

硬件:惠普 ZBook 3

触控板:Apple Magic Trackpad v1

蓝牙适配器: ID 8087:0a2b 英特尔

  1. 禁用 ESCO echo 1 | sudo tee /sys/module/bluetooth/parameters/disable_esco
  2. 创建(或编辑,如果已经有一个)/etc/bluetooth/main.conf
    [General]
    MultiProfile = multiple
    FastConnectable = true
    [GATT]
    Channels = 5
    [Policy]
    ReconnectAttempts=50
    ReconnectIntervals=1,1,1,2,2,2,3,3,3,3
    AutoEnable=true
    
  3. 重启蓝牙 sudo systemctl restart bluetooth

多年来,我一直受这个问题困扰,但我仍然无法完全摆脱它。奇怪的是,当我第一次购买触控板时(2011 年),我在装有 Debian Etch 的 PC 上使用它,使用无名廉价加密狗,没有出现断线问题。加密狗仍然可用,最近找到并测试了它,但现在它像我所有的其他设备一样断开了连接。

答案3

我相信正确的解决方案是对 /etc/bluetooth/main.conf 进行以下编辑:

[General]

# Default adapter name
# Defaults to 'BlueZ X.YZ'
Name = BlueZ

# Default device class. Only the major and minor device class bits are
# considered. Defaults to '0x000000'.
Class = 0x000100

# How long to stay in discoverable mode before going back to non-discoverable
# The value is in seconds. Default is 180, i.e. 3 minutes.
# 0 = disable timer, i.e. stay discoverable forever
DiscoverableTimeout = 0

# Always allow pairing even if there are no agent registered
# Possible values: true, false
# Default: false
AlwaysPairable = false

# How long to stay in pairable mode before going back to non-discoverable
# The value is in seconds. Default is 0.
# 0 = disable timer, i.e. stay pairable forever
PairableTimeout = 0

# Use vendor id source (assigner), vendor, product and version information for
# DID profile support. The values are separated by ":" and assigner, VID, PID
# and version.
# Possible vendor id source values: bluetooth, usb (defaults to usb)
DeviceID = bluetooth:1234:5678:abcd

# Do reverse service discovery for previously unknown devices that connect to
# us. For BR/EDR this option is really only needed for qualification since the
# BITE tester doesn't like us doing reverse SDP for some test cases, for LE
# this disables the GATT client functionally so it can be used in system which
# can only operate as peripheral.
# Defaults to 'true'.
ReverseServiceDiscovery = true

# Enable name resolving after inquiry. Set it to 'false' if you don't need
# remote devices name and want shorter discovery cycle. Defaults to 'true'.
NameResolving = true

# Enable runtime persistency of debug link keys. Default is false which
# makes debug link keys valid only for the duration of the connection
# that they were created for.
DebugKeys = false

# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
ControllerMode = dual

# Enables Multi Profile Specification support. This allows to specify if
# system supports only Multiple Profiles Single Device (MPSD) configuration
# or both Multiple Profiles Single Device (MPSD) and Multiple Profiles Multiple
# Devices (MPMD) configurations.
# Possible values: "off", "single", "multiple"
MultiProfile = off

# Permanently enables the Fast Connectable setting for adapters that
# support it. When enabled other devices can connect faster to us,
# however the tradeoff is increased power consumptions. This feature
# will fully work only on kernel version 4.1 and newer. Defaults to
# 'false'.
FastConnectable = false

# Default privacy setting.
# Enables use of private address.
# Possible values: "off", "device", "network"
# "network" option not supported currently
# Defaults to "off"
Privacy = off

[GATT]
# GATT attribute cache.
# Possible values:
# always: Always cache attributes even for devices not paired, this is
# recommended as it is best for interoperability, with more consistent
# reconnection times and enables proper tracking of notifications for all
# devices.
# yes: Only cache attributes of paired devices.
# no: Never cache attributes
# Default: always
Cache = always

# Minimum required Encryption Key Size for accessing secured characteristics.
# Possible values: 0 and 7-16. 0 means don't care.
# Defaults to 0
KeySize = 0

# Exchange MTU size.
# Possible values: 23-517
# Defaults to 517
ExchangeMTU = 517

[Policy]
#
# The ReconnectUUIDs defines the set of remote services that should try
# to be reconnected to in case of a link loss (link supervision
# timeout). The policy plugin should contain a sane set of values by
# default, but this list can be overridden here. By setting the list to
# empty the reconnection feature gets disabled.
ReconnectUUIDs=00001112-0000-1000-8000-00805f9b34fb,0000111f-0000-1000-8000-00805f9b34fb,0000110a-0000-1000-8000-00805f9b34fb

# ReconnectAttempts define the number of attempts to reconnect after a link
# lost. Setting the value to 0 disables reconnecting feature.
ReconnectAttempts=7

# ReconnectIntervals define the set of intervals in seconds to use in between
# attempts.
# If the number of attempts defined in ReconnectAttempts is bigger than the
# set of intervals the last interval is repeated until the last attempt.
ReconnectIntervals=1,2,4,8,16,32,64

# AutoEnable defines option to enable all controllers when they are found.
# This includes adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'false'.
AutoEnable=false

这对我来说可以。

相关内容