bluetooth
bluetooth copied to clipboard
Failed to "enable BLE stack" on WSL2 > Ubuntu
Hello,
When i'm trying to run the example code (examples/scanner/main.go), i got this error:
panic: failed to enable BLE stack: AdapterExists: dial unix /var/run/dbus/system_bus_socket: connect: no such file or directory
My developement environement is an Ubuntu distro in Windows 11 WSL2 host.
Thank's by advance
Do you see a BLE adaptor/devices when using bluetoothctl?
Good blog post to read on why this is not working by default: https://www.xda-developers.com/wsl-connect-usb-devices-windows-11/
and if you want to build your own ble kernel: https://github.com/JPHutchins/WSL2-Linux-Kernel/tree/feature/usb/bluetooth