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
Attaching an ESP32 via CH340 causes an error #804
Comments
I don't known, but you could try using |
Okay, I've tried that, but unfortunately this causes a whole lot of problems and the device still not being able to be recognized. Here is what went down:
I hope that helps to figure out what might be the issue here. At this point it feels like more people could run into similar issues, since I don't think that I did something no one else would do. |
There is no looping going on, only a change of device driver which is waited on. Windows apparently never finishes the driver installation.
usbipd-win does nothing with WSL until you run
Again, Windows is stuck on driver installation. All usbipd-win does is instruct Windows to install a different driver and waits for that to finish.
Again, WSL not starting up has nothing to do with usbipd-win.,Also, Windows not booting is again unrelated. usbipd-win doesn't do anything until you give it a command.
That makes sense. The driver usbipd-win uses is the one from VirtualBox. After installation it changes the name of the driver to "USBIP Shared Device". It never got to change the name, since the installation of the driver never finished.
Again, the driver fails to install.
I hate to tell you this, but it looks like your Windows driver database is corrupt. The fact that Windows fails to install (or uninstall) drivers to completion, the fact that WSL crashes, and that Windows reboot is flaky are clear indications of some sort of system corruption. |
The thing is, that I'm on a relatively fresh install of windows with only a few software components installed on it at this point. I had no issues with drivers before running the bind command with the force flag. Whenever the driver is changed as you describe, only then these issues started. Then, whenever I fixed the issues caused by that change (completely uninstall and reinstall the device), then everything went back to normal. Including driver installation or removal and system reboot behavior. What I'm confused about is, that after this change it is listed as "VirtualBox USB". I suppose it is not compatible with the device, which would explain lockup behavior.
Actually, I did mention that I ran the attach command (with the -w option), so this is related. |
Btw. I'm trying to be constructive. I'm just describing what I did exactly and report what the result is. I was not saying that the application is continually interfering with the system. I meant that the changes, performed by the bind command seem to cause driver issues, at least for some devices (like the one i'm using). |
It is possible that the VirtualBox driver is somehow incompatible with the device and/or your platform. Have you (or did you have in the past) VirtualBox itself installed? If so, a driver version mismatch could cause problems. But I have never heard of it causing Windows boot failures. And it cannot be related to
as when WSL starts up, no USB drivers are involved until you run |
I have not installed VirtualBox after the fresh install, which was quite recent. That was why I was confused seeing it there. On the other hand I have docker desktop installed on my system and I'm not sure which virtualization engine is used there. What exactly is the Virtual Box USB driver supposed to do? Is it some kind of bridge or usb proxy?
When a driver is locked up for some reason then Windows not being able to shut down is not uncommon. Unless it causes a blue screen (which I did not see). But in case of a blue screen it is also usually not shutting down on its own. A driver incompatibility issue could cause that and Windows does not usually install drivers which don't fit to a device. Does the force option override that behavior? This would at least explain the issues that I had, I would think.
Yes that makes sense. As I said i did run Regarding Virtual Box, maybe I could try to install it and see if the device could be recognized in there. Not sure though, what kind of USB devices Virtual Box supports. |
The VirtualBox driver is a so called "stub" driver. It allows to send URBs from user code. Essentially, it is a "NULL" driver with a tap that you can hook into. It is dormant when the device is unused, and (as far as I know) it is compatible with all USB devices (so far, at least). And normally |
Any news on this? |
Hello, there isn't really any solution that I was able to come up with in terms of combining microcontoller programming an WSL2. I've spent a few more hours to try out VirtualBox, but didn't have any success with it, so I stopped trying, because I didn't feel like it's worth the effort. |
TLDR
Just installed USBIPD v4.0.0 on WSL2 Ubuntu in Windows 10
Trying to use it with an ESP32 which has a CH340 chip on the devboard
Windows can use the device properly
Bound USB-Device corectly
Attaching causes an error
The USB device is no longer recognized until I reboot Windows
What now?
Full Description
Hello,
I have just installed USBIPD version 4.0.0 in a Win10 Pro Computer.
I'm using WSL2 with Ubuntu:
Now when I connect my ESP32 devboard to my computer, it works fine. The devboard communicates to USB via a CH340 chip for which I have the drivers installed in my system.
After installing USBIPD v4.0.0, I followed the the instructions and bound the device to share it using a powershell with admin permissions:
After I tried to attach the device, I got an error and heard the "USB device disconnected"-sound coming from Windows. Unpluging the device and plugging it back in has no effect and it does not work anymore - I have to reboot Windows for it to work again.
Here is the output, that I get.
Am I doing something wrong or what might be the issue here?
The text was updated successfully, but these errors were encountered: