This is my setup to get bluetooth BCM20702A1 working on my unraid box that runs HA in a container.
Hello! I have managed to make this usb dongle work on unraid but I cant seem to make it show up in the container.
Dongle is Asus bt400
This is my current setup:
- downlaoded bluetooth dongle fw from this repo GitHub - winterheart/broadcom-bt-firmware: Repository for various Broadcom Bluetooth firmware
- copied it over to the boot/firmware/brmc folder (had to create)
cp /mnt/user/backup/BCM20702A1-0b05-17cb.hcd /lib/firmware/brcm/
- Replugged usb
- downloaded bluez
wget -P /boot/extra https://slackware.uk/slackware/slackware64-15.0/slackware64/n/bluez-5.63-x86_64-2.txz
- installed bluez using
installpkg /boot/extra/bluez-5.63-x86_64-2.txz
- Made the device show up in unraid as hci0 using
hciconfig, hciconfig hci0 up
, - I can scan devices etc with
hcitool lescan
- I passed the PATH of the device to the HA container running in privileged mode, running. (ID from lsusb)
/dev/bus/usb/001/007 -> /dev/bus/usb/001/007
- I try installing bluetooth or running hcitool inside HA container, get nothing.
- I passed a
/run/dbus
as read-only path. When I try to install the HA bluetooth integration I get the following error:
Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble
2023-06-21 05:43:54.150 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 471, in async_add_entities
await asyncio.gather(*tasks)
File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/entity_platform.py", line 711, in _async_add_entity
raise HomeAssistantError(f"Invalid entity ID: {entity.entity_id}")
homeassistant.exceptions.HomeAssistantError: Invalid entity ID: switch.unraid_vm_windows_11_usb_nbsp_nbsp_nbsp_nbsp_nbsp_nbsp_nbsp_input_type_checkbox_name_usbopt_1b1c_1c0c_id_usbopt2_value_1b1c_1c0c_nbsp_nbsp_nbsp_nbsp_nbsp_input_type_number_size_5_maxlength_5_id_usbboot2_class_narrow_bootorder_style_width_50px_name_
2023-06-21 05:44:01.340 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/http/view.py", line 148, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/config/config_entries.py", line 149, in post
return await super().post(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/helpers/data_entry_flow.py", line 71, in post
result = await self._flow_mgr.async_init(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/config_entries.py", line 845, in async_init
flow, result = await task
^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/config_entries.py", line 873, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/bluetooth/config_flow.py", line 143, in async_step_user
return await self.async_step_multiple_adapters()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/homeassistant/components/bluetooth/config_flow.py", line 103, in async_step_multiple_adapters
await bluetooth_adapters.refresh()
File "/lsiopy/lib/python3.11/site-packages/bluetooth_adapters/systems/linux.py", line 33, in refresh
await self._bluez.load()
File "/lsiopy/lib/python3.11/site-packages/bluetooth_adapters/dbus.py", line 30, in load
self._packed_managed_objects = await _get_dbus_managed_objects()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/bluetooth_adapters/dbus.py", line 94, in _get_dbus_managed_objects
bus = await MessageBus(bus_type=BusType.SYSTEM).connect()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/dbus_fast/aio/message_bus.py", line 235, in connect
return await future
^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/dbus_fast/aio/message_bus.py", line 214, in on_hello
raise err
File "/lsiopy/lib/python3.11/site-packages/dbus_fast/aio/message_reader.py", line 24, in _message_reader
message = unmarshaller._unmarshall()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/dbus_fast/_private/unmarshaller.py", line 662, in _unmarshall
self._read_header()
File "/lsiopy/lib/python3.11/site-packages/dbus_fast/_private/unmarshaller.py", line 536, in _read_header
self._read_to_pos(HEADER_SIGNATURE_SIZE)
File "/lsiopy/lib/python3.11/site-packages/dbus_fast/_private/unmarshaller.py", line 282, in _read_to_pos
data = self._stream_reader(missing_bytes) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/socket.py", line 706, in readinto
return self._sock.recv_into(b)
^^^^^^^^^^^^^^^^^^^^^^^
ConnectionResetError: [Errno 104] Connection reset by peer