BT Passthrough

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
You can do USB passthrough with the TrueCharts apps... is it counting as a USB device?
 

derekgaro

Cadet
Joined
Apr 27, 2023
Messages
6
I've read that the onboard wifi and bluetooth are usually listed together, and the onboard wifi shows up as a pci device, but bluetooth shows as a usb device in the VM add devices tab.
 

Attachments

  • Screen Shot 2023-05-15 at 5.04.12 AM.png
    Screen Shot 2023-05-15 at 5.04.12 AM.png
    214 KB · Views: 978
  • Screen Shot 2023-05-15 at 5.05.58 AM.png
    Screen Shot 2023-05-15 at 5.05.58 AM.png
    86.7 KB · Views: 974

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
So have a look at using it in the TrueCharts HA app.
 

derekgaro

Cadet
Joined
Apr 27, 2023
Messages
6
I'm not sure I understand. I assume it could be added under the usb tab, but I don't know how to find the device path.
 

Attachments

  • 1684167854407.png
    1684167854407.png
    24.6 KB · Views: 992

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Looks like you're in the right place... what's not making sense?

Can you not find which device path you want to share into the container? (looks like maybe it's /dev/ttyUSB0)

Do you not know what to share it as into the container? (can be the same as the host path if you see no reason to change it).
 

derekgaro

Cadet
Joined
Apr 27, 2023
Messages
6
I'm not sure how to find the device path for the onboard bluetooth past /dev/?. The USB0 is a zigbee stick that I've already successfully passed through.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
You probably just need to poke around a bit in /dev

ls /dev/ would be a start. Maybe ls /dev/usb/

EDIT: I think maybe more definitive would be:
ls -lA /sys/class/bluetooth/
 

sammael

Explorer
Joined
May 15, 2017
Messages
76
Hi, I'm trying to achieve the same, by plugging and unplugging the dongle I found it resides at /dev/bus/usb/001/005, but regardless what I pass to the truecharts ha it doesn't detect bluetooth. I tried /dev/bus/usb, /dev/bus/usb/001 and /dev/bus/usb/001/005 and all of those with and without privileged mode.

ls -lA /sys/class/bluetooth/ gives me
Code:
lrwxrwxrwx    1 root     root             0 May 20 20:26 hci0 -> ../../devices/pci0000:00/0000:00:08.1/0000:08:00.3/usb1/1-4/1-4:1.0/bluetooth/hci0
but I got no idea which part of that that use if any at all.

I then found https://www.truenas.com/community/threads/bluetooth-stack-feature-request.102787/, installed bluez on truenas host with
Code:
wget http://ftp.de.debian.org/debian/pool/main/b/bluez/bluez_5.55-3.1_amd64.deb && sudo dpkg -i bluez_5.55-3.1_amd64.deb


confirmed dongle works on truenas host:
Code:
root@truenas[~/btstack]# bluetoothctl
Agent registered
[CHG] Controller 00:1A:7D:DA:71:15 Pairable: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:15 Discovering: yes
[NEW] Device 30:B8:60:8F:19:CD 30-B8-60-8F-19-CD
[NEW] Device 30:BB:7D:12:EA:C2 R'lyeh
[NEW] Device A4:C1:38:0B:3D:40 GVH5075_3D40
[NEW] Device C4:7C:8D:6D:37:FA Flower care
[NEW] Device 00:C3:F4:F5:5E:57 [TV] Samsung 7 Series (50)
[CHG] Device 30:BB:7D:12:EA:C2 RSSI: -66
[NEW] Device C4:7C:8D:6B:3C:25 C4-7C-8D-6B-3C-25
[CHG] Device 30:BB:7D:12:EA:C2 RSSI: -57
[NEW] Device A4:C1:38:FC:A6:71 GVH5075_A671
[CHG] Device 30:BB:7D:12:EA:C2 RSSI: -70
[NEW] Device 58:2D:34:60:5D:BD Qingping Motion & Light
[CHG] Device 00:C3:F4:F5:5E:57 Class: 0x0008043c
[CHG] Device 00:C3:F4:F5:5E:57 Icon: audio-card
[CHG] Device C4:7C:8D:6B:3C:25 Name: Flower care
[CHG] Device C4:7C:8D:6B:3C:25 Alias: Flower care
[bluetooth]# scan off
Discovery stopped


running bluetoothctl on the ha app shell:
Code:
Waiting to connect to bluetoothd...dbus[134]: arguments to dbus_connection_get_object_path_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5921.
This is normally a bug in some application using the D-Bus library.


  D-Bus not compiled with backtrace support so unable to print a backtrace
Aborted

running hciconfig inside ha app shell:
Can't open HCI socket.: Address family not supported by protocol

Any advice welcome, thanks!

note I already have a physical HA and HA vm and HA docker container on different host in all of which I can pass through the dongle, I specifically want to achieve the passthrough for TC app.
 
Joined
Jul 19, 2023
Messages
2
Hi, I'm trying to achieve the same, by plugging and unplugging the dongle I found it resides at /dev/bus/usb/001/005, but regardless what I pass to the truecharts ha it doesn't detect bluetooth. I tried /dev/bus/usb, /dev/bus/usb/001 and /dev/bus/usb/001/005 and all of those with and without privileged mode.

ls -lA /sys/class/bluetooth/ gives me
Code:
lrwxrwxrwx    1 root     root             0 May 20 20:26 hci0 -> ../../devices/pci0000:00/0000:00:08.1/0000:08:00.3/usb1/1-4/1-4:1.0/bluetooth/hci0
but I got no idea which part of that that use if any at all.

I then found https://www.truenas.com/community/threads/bluetooth-stack-feature-request.102787/, installed bluez on truenas host with
Code:
wget http://ftp.de.debian.org/debian/pool/main/b/bluez/bluez_5.55-3.1_amd64.deb && sudo dpkg -i bluez_5.55-3.1_amd64.deb


confirmed dongle works on truenas host:
Code:
root@truenas[~/btstack]# bluetoothctl
Agent registered
[CHG] Controller 00:1A:7D:DA:71:15 Pairable: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:15 Discovering: yes
[NEW] Device 30:B8:60:8F:19:CD 30-B8-60-8F-19-CD
[NEW] Device 30:BB:7D:12:EA:C2 R'lyeh
[NEW] Device A4:C1:38:0B:3D:40 GVH5075_3D40
[NEW] Device C4:7C:8D:6D:37:FA Flower care
[NEW] Device 00:C3:F4:F5:5E:57 [TV] Samsung 7 Series (50)
[CHG] Device 30:BB:7D:12:EA:C2 RSSI: -66
[NEW] Device C4:7C:8D:6B:3C:25 C4-7C-8D-6B-3C-25
[CHG] Device 30:BB:7D:12:EA:C2 RSSI: -57
[NEW] Device A4:C1:38:FC:A6:71 GVH5075_A671
[CHG] Device 30:BB:7D:12:EA:C2 RSSI: -70
[NEW] Device 58:2D:34:60:5D:BD Qingping Motion & Light
[CHG] Device 00:C3:F4:F5:5E:57 Class: 0x0008043c
[CHG] Device 00:C3:F4:F5:5E:57 Icon: audio-card
[CHG] Device C4:7C:8D:6B:3C:25 Name: Flower care
[CHG] Device C4:7C:8D:6B:3C:25 Alias: Flower care
[bluetooth]# scan off
Discovery stopped


running bluetoothctl on the ha app shell:
Code:
Waiting to connect to bluetoothd...dbus[134]: arguments to dbus_connection_get_object_path_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5921.
This is normally a bug in some application using the D-Bus library.


  D-Bus not compiled with backtrace support so unable to print a backtrace
Aborted

running hciconfig inside ha app shell:
Can't open HCI socket.: Address family not supported by protocol

Any advice welcome, thanks!
bad time simulator

note I already have a physical HA and HA vm and HA docker container on different host in all of which I can pass through the dongle, I specifically want to achieve the passthrough for TC app.
Firstly, it's important to ensure that the Bluetooth service is running on the device or system. You can check this by running the command "sudo service bluetooth status" on Linux or "services.msc" on Windows and verifying that the Bluetooth service is running.
 

Sheophy91

Cadet
Joined
Jul 30, 2023
Messages
1
It is possible to pass through built-in Bluetooth to a Home Assistant container, but it depends on the specific hardware and operating system you are using. On a Linux-based operating system, you can use the --device flag when running the Home Assistant container to pass through the Bluetooth device to the container. For example, if your Bluetooth device is /dev/ttyUSB0.
 
Top