Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

total other topic..... question for help about driver #1

Closed
Maximus48p opened this issue Nov 3, 2022 · 8 comments
Closed

total other topic..... question for help about driver #1

Maximus48p opened this issue Nov 3, 2022 · 8 comments
Assignees
Labels

Comments

@Maximus48p
Copy link

Hi dml,

You helpt me with the CH431 driver for QNAP kernel 5.10.60, see juliagoda/CH341SER#6 (comment)

No other way to contact you, but i'm having a similar issue for the Asus BT-500 USB Bluetooth dongle driver.

I was hoping you can help me with this? If not, no worries, just a lucky shot from my side :) and sorry for bothering.

But if you can ......

I already found some info on the internet;
https://forum.manjaro.org/t/need-assistance-with-asus-bt500-5-0-bluetooth-dongle-to-download-driver-on-linux-manjaro/82722/36
and
https://github.com/Elif-dot/RTL8761BU/blob/master/Readme.txt

I'm not able to compile yet for myself. No clue where to start.

Thanks in advanced.
Max.
[email protected]

@D0m3L
Copy link
Owner

D0m3L commented Nov 3, 2022

Hey @Maximus48p, glad to read the CH431 works on your env!
If I understood you correctly, you are looking for a QNAP 5.10 build of RTL8761BU that should be working with your usb BT-500 USB dongle.
Give it a try with this module: https://we.tl/t-HZPsHaxqe9
it was compiled based on https://github.com/Elif-dot/RTL8761BU/ source code.
Hope it works!
/dml

@Maximus48p
Copy link
Author

Seems to work!!! Not sure how i can really check it.

[/dev] # dmesg | grep -iC 3 "usb"
[125837.396050] br-1b5204a971a6: port 1(vethaabc7ae) entered disabled state
[125837.403289] device vethaabc7ae left promiscuous mode
[125837.408363] br-1b5204a971a6: port 1(vethaabc7ae) entered disabled state
[125842.007700] rtk_btusb: Realtek Bluetooth USB driver ver 3.1
[125842.013373] rtk_btcoex: rtk_btcoex_init: version: 1.2
[125842.018519] rtk_btcoex: create workqueue
[125842.022620] rtk_btcoex: alloc buffers 1792, 2432 for ev and l2
[125842.028612] usbcore: registered new interface driver rtk_btusb
[125897.231394] br-1b5204a971a6: port 1(vethb05f591) entered blocking state
[125897.238122] br-1b5204a971a6: port 1(vethb05f591) entered disabled state
[125897.241883] !@[/etc/init.d/net_event_setup.sh]rename_trct_nic() called

Thank you so much dml!
Saves me a ton of work, so many thanks!
Next step is connect to docker....

@D0m3L
Copy link
Owner

D0m3L commented Nov 4, 2022

Seems to work!!! Not sure how i can really check it.

[125842.007700] rtk_btusb: Realtek Bluetooth USB driver ver 3.1

Nice!

With BT module working just try:
btmon - to check what BT dongle "hear"
hciconfig - to check if BT interface is up and running (e.g.: hci0: Type: BR/EDR Bus: USB)

For a docker or rather Container station configuration in QNAP I strongly suggest to create a docker container with "--net=host" (Network Mode: Host) as with any other (NAT/Bridge) you may struggle difficulties. In fact I was not able to properly map host usb device with docker container (even if I made ton of tests and cfg combination).
With --net=host you should be able to access QNAP USB resources without any problems. Finger crossed.

Have fun!
/dml

@Maximus48p
Copy link
Author

Step further...

From within the docker container it works!

hcitool scan
hcitool lescan

both gives good results.

Next step to make it work with home assistant
BLE is working but bluetooth is not.
https://www.home-assistant.io/integrations/bluetooth

I have installed Bluez on my Qnap
first installed Entware-std
then: opkg install bluez-libs bluez-utils
Or should i install bluez within the docker container? opkg command does not work within the container.

added the volumes to my home-assistant docker:

  • /sys/class/bluetooth:/sys/class/bluetooth
  • /var/lib/bluetooth:/var/lib/bluetooth

But now i'm stuck. commands like systemctl don't work on Qnap.

although BLE integration in home-assistant does work! but not the bluetooth integration.

again, thx for helping!

@D0m3L
Copy link
Owner

D0m3L commented Nov 4, 2022

I think any required tools should be available under HA docker container. If the device is working within docker container then it should be discovered out of the box.
Personally I'm not using bluetooth integration in HA (only BLE) thus won't be able to support.

/dml

@Maximus48p
Copy link
Author

Maximus48p commented Nov 4, 2022

I would expect the same, but unfortunately it doesn't seems so easy.

anyway, your help is appreciated!

If i ever find out, i'll let you know.

@D0m3L D0m3L added the question label Nov 6, 2022
@D0m3L D0m3L self-assigned this Nov 6, 2022
@D0m3L
Copy link
Owner

D0m3L commented Nov 6, 2022

Next step to make it work with home assistant
BLE is working but bluetooth is not.
https://www.home-assistant.io/integrations/bluetooth

@Maximus48p There is a note in the requirements chapter that might make it impossible for current QNAP:

The host system should be running Linux kernel 5.15.62 or later.

as atm QNAP operates on 5.10 kernel.

But still, if you have installed bluez on QNAP host properly, you can give it a try by adding access to dbus under docker container (similarly to class/bluetooth).

Out of my curiosity - do you want to track mobile devices (presence) by Bluetooth, or is there any other purpose of using BT in your installation?

/dml

@Maximus48p
Copy link
Author

I saw the note about the kernel, but i thought i give it a try anyway.
Not enough time at the moment to dig in, will do it later. thx!
No particular reason, HA is very powerful, just trying things out. :)) Curious what kind of information it is able to fetch, distance, etc.

@D0m3L D0m3L closed this as completed Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants