ESP32 USB Passthrough to Windows Subsystem for Linux (WSL)
A Developer’s Guide
ESP32 USB Passthrough to Windows Subsystem for Linux (WSL)
A Developer’s Guide
This guide outlines the steps to connect your ESP32 development board to a Windows Subsystem for Linux (WSL) environment, allowing access to the serial port for development and debugging.
Prerequisites:
- ESP32 development board
- USB cable
- Windows 10 or later with WSL installed
usbipd-wininstalled in Windows

Step-by-Step Guide:
1. Connect ESP32 and Verify in Device Manager:
Connect your ESP32 board to your Windows computer using a USB cable. Open the Device Manager and ensure your ESP32 is listed under Ports (COM & LPT). You may need to install the appropriate drivers if it’s not recognised or shows a warning.
2. Install USB-to-UART Bridge VCP Drivers (If Necessary):
If you encounter issues in the Device Manager, download and install the necessary drivers from https://www.silabs.com/developer-tools/usb-to-uart-bridge-vcp-drivers.
3. Install usbipd-win:
Open a PowerShell or Command Prompt with administrator privileges and install usbipd-win using the Windows package manager:
winget install usbipd
Alternatively, you can download the .msi installer from the usbipd-win GitHub releases page and install it manually.
4. Identify the ESP32’s BUSID:
Open a standard Windows terminal and list the connected USB devices using the usbipd list command:
usbipd list
Locate your ESP32 in the list. The output will display information about each USB device, including its BUSID (e.g., 1–1). Note down the BUSID of your ESP32.
5. Bind the ESP32 Device:
Open a Windows terminal with administrator privileges and bind the ESP32 device to usbipd-win using the following command, replacing <BUSID> with the actual BUSID you identified in the previous step:
usbipd bind --busid <BUSID>
#For example: usbipd bind --busid 1–1
6. Attach the ESP32 to WSL:
Open your WSL terminal and attach the bound ESP32 device using the usbipd attach — wsl — busid command, again replacing <BUSID> with the correct value:
usbipd attach --wsl --busid <BUSID>
#For example: usbipd attach --wsl --busid 1–1
7. Verify Device Attachment in WSL:
In your WSL terminal, use the lsusb command to verify that the ESP32 is now recognized as a USB device within the Linux environment:
lsusb
You should see an entry related to your ESP32 or its USB-to-serial adapter.
Access the Serial Port in WSL:
The ESP32’s serial port should now be accessible within your WSL environment. It will typically appear as /dev/ttyUSB0 or /dev/ttyACM0. You can now use tools like screen, minicom, or your preferred development environment (e.g., PlatformIO in VS Code running within WSL) to communicate with your ESP32 over the serial connection using the appropriate port name.
Troubleshooting:
- Device not listed by
usbipd list: Ensure the ESP32 is properly connected and powered on. Check the Device Manager for any driver issues. - Binding fails: Ensure you are running the
usbipd bindcommand with administrator privileges. - Attachment fails: Verify that the BUSID is correct and that the device was successfully bound.
- Serial port not found in
/dev: Double-check the output oflsusbto confirm the device is attached. The exact serial port name may vary depending on the ESP32 board and drivers.
By following these steps, you can successfully establish a USB passthrough connection for your ESP32 to your WSL environment, enabling seamless development and interaction with your embedded projects.