Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

espflash on WSL 2 (with usbipd) doesn't work #641

Open
dom96 opened this issue May 26, 2024 · 6 comments
Open

espflash on WSL 2 (with usbipd) doesn't work #641

dom96 opened this issue May 26, 2024 · 6 comments

Comments

@dom96
Copy link

dom96 commented May 26, 2024

I've successfully flashed my ESP32 via other tools in WSL 1, but espflash does not work for me (even if I try it with usbipd set up on WSL2).

Here is what I'm seeing:

$ sudo usbip list -r 172.19.96.1
Exportable USB devices
======================
 - 172.19.96.1
        1-7: Silicon Labs : CP210x UART Bridge (10c4:ea60)
           : USB\VID_10C4&PID_EA60\0001
           : (Defined at Interface level) (00/00/00)
           :  0 - Vendor Specific Class / unknown subclass / unknown protocol (ff/00/00)

$ sudo usbip attach -r 172.19.96.1 --busid=1-7
$ sudo usbip port
Imported USB devices
====================
Port 00: <Port in Use> at Full Speed(12Mbps)
       Silicon Labs : CP210x UART Bridge (10c4:ea60)
       1-1 -> usbip://172.19.96.1:3240/1-7
           -> remote bus/dev 001/007
$ espflash board-info
Error: espflash::no_serial

  × No serial ports could be detected
  help: Make sure you have connected a device to the host system. If the device is connected but not listed, try
        using the `--list-all-ports` flag.

Am I missing something or should this work?

@SergioGasquez
Copy link
Member

Hi! Have you tried the --list-all-ports flag as suggested by the error message? I'm not a Windows user, but I know some colleagues are using WSL2 with no issues.

@dom96
Copy link
Author

dom96 commented May 27, 2024

Yep, I have. It doesn't change the output.

@dom96
Copy link
Author

dom96 commented May 27, 2024

Also FWIW it's working just fine in Windows PowerShell.

@akauppi
Copy link

akauppi commented Jun 12, 2024

I've successfully flashed my ESP32 via other tools in WSL 1, but espflash does not work for me (even if I try it with usbipd set up on WSL2).

My setup is:

  • Windows 10 Home
  • usbipd v.4.2.0 installed (Windows side)
  • WSL2 (Ubuntu 22.04.4 LTS by lsb_release -a)

Have you tried attaching the device completely from Windows side, i.e.

> usbipd attach --wsl -b 1-7

I don't ever (need to) do usbip on the WSL side. In particular, espflash board-info works for me with the above setup, and ESP32-C3-DevKit-RUST-1 (chip rev 0.4) board.

@akauppi
Copy link

akauppi commented Jun 12, 2024

..if that doesn't help, I would try installing the CP210x Universal Windows Driver (v.11.3.0) on Windows side from here.

I can see you are using a standard UART (not JTAG) connector. Could it be that even though WSL properly lists it as "Silicon Labs : CP210x UART Bridge", it'd still need a driver on the Windows side?

@Eplankton
Copy link

..if that doesn't help, I would try installing the CP210x Universal Windows Driver (v.11.3.0) on Windows side from here.

I can see you are using a standard UART (not JTAG) connector. Could it be that even though WSL properly lists it as "Silicon Labs : CP210x UART Bridge", it'd still need a driver on the Windows side?

Exactly same problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

4 participants