WSL: Bluetooth not supported (Built-in and USB-BT Adapter)

I am interested in running and accessing bluetooth through Bash. However, after trying to use the laptop’s Bluetooth chip and a USB adapter, both of which support BT 4.0, it seems like this is not supported.

root@localhost:/mnt/c/Users/guest1# sysv-rc-conf bluetooth on
root@localhost:/mnt/c/Users/guest1# sysv-rc-conf -list | grep bluetooth
    bluetooth    2:on       3:on    4:on    5:on
root@localhost:/mnt/c/Users/guest1# hcitool scan
    Device is not available: Address family not supported by protocol
root@localhost:/mnt/c/Users/guest1# service bluetooth start
    * Starting bluetooth                                                           Can't start daemon: No such device
    Can't open RFCOMM control socket: Address family not supported by protocol
                                                                     [ OK ]

Is there some property that I need to add in order for Bluetooth to be accessible, or is it due to a lack of permissions and accessibility to my hardware?

About this issue

  • Original URL
  • State: open
  • Created 11 years ago
  • Reactions: 63
  • Comments: 39 (2 by maintainers)

Most upvoted comments

Pretty excited for WSL2… tried out features…looking good until tried bluetooth hw access… nope!

Please add bluetooth support, this issue has been open since 2016 !

Adding to the above, there are a miriad enterprise use cases where direct hardware access, including BT is required to have functional access to infrastructure, this is a major flaw in the current WSL2 deployment which should see attention if WSL2 is to become useable as a real alternative to dual booting

Considering the major industry push for Edge AI and the prevalence of both Linux and BT within the field, this is a pretty serious pain point right now. Lack of hardware access in WSL is a crippling problem for rigorous development and testing.

Thanks for reporting this, currently we do not expose hardware to the Linux subsystem. I would suggest filing a request on our user voice page so we can prioritize this work.

Thanks! Ben

UserVoice is closed. Can this issue be reopened here?

So, there is WSL 2. Is the Bluetooth available now?

Aight, got rid of Microsoft Windows entirely. Case closed for me. Thanks anyways for the effort.

It would be nice if it was just enabled so people don’t have to compile their own kernel.

Is there any way to get a BT dongle to work in WSL2 right now?

Just use Mac. Microsoft is just a greedy company with nothing working the right way.

Please provide hardware access to network interfaces and serial port access in this IoT era.

This is one of the features requests that closed while UserVoice was still around. See also #237, which unlike this issue, remained arbitrarily open.

A little context, [edit] ~there are no sound devices let alone~ bluetooth devices in Hyper-V (the basis of WSL2). ~If or when sound (playback and recording) is implemented in WSL it would almost certainly happen a layer or two up, just like how sound works in most VMs.~

Which is to say, the OP hcitool scan is very probably not going to return anything for the foreseeable. Such a thing (call it “bluetooth radio device passthrough”) is possible in the very abstract hypothetical (see for example this analogy), especially if we get USB ref #2195. But that’s probably not how this is going to go down. For now, for sound, “stay tuned” (see what I did there?) and hit thumbs-up on #237 (for lack of a better landing zone for “sound devices”). The devs are aware that sound was a highly voted request on UserVoice. In the meantime ref #486 is a viable “layer or two up” alternative for the highly motivated, or at least was last time I looked a very long time ago.

USB passthrough support is finally here and following this xda article I have managed to pass my bluetooth adapter through to WSL. However, hciconfig etc. fail with errors similar to the following:

$ bluetoothctl
Waiting to connect to bluetoothd...dbus[2033]: arguments to dbus_connection_get_object_path_data() were incorrect, assertion "connection != NULL" failed in file ../../../dbus/dbus-connection.c line 5905.
This is normally a bug in some application using the D-Bus library.

modprobing bluetooth also fails since apparently there are no kernel modules in WSL at all, shown by empty output from lsmod.

Bluetooth on wsl would be really useful especially in situations where low level access to bluetooth hardware is required.

For anyone who lands here from Google, the Bluetooth support request would be:

https://wpdev.uservoice.com/forums/266908-command-prompt-console-windows-subsystem-for-l/suggestions/33277174-add-suppor-to-bluetooth-on-wsl

Someone in the comments says there is a more general hardware access request, but in the top ones, all I see are specific file systems, USB, graphics related stuff etc. requests, nothing mentioning Bluetooth among other hardware in a general hardware request, so I think it’s better to vote for BT access directly through the above link.

I would like to access Bluetooth HW of my laptop via WLS2. How can I do that? The question was asked in April 2016 and still no support?

I have passed a “Pluggable” BCM 2070 Bluetooth USB dongle from Windows 10 to WSL2 5.10.60.1-microsoft-standard-WSL2+ using the tools:

https://github.com/dorssel/usbipd-win ~~https://github.com/arkane-systems/genie~~ have since found that this is not needed

Follow and contribute to the thread here as we document and refine: https://github.com/dorssel/usbipd-win/issues/278#issuecomment-1066308372

USB passthrough support is finally here and following this xda article I have managed to pass my bluetooth adapter through to WSL. However, hciconfig etc. fail with errors similar to the following:

$ bluetoothctl
Waiting to connect to bluetoothd...dbus[2033]: arguments to dbus_connection_get_object_path_data() were incorrect, assertion "connection != NULL" failed in file ../../../dbus/dbus-connection.c line 5905.
This is normally a bug in some application using the D-Bus library.

modprobing bluetooth also fails since apparently there are no kernel modules in WSL at all, shown by empty output from lsmod.

Bluetooth on wsl would be really useful especially in situations where low level access to bluetooth hardware is required.

I tried a bit further from there with assistance from @dorssel in https://github.com/dorssel/usbipd-win/issues/278. I built a custom WSL2 kernel with support for bluetooth and bluetooth drivers. However, unfortunately that still does not make it work…

@JPHutchins I followed your tutorial:

[https://github.com/dorssel/usbipd-win/wiki/WSL-support#building-your-own-usbip-enabled-wsl-2-kernel]

However, I’m stuck at the following command: cp arch/x86/boot/bzImage /mnt/c/Users/<user>/usbip-bzImage

In ~/WSL2-Linux-Kernel/arch/x86/boot/ there is no bzImage file

What am I doing wrong? 😦

@Diegorro98 Good point, you DO have to compile it for now. If Microsoft merged and released you wouldn’t.

That branch is intended as something mergeable to WSL2 main. You’d probably prefer to run menuconfig first and select what you need.

Try this to compile the kernel:

sudo make -j 8 && sudo make modules_install -j 8 && sudo make install -j 8

Refer to the guide here: https://github.com/dorssel/usbipd-win/wiki/WSL-support#building-your-own-usbip-enabled-wsl-2-kernel

I’m trying to find a way to reduce Bluetooth audio lag in Windows 10. I’m running out of options (clearly, or I’d not be considering WSL to solve this) - if Bluetooth audio was somehow able to be piped through WSL (and hopefully better drivers) would this be some way to get latency down? It’s currently ~150ms, which makes everything look dubbed.

The hardware (XPS 9510 with soldered-on Killer ax1650s) works perfectly with minimal latency when I use Linux Mint.