I have HAOS installed as a KVM on a headless Ubuntu 20.04 host, having just migrated from Raspberry Pi (needed the Pi for something else). Everything is going great, and I even got my USB ports to pass through to the VM from the host machine so I can use it to flash ESPHome on all of my ESP devices.
Problem comes in when I try to connect my 3d printer that worked great on the Pi, but for some reason cannot connect through the USB passthrough. I can see the device in Host>Hardware on /ttyUSB0 with this profile:
However, when I try to connect to Klipper running on the printer it fails, saying “No more candidates to test, and no working port/baudrate combination detected.”
Similarly, I have an ESP32 camera with a USB programmer that shows up as the same device type to my host and to HAOS, and shows up in ESPHome as /ttyUSB0, but cannot connect to it in a similar manner.
Using the same passthrough connection I am able to connect a NodeMCU ESP8266 and flash it without issues, so I am not sure what the disconnect is with these devices.
I don’t know the answer to your question…but is it possible the HAOS doesn’t have the proper drivers for this particular USB Serial device? I know you said this worked when HAOS was running on the PI, but just guessing that the driver may not be there for the VM.
Anyway, I can share an experience that happened to me under a different scenario…I found that the host (Ubuntu Desktop) recognized the USB device being plugged in (Apple iPhone) and the host started using it for its own purposes and thus I could not pass the USB device through to the guest (Windows). The solution for me was to setup VFIO and have the host pass through the entire USB Controller to the guest. This prevented the host from seeing any USB devices showing up on that controller. As I had multiple USB Controllers, I could still use other USB Controllers for the host.
I am trying to check the ch341 drivers on haos via this guide and for some reason haos doesn’t recognize sudo or apt or make. Will need to research this more after work.
From the hardware side I verified that the chip in the guide is the one I am dealing with. If I can figure out how to reinstall the driver my hope is that it will start working.
Failing that I will research VFIO and see if that’s it, but I have not had any issues with other serial devices connected this way.
Yeah I took a look at that link and I don’t think that guide is very helpful. It assumes the drivers are already there (and only need to be updated) and they run on a debian based system (which is not the case for HassOS).
If you download the zip file, you’ll find inside a make file and a readme file.
The readme file gives the instructions for how to compile and install it. Be aware that each time you upgrade HassOS, it will likely delete drivers that are manually installed.
Sorry for the super duper late reply. I tried out VFIO but it turns out my motherboard doesn’t support it Looks like I am back to my Pi for all of my serial connection needs.