CP2102 Virtual Com Woes

Hi! I've reviewed several threads on the forum regarding trouble with the CP2102 drivers from Silicon Labs, but as recently as April of 2021 noted it's been noted as working with the latest drivers. However I just spent a few hours pulling my hair out with this particular usb device from both Windows 10 and RaspberryPi Servers, and in both cases, the VirtualHere client can use the device, and it shows up correctly on the Windows PC in Device manager, however whenever I try to open up the Virtual Com port using any tool (CoolTerm, Putty, PySerial) the device drops (Windows plays the USB unplug notification), and the software trying to open the port reports that it failed to open. VirtualHere Client maintains the hold on the USB device, and it immediately shows back up in Windows Device Manager.

Note that in both cases, I am able to use FTDI-based VCOM devices from the same VirtualHere Clients and Servers without any trouble, so the issue seems to be specific to Silicon Labs. Is there any chance that this functionality is broken in the current releases of VirtualHere client/server applications? Thanks so much for your time / attention. I'd love to get this working for a current project.
Cheers,
-Jonathan

#2

When it drops, can you look on the pi server in syslog at about the time it drops. Is anything logged there like "SURPRISE UNBOUND" or something similar?

#3

Thanks for the quick follow up on this. I just did some testing again, this time using my license to activate the optimized server for pi3, but I encountered the same issue.
Checking the logs, I didn't see anything like SURPRISE UNBOUND, however there was a peculiar error regarding discarding urb's 18 lines up from the end of the log:
"Error 22 discarding urb 0x1c0d2e0 for device /sys/bus/usb/devices/1-1.3.1, Invalid argument (abort endpoint)"

Additionally, it time that I tried to open the VCOM port from the client PC, it can be seen the raspberrypi kernel reports a reset of the device in the log:
"raspberrypi kernel: [ 639.926951] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg"

Does this give any clues as to what might be going on? I can open up the vcom port locally on the raspberrypi without any problems, and if I plug the device directly into the client PC, it also doesn't have any trouble. Thanks again for any help!

Full log from /var/log/syslog below:
---------------------------
Oct 11 21:12:09 raspberrypi systemd[1]: Starting VirtualHere Server...
Oct 11 21:12:09 raspberrypi vhusbdarmpi4[1115]: >>> Starting VirtualHere USB Server v4.3.3 (Built: Aug 16 2021, 18:21:20)<<<
Oct 11 21:12:09 raspberrypi vhusbdarmpi4[1115]: Creating default configuration /usr/local/etc/virtualhere/config.ini
Oct 11 21:12:09 raspberrypi systemd[1]: Started VirtualHere Server.
Oct 11 21:12:09 raspberrypi vhusbdarmpi4[1116]: Server licensed to=unlicensed max_devices=1
Oct 11 21:12:09 raspberrypi vhusbdarmpi4[1116]: Using large URB's
Oct 11 21:12:09 raspberrypi vhusbdarmpi4[1116]: Listening on all network interfaces at TCP port 7575
Oct 11 21:12:09 raspberrypi avahi-daemon[415]: Files changed, reloading.
Oct 11 21:12:09 raspberrypi avahi-daemon[415]: Loading service file /services/vhusbd.service.
Oct 11 21:12:09 raspberrypi vhusbdarmpi4[1116]: Found Full speed device [10c4:ea60] "Silicon Labs, CP2102N USB to UART Bridge Controller" at address 1131
Oct 11 21:12:10 raspberrypi avahi-daemon[415]: Service "VirtualHere USB Sharing" (/services/vhusbd.service) successfully established.
Oct 11 21:12:11 raspberrypi vhusbdarmpi4[1116]: 99.121.59.83 connected as connection 1
Oct 11 21:12:23 raspberrypi systemd[1]: Stopping VirtualHere Server...
Oct 11 21:12:23 raspberrypi avahi-daemon[415]: Files changed, reloading.
Oct 11 21:12:23 raspberrypi avahi-daemon[415]: Service group file /services/vhusbd.service vanished, removing services.
Oct 11 21:12:23 raspberrypi avahi-daemon[415]: No service file found in /etc/avahi/services.
Oct 11 21:12:24 raspberrypi vhusbdarmpi4[1116]: Connection 1 successfully removed (reason:server shutdown)
Oct 11 21:12:25 raspberrypi vhusbdarmpi4[1116]: Unmanaging device 1131 [10c4:ea60]
Oct 11 21:12:27 raspberrypi vhusbdarmpi4[1116]: >>> Shutdown <<<
Oct 11 21:12:27 raspberrypi systemd[1]: virtualhere.service: Succeeded.
Oct 11 21:12:27 raspberrypi systemd[1]: Stopped VirtualHere Server.
Oct 11 21:12:29 raspberrypi systemd[1]: Reloading.
Oct 11 21:12:48 raspberrypi systemd[1]: Starting VirtualHere Server...
Oct 11 21:12:48 raspberrypi vhusbdarmpi3[1209]: >>> Starting VirtualHere USB Server v4.3.3 (Built: Aug 16 2021, 18:21:18)<<<
Oct 11 21:12:48 raspberrypi vhusbdarmpi3[1209]: Using configuration /usr/local/etc/virtualhere/config.ini
Oct 11 21:12:48 raspberrypi systemd[1]: Started VirtualHere Server.
Oct 11 21:12:48 raspberrypi vhusbdarmpi3[1210]: Server licensed to=unlicensed max_devices=1
Oct 11 21:12:48 raspberrypi vhusbdarmpi3[1210]: Using large URB's
Oct 11 21:12:48 raspberrypi vhusbdarmpi3[1210]: Listening on all network interfaces at TCP port 7575
Oct 11 21:12:48 raspberrypi avahi-daemon[415]: Files changed, reloading.
Oct 11 21:12:48 raspberrypi avahi-daemon[415]: Loading service file /services/vhusbd.service.
Oct 11 21:12:48 raspberrypi vhusbdarmpi3[1210]: Found Full speed device [10c4:ea60] "Silicon Labs, CP2102N USB to UART Bridge Controller" at address 1131
Oct 11 21:12:49 raspberrypi avahi-daemon[415]: Service "VirtualHere USB Sharing" (/services/vhusbd.service) successfully established.
Oct 11 21:12:52 raspberrypi vhusbdarmpi3[1210]: 99.121.59.83 connected as connection 1
Oct 11 21:12:55 raspberrypi vhusbdarmpi3[1210]: 192.168.1.1 connected as connection 2
Oct 11 21:13:50 raspberrypi kernel: [ 210.458148] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
Oct 11 21:13:50 raspberrypi kernel: [ 210.458807] cp210x 1-1.3.1:1.0: device disconnected
Oct 11 21:13:50 raspberrypi kernel: [ 210.555948] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:13:50 raspberrypi vhusbdarmpi3[1210]: Device 1131 [10c4:ea60] BOUND to connection 2
Oct 11 21:13:50 raspberrypi kernel: [ 211.005957] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:13:57 raspberrypi vhusbdarmpi3[1210]: Device 1131 [10c4:ea60] UNBOUND from connection 2
Oct 11 21:14:43 raspberrypi vhusbdarmpi3[1210]: 192.168.1.1 connected as connection 4
Oct 11 21:14:53 raspberrypi kernel: [ 273.546028] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:14:53 raspberrypi vhusbdarmpi3[1210]: Device 1131 [10c4:ea60] BOUND to connection 4
Oct 11 21:14:54 raspberrypi kernel: [ 274.216037] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:15:11 raspberrypi kernel: [ 291.266329] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:15:12 raspberrypi kernel: [ 292.396337] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:15:17 raspberrypi kernel: [ 297.646423] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:15:18 raspberrypi kernel: [ 298.786482] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:17:02 raspberrypi CRON[1448]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Oct 11 21:18:02 raspberrypi vhusbdarmpi3[1210]: Device 1131 [10c4:ea60] UNBOUND from connection 4
Oct 11 21:18:05 raspberrypi kernel: [ 465.257357] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:18:05 raspberrypi vhusbdarmpi3[1210]: Device 1131 [10c4:ea60] BOUND to connection 4
Oct 11 21:18:05 raspberrypi kernel: [ 465.717357] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:18:07 raspberrypi kernel: [ 467.997376] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:18:56 raspberrypi vhusbdarmpi3[1210]: Device 1131 [10c4:ea60] UNBOUND from connection 4
Oct 11 21:18:59 raspberrypi kernel: [ 520.047519] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:19:00 raspberrypi vhusbdarmpi3[1210]: Device 1131 [10c4:ea60] BOUND to connection 4
Oct 11 21:19:00 raspberrypi kernel: [ 520.487469] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:19:01 raspberrypi kernel: [ 521.587476] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:19:02 raspberrypi kernel: [ 522.727488] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:19:03 raspberrypi vhusbdarmpi3[1210]: Error 22 discarding urb 0x1c0d2e0 for device /sys/bus/usb/devices/1-1.3.1, Invalid argument (abort endpoint)
Oct 11 21:19:03 raspberrypi vhusbdarmpi3[1210]: Error 22 discarding urb 0x1c0d2e0 for device /sys/bus/usb/devices/1-1.3.1, Invalid argument (abort endpoint)
Oct 11 21:19:51 raspberrypi vhusbdarmpi3[1210]: Device 1131 [10c4:ea60] UNBOUND from connection 4
Oct 11 21:19:57 raspberrypi kernel: [ 577.367162] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:19:57 raspberrypi vhusbdarmpi3[1210]: Device 1131 [10c4:ea60] BOUND to connection 4
Oct 11 21:19:57 raspberrypi kernel: [ 577.807167] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:20:04 raspberrypi kernel: [ 584.917125] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:20:55 raspberrypi kernel: [ 635.397003] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:20:57 raspberrypi kernel: [ 637.766972] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:20:59 raspberrypi kernel: [ 639.926951] usb 1-1.3.1: reset full-speed USB device number 5 using dwc_otg
Oct 11 21:22:36 raspberrypi vhusbdarmpi3[1210]: Connection 1 remotely disconnected gracefully (rx msg size)
Oct 11 21:22:43 raspberrypi vhusbdarmpi3[1210]: Connection 1 successfully removed (reason:timeout)
Oct 11 21:23:03 raspberrypi vhusbdarmpi3[1210]: 99.121.59.83 connected as connection 9
Oct 11 21:24:01 raspberrypi vhusbdarmpi3[1210]: Connection 9 successfully removed (reason:timeout)
Oct 11 21:24:14 raspberrypi vhusbdarmpi3[1210]: 99.121.59.83 connected as connection 10
Oct 11 21:25:26 raspberrypi systemd[1]: Starting Cleanup of Temporary Directories...
Oct 11 21:25:26 raspberrypi systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Oct 11 21:25:26 raspberrypi systemd[1]: Started Cleanup of Temporary Directories.

#4

That log looks ok.

Can you try this

1. Make sure you have the latest drivers from here https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
2. See here about disabling selective suspend https://community.silabs.com/s/article/cp210x-vcp-selective-suspend-con… (You dont need to download their customization tool, just use Device Manager to disable selective suspend by searching for the COM Port in device manager and right clicking Properties->Power Management and UNcheck thoses boxes

#5

Unchecking the Power Management boxes seemed to have been the magic fix for this issue. It seems to be working as expected now! Thanks so much for the help on this!