Coder Social home page Coder Social logo

Comments (8)

D0m3L avatar D0m3L commented on June 24, 2024

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

from rm-bridge.

Maximus48p avatar Maximus48p commented on June 24, 2024

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....

from rm-bridge.

D0m3L avatar D0m3L commented on June 24, 2024

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

from rm-bridge.

Maximus48p avatar Maximus48p commented on June 24, 2024

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!

from rm-bridge.

D0m3L avatar D0m3L commented on June 24, 2024

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

from rm-bridge.

Maximus48p avatar Maximus48p commented on June 24, 2024

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.

from rm-bridge.

D0m3L avatar D0m3L commented on June 24, 2024

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

from rm-bridge.

Maximus48p avatar Maximus48p commented on June 24, 2024

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.

from rm-bridge.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.