Setting up the UB400 Bluetooth Receiver within VirtualBox on MacOS

I’m trying to get bluetooth working on my HA setup which is running on VirtualBox on a macOS host machine but I can’t seem to get the integration to work with the dongle and have tried various troubleshooting steps before posting. According to VirtualBox it shows that the usb dongle has been “captured” (screenshot included below) and the error I see within HA is…

Logger: homeassistant.components.bluetooth_tracker.device_tracker
Source: components/bluetooth_tracker/device_tracker.py:73
Integration: bluetooth_tracker (documentation, issues)
First occurred: 11:34:35 AM (55 occurrences)
Last logged: 11:45:23 AM

Couldn't discover bluetooth devices: [Errno 19] No such device

and when Im looking at the full logs I see…

2022-03-15 11:46:59 ERROR (SyncWorker_0) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-03-15 11:47:11 ERROR (SyncWorker_1) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-03-15 11:47:23 ERROR (SyncWorker_2) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-03-15 11:47:35 ERROR (SyncWorker_4) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-03-15 11:47:47 ERROR (SyncWorker_0) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-03-15 11:47:59 ERROR (SyncWorker_3) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-03-15 11:48:11 ERROR (SyncWorker_6) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-03-15 11:48:23 ERROR (SyncWorker_2) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device
2022-03-15 11:48:35 ERROR (SyncWorker_4) [homeassistant.components.bluetooth_tracker.device_tracker] Couldn't discover bluetooth devices: [Errno 19] No such device

This is my setup specs just in case it’s needed…

macOS Monterey Version 12.2.1
Virtualbox Version 6.1.32 r 149290

Operating System:	Home Assistant OS 7.4
Supervisor Version: supervisor-2022.03.4
Core Version: core-2022.3.5

Bluetooth Adapter: TP-Link USB UB400 4.0 Bluetooth Dongle Receiver

Here is what I added to Configuration.yaml…

device_tracker:
  - platform: bluetooth_tracker
    new_device_defaults:
      track_new_devices: true

In terminal when I run “bluetoothctl” it says agent registered then “scan on” it says no default controller available

Screen Shot 2022-03-15 at 11.47.32 AM

At this point I get stuck as it appears the bluetooth dongle is attached and being captured but Home Assistant OS still can not see it for some reason.

I just wanted to ensure that I followup on my own post because I seem to have found a working solution by following the guide on this post very carefully: virtualbox.org • View topic - USB basics and troubleshooting

The key was setting up a “filter” and then starting HA and once its fully loaded then insert the USB dongle which is caught by the filter then passed along into HA properly. I was incorrectly selecting the device instead of doing the filter at first so lesson learned to read slower and follow the steps carefully.

3 Likes