extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Ble extension

Open spammads opened this issue 2 years ago • 6 comments
trafficstars

I know it’s a very niche thing. But for days I’m trying to get one of my Nodes to provision a matter-device. Bluetooth is needed during the comissioning-process. Would be great if Ble could be provided via an extension. Nevertheless thanks for this great and stable operating system.

spammads avatar Oct 11 '23 13:10 spammads

You should be able to just attach a device (per /dev path) to the container. I use a Zigbee USB stick with zigbee2mqtt in a container, and it works without issues.

Plug in the USB adapter, check the ID by using talosctl ls /dev/serial/by-id and use a hostPath volume to mount that path.

Preisschild avatar Oct 15 '23 17:10 Preisschild

I don't think so. Bluetooth needs Kernelmodules. And i need Dbus to run.

spammads avatar Oct 16 '23 06:10 spammads

Any ideas? Its def not niche, i have a bunch of iBeacons Id like to capture data from

I have a container with priviledged, all caps, host network and mounted dbus, it still shows no BLE Its not a serial device so it wont show up in /dev/serial

192.168.4.119: kern:    info: [2024-01-18T19:18:48.293803009Z]: usb 1-6.1.4: new full-speed USB device number 8 using xhci_hcd
 SUBSYSTEM=usb
 DEVICE=+usb:1-6.1.4

Im assuming it goes to /dev but im unable to find out where

In a privileged pod (only dbus mounted)

/ # lsusb | grep 0a12:0001
Bus 001 Device 008: ID 0a12:0001

and

✗ k get node/server -oyaml | grep e0_0a12_0001
    feature.node.kubernetes.io/usb-e0_0a12

myoung34 avatar Jan 20 '24 19:01 myoung34

I'm believe for using bluetooth with talos you will have to build your own kernel (see https://www.talos.dev/v1.6/advanced/customizing-the-kernel/) with relevant kernel config parameters enabled (see e.g. https://github.com/torvalds/linux/blob/master/net/bluetooth/Kconfig).

I've also found some articles about running the BlueZ daemon inside a pod (e.g. https://medium.com/omi-uulm/how-to-run-containerized-bluetooth-applications-with-bluez-dced9ab767f6).

stereobutter avatar Feb 02 '24 08:02 stereobutter

If/when talos gains the ability to load kernel modules signed with keys other then those generated (and thrown away) building the kernel it would also be possible to build a kernel with bluetooth as modules and package those in a talos system extension I think.

stereobutter avatar Feb 02 '24 08:02 stereobutter

There is also an issue on pkgs already.

stereobutter avatar Feb 02 '24 13:02 stereobutter