[ KernelModules ] Kernel module USB drivers

Discussion on apps, protocols, APIs, specifications, and more. You are welcome to join us as a TOS app developer!
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [ KernelModules ] Kernel module USB drivers

Post by outkastm »

For what exactly you want to use the bluetooth adapter ?
Bluetooth dongles doesn't work in the same way as USB-serial adapters or Z-Wave, Zigbee etc. You will not get a tty device.

At this moment with the kernel drivers you only have the adapter available in TOS.

Code: Select all

[ 1489.787038] usb 1-2.1: new full-speed USB device number 7 using xhci_hcd
[ 1489.887936] usb 1-2.1: New USB device found, idVendor=0bda, idProduct=8771, bcdDevice= 2.00
[ 1489.887944] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1489.887947] usb 1-2.1: Product: Bluetooth Radio
[ 1489.887950] usb 1-2.1: Manufacturer: Realtek
[ 1489.887952] usb 1-2.1: SerialNumber: xxxxxx
[ 1489.896318] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000b lmp_ver=0a lmp_subver=8761
[ 1489.897312] Bluetooth: hci0: RTL: rom_version status=0 version=1
[ 1489.897318] Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_fw.bin
[ 1489.955127] Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_config.bin
[ 1489.955331] Bluetooth: hci0: RTL: cfg_sz 14, total sz 11678
[ 1490.027308] Bluetooth: hci0: RTL: fw version 0x097bec43
To go further with configure the adapter, you need the BlueZ tool

Code: Select all

[user@TNAS-XXXX ~]# /usr/local/BlueZ/sys/bin/bluetoothctl list
Controller 00:E0:4C:23:XX:XX BlueZ 5.66 [default]
[user@TNAS-XXXX ~]# /usr/local/BlueZ/sys/bin/bluetoothctl
Agent registered
[CHG] Controller 00:E0:4C:23:XX:XX Pairable: yes
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 00:E0:4C:23:XX:XX Powered: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:E0:4C:23:XX:XX Discovering: yes
[NEW] Device D4:5E:EC:XX:XX:XX D4-5E-EC-XX-XX-XX
[NEW] Device C8:B2:1E:XX:XX:XX SANITAS SBF70
[CHG] Device D4:5E:EC:XX:XX:XX LegacyPairing: no
[CHG] Device D4:5E:EC:XX:XX:XX Name: MIBOX4
[CHG] Device D4:5E:EC:XX:XX:XX Alias: MIBOX4
User avatar
XFNeo
Posts: 90
Joined: 10 Oct 2022, 23:18

Re: [ KernelModules ] Kernel module USB drivers

Post by XFNeo »

{L_BUTTON_AT}outkastm

Thanks. I want to use it in docker containers (homeassistan e.g.)
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [ KernelModules ] Kernel module USB drivers

Post by outkastm »

Then search for bluez containers and so on. Your bluetooth adapter is visible by TOS.
I've test it with my native Bluez and HomeAssistent apps.
User avatar
XFNeo
Posts: 90
Joined: 10 Oct 2022, 23:18

Re: [ KernelModules ] Kernel module USB drivers

Post by XFNeo »

outkastm wrote: 26 May 2023, 23:11 Then search for bluez containers and so on. Your bluetooth adapter is visible by TOS.
I've test it with my native Bluez and HomeAssistent apps.
Hi! Could you advice how to install bluez in tnas?

I have added dbus to HA container(- /run/dbus:/run/dbus:ro) asrecommended here https://www.home-assistant.io/integrati ... d-installs and enable bluetooth in container:

Code: Select all

TNAS-HA:/config# hciconfig hci0 up
TNAS-HA:/config# hciconfig 
hci0:   Type: Primary  Bus: USB
        BD Address: 00:E0:4C:21:D6:13  ACL MTU: 1021:6  SCO MTU: 255:12
        UP RUNNING 
        RX bytes:5222 acl:0 sco:0 events:206 errors:0
        TX bytes:13453 acl:0 sco:0 commands:195 errors:0

TNAS-HA:/config# hcitool dev
Devices:
        hci0    00:E0:4C:21:D6:13
But in integration I got an error: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files
May be I need to install Bluez on TNAS system or something else?
User avatar
XFNeo
Posts: 90
Joined: 10 Oct 2022, 23:18

Re: [ KernelModules ] Kernel module USB drivers

Post by XFNeo »

For home-assistance is recommended to install dbus-broker, bluez and enable service: sudo systemctl enable dbus-broker.service
Is it possible to do on TNAS ?
User avatar
antonz
Posts: 1
Joined: 12 Feb 2024, 21:50

Re: [ KernelModules ] Kernel module USB drivers

Post by antonz »

Hi all. What about a version of this package for TOS6?
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [ KernelModules ] Kernel module USB drivers

Post by outkastm »

TOS6 is not even in beta stage, this module will not be released before we get a stable TOS6 version as the kernel can suffer a lot of modifications by then.
User avatar
psznt
Posts: 2
Joined: 14 Feb 2024, 02:06

Re: [ KernelModules ] Kernel module USB drivers

Post by psznt »

Hi - I'm trying to add a Sonoff ZBDongle-E to my Terra-Master T6-423. I installed Kernal Module, but don't know which .ko modules to enable for it. Also, once I enable them, where will I see the USB? Thanks for the help
User avatar
outkastm
Posts: 1185
Joined: 29 Dec 2020, 23:52

Re: [ KernelModules ] Kernel module USB drivers

Post by outkastm »

try with cp210x

then reboot your NAS and type in ssh

Code: Select all

ls -l /dev/serial/by-id
User avatar
psznt
Posts: 2
Joined: 14 Feb 2024, 02:06

Re: [ KernelModules ] Kernel module USB drivers

Post by psznt »

hi - thanks for the quick reply. When I do, it kills my Home Assistant in Terra-Master, running through Virtualbox... Any idea why that is?
Post Reply