PC does not show more than 10 com ports

Dear Sir/Madam,

We have problem that the PC could not detect more than 10 of our USB devices.
Below is our setup:
1) Using Raspberry Pi connect 12 USB devices (Silicon Labs CP210x USB to UART Bridge)
2) Raspberry Pi connected to LAN router to PC
3) PC is Windows10, 32bit, running Vhui32.exe
4) At PC, Vhui32 is able to see the 12 USB devices. However at PC Device Manager, only 10 com ports are shown.

The same setup was tested on a PC with Windows7, 32bit and all 12 com ports are displayed in the PC Device Manager.

Appreciate your help on above.

Thanks,
SK Chai

#2

OK, this is fixed in version 4.1.8 of the client available for download now

#3

Hi Sir,
I am Daniel and colleague of SKChai .I have found the release notes for 4.1.8 as below:
"* Windows 10 - increased limit from 10 to 16 virtual devices per client (can be increased more later)"
But 16 devices is not enough for our system. The system architecture will be one PC ( windows 10) with more than 20 sets of raspberry pi 3 (each with separate virtualHere Server license and more than 10 USB devices attached). So the USB devices on PC side(virtualClient) will be far more than 16. Can you help to build another release with more devices support ?

#4

Hi David,

1. The virtualhere usb client for windows 10 / windows server 2016 (or any later version of windows) can support up to 255 virtual ports. I limited it to 10 (now 16) because I thought thats the max most people would probably use via virtualhere per client. Each virtual port takes some kernel resources so i need to be conservative with memory. (In Win10+ Virtual USB ports cannot be dynamically added afterwards they need to be declared when the driver is installed)

2. The virtualhere usb client driver for any other version of windows is limited to 127 virtual ports. (These are dynamically added as required at runtime even after the driver is installed and running)

How many ports to do you need? Ill see if i can bump up the number of ports for you (e.g via a registry entry) and leave it as 16 for most other customers so as not to waste resources on the client.

#5

<p>Hi Micheal,
</p>
<p> Thanks for the clarification . Please see my comment below.
</p>
<p>"1. The virtualhere usb client for windows 10 / windows server 2016 (or any later version of windows) can support up to 255 virtual ports. I limited it to 10 (now 16) because I thought thats the max most people would probably use via virtualhere per client. Each virtual port takes some kernel resources so i need to be conservative with memory. (In Win10+ Virtual USB ports cannot be dynamically added afterwards they need to be declared when the driver is installed)"<br />
Daniel: For our system(Server), memory is not an issue. Can you build a version for windows 10 (and windows server 2016) with maximum 255 virtual port?
</p>
<p>"2. The virtualhere usb client driver for any other version of windows is limited to 127 virtual ports. (These are dynamically added as required at runtime even after the driver is installed and running)"<br />
Daniel: We have tested on windows 7. However, it also has such limit with 10 virtual port. We will test again to confirm.
</p>
<p>3 ."How many ports to do you need? Ill see if i can bump up the number of ports for you (e.g via a registry entry) and leave it as 16 for most other customers so as not to waste resources on the client."<br />
Daniel: Can you help to build a version for windows 10 (and windows server 2016) with maximum 255 virtual port?
</p>
<p>4. Also i have another question that does Linux version (take ubuntu as example)also have such limitations ?
</p>
<p> Daniel </p>

#6

For windows 10
--------------------
1. Start regedt32 and open Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vhusb3hc\Parameters
2. Right click on the right panel and select "New DWORD" now enter USB2Ports then press enter, then double click on the entry and select Decimal and enter in the number of usb 2 ports you want i.e 255 and press OK
3. Right click on the right panel again and select "New DWORD" now enter USB3Ports then press enter, then double click on the entry and select Decimal and enter the number of usb 3 ports you want i.e 0 and press OK
4. Now download 4.1.9 of the client (or later) and it will now read these values on system boot so it knows how many usb 3 and usb 2 ports to present
5. Whenever you change the number of USB2Ports or USB3Ports in the registry you must reboot for the driver to pickup the change

For Linux
------------
You must compile your own 4.9 (or later) kernel. In the make menuconfig under Drivers->USB->USB/IP - > Number of ports per USB/IP virtual host controller (the maximum is 31)

Since this might not be enough ports you will need to add additional USB/IP Virtual Host Controllers. By Default there is 1 but change it to e.g 8. There is an option called Number of USB/IP virtual host controllers that you can increase.

(The VirtualHere client for Linux knows about these settings and will automatically allocate remote devices to whatever host controllers and virtual ports are available)

#7

Hi Michael,
I'm running on Windows10 PC.
I have set the registry USB2Ports to 100 (decimal) and USB3Ports to 0 and rebooted my PC. And I am using Virtualhere client 4.1.9.
I am using 3 raspberry pi. Each raspberry pi has 10 USB Devices connected.
However, the number of com ports detected at the PC is only 16.

SK Chai

#9

Hi Michael,
Under the VirtualHere USB 3 eXtensible Host Controller, USB Root Hub (xHCI), it shows 22 ports.
When I turn on my 30 devices, only 16 ports shows Silicon Labs CP210x USB to UART Bridge.
There is no error message at port 17.

rgds,
SK

#10

OK i think you havent edited the registry correctly (and rebooted). See my screenshot

#11

All good now? You got it figured out ok?

#12

Hi Michael,
Yes, now I can see the com ports (I set 200, able to see 200 in the usbTreeview software). I made a mistake when setting the registry. Thanks.

I use the sscom.exe software to open the com port. On the first attempt to open the port, it will always prompt "...port is in use or there is error with the port...".
If I open it on 2nd or 3rd attempt it will be able to open the port.
And also I notice in the control panel , device manager, com port, it is keep refreshing. And notice that sometimes the com port would disappear and reappear.
Do you have any suggestion on how to fix it?

rgds,
SK

#13

1. What kernel version are you using on the pi's
2. How many com ports do you have connected at once?
3. Can you hear devices connecting /disconnecting in windows or is it silent even though the devices in the Device Manager are appearing/disappearing

#14

I am using : 2017-04-10-raspbian-jessie_Kernel_44
There are 30 devices connected (10 devices on each raspberry pi)
Sometimes I can hear devices connecting/disconnecting and I'm able to see devices disappear and appear.
Sometimes it just refresh the screen in the Device Manager and did not observe any device disappearing.

rgds,
SK

#15

ok, is it possible to use teamviewer so i can login and see this? if so email mail [at] virtualhere.com (mail[at]virtualhere[dot]com)

Edit: Also another thing, are you using a powered hub to plug all the serial devices in? With so many devices on the pi you should be using a separate powered hub. I have seen ports fade out if there is insufficient power to the port

#16

Yes, the USB Hub is powered by external power adaptor.
I have sent email to you via mail [at] virtualhere.com (mail[at]virtualhere[dot]com).

Appreciate your help.
Thanks
SK

#18

To others reading this thread:

The problem was that Windows was telling the serial adapters to go to sleep immediately. This is incorrect and the device should stay awake when being used via virtualhere. To change this setting, use the device via virtualhere then bring up windows device manager, find the device listed there and right click and select "Properties" and select "Power Management" and UNcheck "Allow the computer to turn off this device to save power"

#19

I have server 3.7.8 on my Synology NAS, and client 4.7.4 on my Windows 2019 server, 17 usb stick share on usb-server for this usb-client. All sticks a showed on vhusb, but windows device manager show only 16 HID-device and USB device tree show only 16 device too. Registry is changed, USB2Port - 20 (decimal), USB3 Port - 0
https://imgur.com/MEukVPZ.png