bluetooth icon indicating copy to clipboard operation
bluetooth copied to clipboard

Failed to "enable BLE stack" on WSL2 > Ubuntu

Open Suniron opened this issue 3 years ago • 1 comments

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

Suniron avatar Aug 13 '22 20:08 Suniron

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

JOHNEPPILLAR avatar Dec 24 '22 08:12 JOHNEPPILLAR