Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant failure when using recommended Broadcom bluetooth adapter #103588

Closed
derekcentrico opened this issue Nov 7, 2023 · 12 comments
Closed

Constant failure when using recommended Broadcom bluetooth adapter #103588

derekcentrico opened this issue Nov 7, 2023 · 12 comments

Comments

@derekcentrico
Copy link

The problem

I purchased a Bluetooth adapter to expand range and to provide extra slots because my cheap little Realtek adapter wasn't cutting it for some of my blinds' distances and whatnot.

I bought a Broadcom device listed on https://www.home-assistant.io/integrations/bluetooth#known-working-adapters, specifically a "LM TECHNOLOGIES LM1010-0972" after much hunting for a single unit.

I have tried with just the Broadcom adapter and with both adapters plugged in. Any scenario with Broadcom results in complete failure. Using my Realtek adapter alone works still, but again I have distance issues and a device connection limitation (1 device?) with it.

What version of Home Assistant Core has the issue?

core-2023.11.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

bluetooth

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bluetooth

Diagnostics information

【 2552.271885] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [2552.271888] usb 2-2: Product: BCM20702A0
[ 2552.271891] usb 2-2: Manufacturer: Broadcom Corp [2552.271893] usb 2-2: SerialNumber: 34C9F0949320 [2552.405307] Bluetooth: hci0: BCM: chip id 63
[2552.407178] Bluetooth: hci0: BCM: features 0x07
[2552.440102] Bluetooth: hci0: BCM20702A
[2552.440105] Bluetooth: hci0: BCM20702A1 (001.002.014) build 0000
[ 2552.441222] Bluetooth: hci0: BCM: firmware Patch file not found, tried:
[ 2552.441523] Bluetooth: hci0: BCM: 'brcm/BCM20702A1-0a5c-21e8.hcd'
[2552.441737] Bluetooth: hci0: BCM: 'brcm/BCM-0a5c-21e8.hcd'
[ 2552.557472] Bluetooth: MGMT ver 1.22
[2656.390725] Bluetooth: hci0: Malformed LE Event: 0x02 [2656.396698] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2656.402722] Bluetooth: hci0: Malformed LE Event: 0x02 [2658.552608] Bluetooth: hci0: command 0x200c tx timeout [ 2658.552635] Bluetooth: hci0: Opcode 0x200c failed: -110 [2660.399439] usb 2-2: USB disconnect, device number 26 [ 2660.400311] Bluetooth: hci0: Opcode 0x200c failed: -19 [2660.400516] Bluetooth: hci0: failed to restart LE scan: status -19
[ 2671.529129] usb 2-2: new full-speed USB device number 27 using ohci-pci [ 2672.015665] usb 2-2: New USB device found, idVendor=0a5c, idProduct=21e8, bcdDevice= 1.12 New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 2672.015671] usb 2-2: Product: BCM20702A0
[ 2672.015670] usb 2-2:
[ 2672.015672] usb 2-2: Manufacturer: Broadcom Corp
[ 2672.015673] usb 2-2: SerialNumber: 34C9F0949320
[ 2672.141741] Bluetooth: hci0: BCM: chip id 63
[ 2672.143776] Bluetooth: hci0: BCM: features 0x07
[ 2672.175783] Bluetooth: hci0: BCM20702A
[ 2672.175785] Bluetooth: hci0: BCM20702A1 (001.002.014) build 0000
[ 2672.177815] Bluetooth: hci0: BCM: firmware Patch file not found, tried: [2672.178039] Bluetooth: hci0: BCM: 'brcm/BCM20702A1-0a5c-21e8.hcd'
[ 2672.178236] Bluetooth: hci0: BCM: 'brcm/BCM-0a5c-21e8.hcd'
[2672.286982] Bluetooth: MGMT ver 1.22
[ 2776.040286] Bluetooth: hci0: Malformed LE Event: 0x02
[ 2776.046343] Bluetooth: hci0: Malformed LE Event: 0x02
[ 2776.276272] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2776.284288] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2777.080364] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2777.084315] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2777.090395] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2777.094299] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2777.100346] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2777.104331] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2777.110309] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2777.116310] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2777.120293] Bluetooth: hci0: Malformed LE Event: 0x02 [ 2779.204696] Bluetooth: hci0: command 0x200c tx timeout [ 2779.204720] Bluetooth: hci0: Opcode 0x200c failed: -110 [ 2781.237292] usb 2-2: USB disconnect, device number 27
[ 2781.237862] Bluetooth: hci0: Opcode 0x200c failed: -19
[ 2781.238072] Bluetooth: hci0: failed to restart LE scan: status -19
[ 2792.323276] usb 2-2: new full-speed USB device number 28 using ohci-pci
[ 2792.797972] usb 2-2: New USB device found, idVendor=0a5c, idProduct=21e8, bcdDevice= 1.12
[ 2792.797980] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2792.797983] usb 2-2: Product: BCM20702A0
[ 2792.797985] usb 2-2: Manufacturer: Broadcom Corp

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.bluetooth.scanner
Source: components/bluetooth/scanner.py:353
Integration: Bluetooth (documentation, issues)
First occurred: 4:11:28 AM (409 occurrences)
Last logged: 7:32:02 AM

hci0 (34:C9:F0:94:93:20): Failed to restart Bluetooth scanner: hci0 (34:C9:F0:94:93:20): Failed to start Bluetooth: [org.freedesktop.DBus.Error.UnknownObject] Method "SetDiscoveryFilter" with signature "a{sv}" on interface "org.bluez.Adapter1" doesn't exist
hci1 (8C:88:2B:43:8E:CA): Failed to restart Bluetooth scanner: hci1 (8C:88:2B:43:8E:CA): Failed to start Bluetooth: [org.freedesktop.DBus.Error.UnknownObject] Method "SetDiscoveryFilter" with signature "a{sv}" on interface "org.bluez.Adapter1" doesn't exist
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/scanner.py", line 223, in _async_start
    await self.scanner.start()  # type: ignore[no-untyped-call]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bleak/__init__.py", line 198, in start
    await self._backend.start()
  File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/scanner.py", line 185, in start
    self._stop = await manager.active_scan(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/manager.py", line 405, in active_scan
    assert_reply(reply)
  File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/utils.py", line 22, in assert_reply
    raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.freedesktop.DBus.Error.UnknownObject] Method "SetDiscoveryFilter" with signature "a{sv}" on interface "org.bluez.Adapter1" doesn't exist


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/scanner.py", line 353, in _async_restart_scanner
    await self._async_start()
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/scanner.py", line 305, in _async_start
    raise ScannerStartError(
homeassistant.components.bluetooth.scanner.ScannerStartError: hci0 (34:C9:F0:94:93:20): Failed to start Bluetooth: [org.freedesktop.DBus.Error.UnknownObject] Method "SetDiscoveryFilter" with signature "a{sv}" on interface "org.bluez.Adapter1" doesn't exist

Additional information

Trace error example:

Stopped because an error was encountered at November 7, 2023 at 6:55:28 AM (runtime: 241.86 seconds)

D0-F8-02-3A-75-3D (D0:F8:02:3A:75:3D) - D0:F8:02:3A:75:3D: Failed to connect after 9 attempt(s): No backend with an available connection slot that can reach address D0:F8:02:3A:75:3D was found: The proxy/adapter is out of connection slots or the device is no longer reachable; Add additional proxies (https://esphome.github.io/bluetooth-proxies/) near this device

@home-assistant
Copy link

home-assistant bot commented Nov 7, 2023

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (bluetooth) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of bluetooth can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign bluetooth Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


bluetooth documentation
bluetooth source
(message by IssueLinks)

@derekcentrico
Copy link
Author

derekcentrico commented Nov 7, 2023

To add, if this is indeed a firmware missing issue as dmesg indicates, can you all add https://github.com/winterheart/broadcom-bt-firmware into the OS so it is functional?

I doubt I'm the only person out there that bought a recommended Bluetooth adapter that has this problem? Chipset BCM20702A0 is a big recommendation on many Broadcom recommended adapters.

@KevanGP
Copy link

KevanGP commented Nov 7, 2023

I can't get Bluetooth to work at all on a Raspberry Pi 4B. I get the following in the web setup page, which says failed setup...


hci0 (E4:5F:01:D7:F9:B1): DBus service not found; docker config may be missing -v /run/dbus:/run/dbus:ro: {ex}


Can you please tell me the easiest way to fix? Sorry if I should have created a new issue for this problem.

@bdraco
Copy link
Member

bdraco commented Nov 7, 2023

To add, if this is indeed a firmware missing issue as dmesg indicates, can you all add winterheart/broadcom-bt-firmware into the OS so it is functional?

I doubt I'm the only person out there that bought a recommended Bluetooth adapter that has this problem? Chipset BCM20702A0 is a big recommendation on many Broadcom recommended adapters.

home-assistant/operating-system#2222

There is a big warning about this in the docs: https://www.home-assistant.io/integrations/bluetooth/#broadcom-bcm-based-adapters

Broadcom (BCM) based adapters
These adapters may require additional patch files available at https://github.com/winterheart/broadcom-bt-firmware for > stable operation.
There is currently no supported method to install these patch files when using Home Assistant Operating System.

@bdraco
Copy link
Member

bdraco commented Nov 7, 2023

Can you please tell me the easiest way to fix? Sorry if I should have created a new issue for this problem.

https://www.home-assistant.io/integrations/bluetooth/#before-you-begin

In many cases, a better approach than a directly connected adapter or card is to use a Bluetooth proxy using an ESP32 since Linux kernel updates have previously broken Bluetooth functionality and Bluetooth driver support Linux generally falls behind other operating systems for newer adapters. A Bluetooth proxy is particularly interesting to users who virtualize their instance, where the USB pass-through may cause additional problems. More information is available in the Remote Adapters section below or by visiting ESPhome’s Bluetooth proxy page.

@derekcentrico
Copy link
Author

There is a big warning about this in the docs: https://www.home-assistant.io/integrations/bluetooth/#broadcom-bcm-based-adapters

I have zero excuse for missing that. Time to order a Realtek for now. Doh.

@bdraco
Copy link
Member

bdraco commented Nov 7, 2023

There is a big warning about this in the docs: home-assistant.io/integrations/bluetooth/#broadcom-bcm-based-adapters

I have zero excuse for missing that. Time to order a Realtek for now. Doh.

Realtek is worse actually as it has no reset pin so when it locks up you'll enjoy pulling out the usb stick and reinserting it
https://www.home-assistant.io/integrations/bluetooth/#realtek-rtl8761bu-adapters

I use a Feasycom FSC-BP119 (CSR8510A10) 📶 for my production as its smooth sailing
https://www.home-assistant.io/integrations/bluetooth/#cambridge-silicon-radio-csr-based-adapters

@bdraco
Copy link
Member

bdraco commented Nov 7, 2023

@derekcentrico
Copy link
Author

Thank you kindly. Ordered that exact one. How's it work for you with concurrent connections? I'd love to be able to blast a signal to 6 blinds at once to open or close vs staggered over a few minutes.

@bdraco
Copy link
Member

bdraco commented Nov 7, 2023

I can do five connections with it, but concurrent Bluetooth connection. Establishment is flaky at best.

You would be better off, adding a two
Or three Bluetooth proxy nearest each set of blinds if you want concurrency

@Erudition
Copy link

The broadcom adapter I use is natively supported by the kernel
BCM2046B1
and the firmware is loading correctly, and it works on other Linux machines.

Yet for some reason HomeAssistant Green keeps reloading the device over and over for me as well.

2024-01-16 23:26:24.860 DEBUG (MainThread) [btsocket.btmgmt_protocol] Socket Read: <event_code=CommandCompleteEvent, controller_idx=0, param_len=283> <command_opcode=ReadControllerInformation, status=Success> <address=69:01:2E:09:06:06, bluetooth_version=4, manufacturer=15, supported_settings=70143, current_settings={Powered: False, Connectable: False, FastConnectable: False, Discoverable: False, Bondable: True, LinkLevelSecurity: False, SecureSimplePairing: True, BREDR: True, HighSpeed: False, LowEnergy: False, Advertising: False, SecureConnections: False, DebugKeys: False, Privacy: False, ControllerConfiguration: False, StaticAddress: False, PHYConfiguration: False, WidebandSpeech: False}, class_of_device=7077888, name=b'homeassistant', short_name=0>
2024-01-16 23:26:24.885 DEBUG (MainThread) [bluetooth_auto_recovery.recover] Bouncing Bluetooth adapter hci0
2024-01-16 23:26:24.886 DEBUG (MainThread) [bluetooth_auto_recovery.recover] Setting hci0 down
2024-01-16 23:26:25.511 DEBUG (MainThread) [bluetooth_auto_recovery.recover] Setting hci0 up
2024-01-16 23:26:26.089 DEBUG (MainThread) [bluetooth_auto_recovery.recover] Finished bouncing hci0
2024-01-16 23:26:26.092 DEBUG (MainThread) [btsocket.btmgmt_protocol] Encoding powered as type IntUL
2024-01-16 23:26:26.093 DEBUG (MainThread) [btsocket.btmgmt_protocol] Encoding cmd_code as type CmdCode
2024-01-16 23:26:26.095 DEBUG (MainThread) [btsocket.btmgmt_protocol] Encoding controller_idx as type Controller
2024-01-16 23:26:26.096 DEBUG (MainThread) [btsocket.btmgmt_protocol] Encoding param_len as type ParamLen
2024-01-16 23:26:26.099 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding event_code as type EvtCode
2024-01-16 23:26:26.100 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding controller_idx as type Controller
2024-01-16 23:26:26.102 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding param_len as type ParamLen
2024-01-16 23:26:26.105 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding command_opcode as type CmdCode
2024-01-16 23:26:26.107 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding status as type Status
2024-01-16 23:26:26.108 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding current_settings as type CurrentSettings
2024-01-16 23:26:26.111 DEBUG (MainThread) [btsocket.btmgmt_protocol] Socket Read: <event_code=CommandCompleteEvent, controller_idx=0, param_len=7> <command_opcode=SetPowered, status=Success> <current_settings={Powered: True, Connectable: False, FastConnectable: False, Discoverable: False, Bondable: True, LinkLevelSecurity: False, SecureSimplePairing: True, BREDR: True, HighSpeed: False, LowEnergy: False, Advertising: False, SecureConnections: False, DebugKeys: False, Privacy: False, ControllerConfiguration: False, StaticAddress: False, PHYConfiguration: False, WidebandSpeech: False}>
2024-01-16 23:26:26.115 DEBUG (MainThread) [btsocket.btmgmt_protocol] Encoding cmd_code as type CmdCode
2024-01-16 23:26:26.117 DEBUG (MainThread) [btsocket.btmgmt_protocol] Encoding controller_idx as type Controller
2024-01-16 23:26:26.117 DEBUG (MainThread) [btsocket.btmgmt_protocol] Encoding param_len as type ParamLen
2024-01-16 23:26:26.129 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding event_code as type EvtCode
2024-01-16 23:26:26.131 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding controller_idx as type Controller
2024-01-16 23:26:26.132 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding param_len as type ParamLen
2024-01-16 23:26:26.133 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding command_opcode as type CmdCode
2024-01-16 23:26:26.133 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding status as type Status
2024-01-16 23:26:26.134 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding address as type Address
2024-01-16 23:26:26.135 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding bluetooth_version as type IntUL
2024-01-16 23:26:26.136 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding manufacturer as type IntUL
2024-01-16 23:26:26.138 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding supported_settings as type IntUL
2024-01-16 23:26:26.139 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding current_settings as type CurrentSettings
2024-01-16 23:26:26.139 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding class_of_device as type IntUL
2024-01-16 23:26:26.140 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding name as type Name
2024-01-16 23:26:26.141 DEBUG (MainThread) [btsocket.btmgmt_protocol] Decoding short_name as type IntUL
2024-01-16 23:26:26.141 DEBUG (MainThread) [btsocket.btmgmt_protocol] Socket Read: <event_code=CommandCompleteEvent, controller_idx=0, param_len=283> <command_opcode=ReadControllerInformation, status=Success> <address=69:01:2E:09:06:06, bluetooth_version=4, manufacturer=15, supported_settings=70143, current_settings={Powered: True, Connectable: False, FastConnectable: False, Discoverable: False, Bondable: True, LinkLevelSecurity: False, SecureSimplePairing: True, BREDR: True, HighSpeed: False, LowEnergy: False, Advertising: False, SecureConnections: False, DebugKeys: False, Privacy: False, ControllerConfiguration: False, StaticAddress: False, PHYConfiguration: False, WidebandSpeech: False}, class_of_device=7077888, name=b'homeassistant', short_name=0>
2024-01-16 23:26:26.144 DEBUG (MainThread) [bluetooth_auto_recovery.recover] Power state of bluetooth adapter hci0 [69:01:2E:09:06:06] is ON after power cycle
2024-01-16 23:28:17.839 DEBUG (MainThread) [homeassistant.components.bluetooth] Rediscovered adapters: {'hci0': {'address': '69:01:2E:09:06:06', 'sw_version': 'homeassistant', 'hw_version': 'usb:v1D6Bp0246d0546', 'passive_scan': False, 'manufacturer': 'Broadcom Corp', 'product': 'BCM2046B1', 'vendor_id': '0a5c', 'product_id': '2046'}}

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants