Add USB Device Support
This ask is specifically for adding USB Device support to WSL - i.e. exposing USB busses and devices to the OS.
This is NOT an ask for adding the ability to communicate with external USB peripherals like phones, IoT boards, etc. - those asks are elsewhere:
Adjusting status to re-open this ask as there are many types of USB device that aren’t storage/serial that y’all are asking for.
1. Please be sure to articulate why you feel your particular device support is required
2. Note that non-developer/testing/etc. type scenarios are unlikely to get traction
Stefan Lasiewski commented
For those of you asking for USB Smartcard support in WSL, please vote for and promote the following issue:
hope accessing Android devices via ADB
Using WSL with Ubuntu for cross-compiler development. Full USB support is much needed for In-Circuit Debuggers and Flashers such as Segger JLink, ST-Link, etc.
For me, one of the great things about wsl is being able to do a lot of my monte carlo development work with it. But, there are lots of times where I need to move files between WSL and a cluster via USB key. It would be nice if I could keep my usb keys in a linux only format and not exfat for security and journaling purposes.
I was wanting to interface a USB tuner stick to get at the raw signal data. The data looks like a stream of A-D samples at about 1 million sample/second.
Accessing other A-D devices would also be very useful.
Michael Cramer commented
This was so I could mount a usb with my ssh keys on it so I could use ssh from bash, but putty is better anyways probably, so I'm not sure I would even use it.
USB serial communication, as 3G/4G dongles for the networking and VOIP support. Bluetooth USB dongles. There are some software on Linux with no Windows analogues. It would be perfect solution if one could use any USB device on Win-linux if it is generally possible.
I would like to see support for security tokens, specifically ones supporting opensc (via libusb). This would allow ssh agent to use the secure key store.
Ilias G commented
I would like to see support for two types of devices:
1) Programming FPGAs (typically done over JTAG)
2) Accessing Android devices via ADB
Both are typical development scenarios, where Linux tools are better/more common/more supported.
This was marked completed, but there's still no access to USB serial communications. USB bluetooth dongles, LAN connectors and other peripherals are not directly accessible from Ubuntu.
One way to do this is to allow the user to selectively bypass Windows recognition of a device, and instead make them available to the linux subsystem.
Another is to provide services, one service at a time, like mounting usb sticks, and bluez library support.... that call through to Windows api's.
The first is generic and will work with any USB device. The second is specific to each type of device.
It would be nice to have this feature... It is a shame that VMs have this for many years now. Just a USB filter... It is insane to mark this as completed...
Bagus Nur Listiyono commented
how abous android adb devices?
because some commands on android shell work better on linux bash
This isn't completed. My example is a USB bluetooth.
Oliver Aruväli commented
This request has been closed inappropriately - the feature explicitly states exposing USB buses and devices to the WSL AND NOT USB serial & mounting of FAT*/NTFS formatted USB. THe option of mounting devices is nice but does not help if I want't to use external USB signing tokens or hardware license keys.
This isn't completed. I need to use usb-based h/w on WSL to debug and test for my board. :(
I would also suggest to add a better support for UDF formatted USB. I have followed the above 20170418 blog post and it almost works. I can mount it but get some "garbage":
$ ls -lrt /mnt/e/tlrepo/
ls: impossibile accedere a '/mnt/e/tlrepo/update-tlmgr-latest.exe': Permesso negato
ls: impossibile accedere a '/mnt/e/tlrepo/update-tlmgr-latest.exe.sha512': Permesso negato
ls: impossibile accedere a '/mnt/e/tlrepo/update-tlmgr-latest.exe.sha512.asc': Permesso negato
-????????? ? ? ? ? ? update-tlmgr-latest.sh.sha512.asc
-????????? ? ? ? ? ? update-tlmgr-latest.sh.sha512
-????????? ? ? ? ? ? update-tlmgr-latest.sh
-r-xr-xr-x 1 root root 2185 nov 25 2016 install-tl-windows.bat
being /mnt/e/tlrepo a clone of ftp://tug.org/texlive/tlnet. It seems that it does not like symlinks on UDF FS (the clone has been done on GNU/Linux Mint 18.2).
Andrey Lukyanov commented
How about supporting USB smart cards - PKCS11
This feature may be very needed for IT professionals that manage both Windows and Linux computers using SSH where private keys are stored on HW tokens, like Yubikey
The following command works on Ubuntu (uses PKCS11 library from "opensc" package to talk to USB token)
~$ ssh -I /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so user@hostname
but on WSL it return "no slots"
but on WSL
Daniel Ivanov commented
I believe this is not complete. "In progress" maybe.
Andreas Broström commented
Libusb and simular application support whould be wonderful. I ran in to issues when I noticed that it can not use some apps that are dependant on libusb.
So expanded USB support whould be much lovely!