BLE USB device to development environment

Hello,

I started developing a custom component with BLE support. Now I want to add a BLE dongle to my development environment.
Im running the environment on Windows 11 with Visual Studio Code (like this: Set up development environment | Home Assistant Developer Docs).

Can anyone explain how I can access the dongle inside the docker environment? I bought a Feasycom FSC-BP119 for that purpose.

If you plugged the dongle into your pc, you’ll have to pass it through to the docker container.

To enable USB passthrough in Docker, you typically need to specify the USB device in your docker-compose.yml file using the devices key, mapping the USB device from the host to the container. However, on Windows and macOS, direct USB passthrough is not supported in Docker Desktop, and you may need to use a workaround like USB/IP or run Docker in a Linux VM. docker usb passthrough at DuckDuckGo

If you are going to develop a BLE application, check out the Esphome project since many ESP32 devices can be configured to act as Bluetooth proxies and this way you won’t have to connect anything physically to the environment you are setting up.

Hello

Thanks for the reply. I tried with a Bluetooth Proxy, which works fine for receiving advertising data. But as far as i know bluetooth proxies are not able to pair with a Device permanently. And thats what I need.

I will try to do it with a VM and linux. :+1:t2:

1 Like

Im still trying to set up a VM. I installed Ubuntu 24.04.03 and now im getting an error. This is my log: Running home assistant in dev environment with vscode unter ubuntu 24 is gicing - Pastebin.com

It seems that docker is using python 3.14.0
" => => # Using Python 3.14.0 environment at: /home/vscode/.local/ha-venv "

And then I get this error in the end:
“the configured Python interpreter version (3.14) is newer than PyO3’s maximum supported version (3.13)”

“ERROR: failed to solve: process “/bin/bash -o pipefail -c uv pip install -r requirements_test.txt” did not complete successfully: exit code: 1”

Its strange because my dockerfile contains this at the start:

WORKDIR /usr/src
COPY --from=Package uv · GitHub /uv /usr/local/bin/uv
RUN uv python install 3.13.2

Ok Im now able to run the dev environment in ubuntu with virtualBox. But I cant get the BLE dongle running inside linux. lsusb is never detecting it even though I added it in virtual box …

Been a while since I used virtualbox, have you installed the extension by any chance? VirtualBox USB passthrough - how to enable USB in VirtualBox

Hello,

Yes i installed the Extension and the usb showed up in the selection. But it never showed up in linux (lsusb).

(FYI: I’m going to continue asking dumb questions until something comes up)

  • You happened to reboot the VM after the usb package?
  • Can you try running Virtualbox as an administrator
  • I read some USB pass through does not work if plugged into a USB3 port while trying to emulate a USB2

Yeah im thankful for stupid questions :joy:

I rebooted everything (even Host System) multiple times
I tried usb2 and usb3 slots (Both directly in the Mainboard)
I tried to select usb2 and usb3 in virtualbox
I disabled the BLE driver in Windows
I ran Virtualbox as Administrator

Guess I have no Choice but Running linux directly on the pc. Maybe I try with a usb Stick and Boot from that.

Say, did you read this by any chance? :sweat_smile:

Booting a Linux from USB is super easy, just make sure you leave some room on the stick where you can install everything you want to build/run. Otherwise you will have to redo everything every time you boot.

1 Like