Use only 1 USB port on Raspberry Pi

Running Virtualhere on my Raspberry Pi works fine, but I´m looking for a measure to use only 1 of the 4 USB ports in Virtualhere. I want to use the others for USB storage devices but this seems to be not possible.
Is there a way to get a solution?

#2

Yes thats possible

Stop the vhusbd process on the pi so that the server is not running. Edit the config.ini file and add the line

AutoAttachToKernel=1

Then start the server again.

Now you can use the other 3 ports like normal

#3

Thank you for your fast reply.
I´m afraid howerver, I need some more advice.
After editing config.ini file as above, vhusbd won´t start any more. Even a reboot won´t help.
After placing a comment sign # in front of AutoAttachToKernel=1, vhusbd works as usual, using all 4 USB ports of my Raspberry Pi .
Sorry to bother you, I´m on a very low level of experience on Linux.

#4

Just use vi to edit the file and add that line.

If /when it wont start, type

grep vhusbd /var/log/syslog and post the output here that might have some information

#5

So everything works fine now, thank you very much for your helpful hints.

I´m not shure, what my fault was, but after reinstalling Virtualhere to an new Raspian Buster image and editing /root/confi.ini according to your advice only port 1 is forwarded now.

Thanks again.

Just for your information, this is my syslog (connecting and removing a USB-memory-stick to ports 3-4-1-2) :

Last login: Sat Jan 11 09:21:11 2020 from 192.168.188.30
pi@raspberrypi:~ $ grep vhusbd /var/log/syslog
Jan 11 08:58:48 raspberrypi vhusbdarm[414]: >>> Starting VirtualHere USB Server v4.0.9 (Built: Jan 4 2020, 20:49:34)<<<
Jan 11 08:58:48 raspberrypi vhusbdarm[414]: Creating default configuration /root/config.ini
Jan 11 08:58:48 raspberrypi vhusbdarm[451]: Server licensed to=unlicensed max_devices=1
Jan 11 08:58:48 raspberrypi vhusbdarm[451]: Using large URB's
Jan 11 08:58:48 raspberrypi vhusbdarm[451]: Listening on all network interfaces at TCP port 7575
Jan 11 09:00:06 raspberrypi vhusbdarm[451]: 192.168.188.11 connected as connection 1
Jan 11 09:00:37 raspberrypi vhusbdarm[451]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 113
Jan 11 09:00:53 raspberrypi vhusbdarm[451]: Device 113 [14cd:121c] BOUND to connection 1
Jan 11 09:02:30 raspberrypi vhusbdarm[451]: Device 113 [14cd:121c] SURPRISE UNBOUND from connection 1
Jan 11 09:02:30 raspberrypi vhusbdarm[451]: Unmanaging device 113 [14cd:121c]
Jan 11 09:04:39 raspberrypi vhusbdarm[451]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 113
Jan 11 09:17:22 raspberrypi vhusbdarm[434]: >>> Starting VirtualHere USB Server v4.0.9 (Built: Jan 4 2020, 20:49:34)<<<
Jan 11 09:17:22 raspberrypi vhusbdarm[434]: Using configuration /root/config.ini
Jan 11 09:17:22 raspberrypi vhusbdarm[453]: Server licensed to=unlicensed max_devices=1
Jan 11 09:17:22 raspberrypi vhusbdarm[453]: Using large URB's
Jan 11 09:17:22 raspberrypi vhusbdarm[453]: Listening on all network interfaces at TCP port 7575
Jan 11 09:17:22 raspberrypi vhusbdarm[453]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 113
Jan 11 09:18:11 raspberrypi vhusbdarm[453]: 192.168.188.11 connected as connection 1
Jan 11 09:36:31 raspberrypi vhusbdarm[412]: >>> Starting VirtualHere USB Server v4.0.9 (Built: Jan 4 2020, 20:49:34)<<<
Jan 11 09:36:31 raspberrypi vhusbdarm[412]: Using configuration /root/config.ini
Jan 11 09:36:31 raspberrypi vhusbdarm[460]: Server licensed to=unlicensed max_devices=1
Jan 11 09:36:31 raspberrypi vhusbdarm[460]: Using large URB's
Jan 11 09:36:31 raspberrypi vhusbdarm[460]: Listening on all network interfaces at TCP port 7575
Jan 11 09:36:31 raspberrypi vhusbdarm[460]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 113
Jan 11 09:37:44 raspberrypi vhusbdarm[460]: 192.168.188.11 connected as connection 1
Jan 11 09:38:00 raspberrypi vhusbdarm[460]: Connection 1 remotely disconnected gracefully (rx msg size)
Jan 11 09:38:02 raspberrypi vhusbdarm[460]: 192.168.188.11 connected as connection 2
Jan 11 09:38:10 raspberrypi vhusbdarm[460]: Connection 1 successfully removed (reason:timeout)
Jan 11 09:38:11 raspberrypi vhusbdarm[460]: Unmanaging device 113 [14cd:121c]
Jan 11 09:38:18 raspberrypi vhusbdarm[460]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 114
Jan 11 09:38:30 raspberrypi vhusbdarm[460]: Unmanaging device 114 [14cd:121c]
Jan 11 09:38:33 raspberrypi vhusbdarm[460]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 111
Jan 11 09:38:34 raspberrypi vhusbdarm[460]: Device 111 [14cd:121c] BOUND to connection 2
Jan 11 09:38:40 raspberrypi vhusbdarm[460]: Device 111 [14cd:121c] SURPRISE UNBOUND from connection 2
Jan 11 09:38:40 raspberrypi vhusbdarm[460]: Unmanaging device 111 [14cd:121c]
Jan 11 09:38:44 raspberrypi vhusbdarm[460]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 112
Jan 11 09:38:53 raspberrypi vhusbdarm[460]: Unmanaging device 112 [14cd:121c]

#6

So everything works fine now, thank you very much for your helpful hints.

I´m not shure, what my fault was, but after reinstalling Virtualhere to an new Raspian Buster image and editing /root/confi.ini according to your advice only port 1 is forwarded now.

Thanks again.

Just for your information: this is my syslog:

pi@raspberrypi:~ $ grep vhusbd /var/log/syslog
Jan 11 08:58:48 raspberrypi vhusbdarm[414]: >>> Starting VirtualHere USB Server v4.0.9 (Built: Jan 4 2020, 20:49:34)<<<
Jan 11 08:58:48 raspberrypi vhusbdarm[414]: Creating default configuration /root/config.ini
Jan 11 08:58:48 raspberrypi vhusbdarm[451]: Server licensed to=unlicensed max_devices=1
Jan 11 08:58:48 raspberrypi vhusbdarm[451]: Using large URB's
Jan 11 08:58:48 raspberrypi vhusbdarm[451]: Listening on all network interfaces at TCP port 7575
Jan 11 09:00:06 raspberrypi vhusbdarm[451]: 192.168.188.11 connected as connection 1
Jan 11 09:00:37 raspberrypi vhusbdarm[451]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 113
Jan 11 09:00:53 raspberrypi vhusbdarm[451]: Device 113 [14cd:121c] BOUND to connection 1
Jan 11 09:02:30 raspberrypi vhusbdarm[451]: Device 113 [14cd:121c] SURPRISE UNBOUND from connection 1
Jan 11 09:02:30 raspberrypi vhusbdarm[451]: Unmanaging device 113 [14cd:121c]
Jan 11 09:04:39 raspberrypi vhusbdarm[451]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 113
Jan 11 09:17:22 raspberrypi vhusbdarm[434]: >>> Starting VirtualHere USB Server v4.0.9 (Built: Jan 4 2020, 20:49:34)<<<
Jan 11 09:17:22 raspberrypi vhusbdarm[434]: Using configuration /root/config.ini
Jan 11 09:17:22 raspberrypi vhusbdarm[453]: Server licensed to=unlicensed max_devices=1
Jan 11 09:17:22 raspberrypi vhusbdarm[453]: Using large URB's
Jan 11 09:17:22 raspberrypi vhusbdarm[453]: Listening on all network interfaces at TCP port 7575
Jan 11 09:17:22 raspberrypi vhusbdarm[453]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 113
Jan 11 09:18:11 raspberrypi vhusbdarm[453]: 192.168.188.11 connected as connection 1
Jan 11 09:36:31 raspberrypi vhusbdarm[412]: >>> Starting VirtualHere USB Server v4.0.9 (Built: Jan 4 2020, 20:49:34)<<<
Jan 11 09:36:31 raspberrypi vhusbdarm[412]: Using configuration /root/config.ini
Jan 11 09:36:31 raspberrypi vhusbdarm[460]: Server licensed to=unlicensed max_devices=1
Jan 11 09:36:31 raspberrypi vhusbdarm[460]: Using large URB's
Jan 11 09:36:31 raspberrypi vhusbdarm[460]: Listening on all network interfaces at TCP port 7575
Jan 11 09:36:31 raspberrypi vhusbdarm[460]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 113
Jan 11 09:37:44 raspberrypi vhusbdarm[460]: 192.168.188.11 connected as connection 1
Jan 11 09:38:00 raspberrypi vhusbdarm[460]: Connection 1 remotely disconnected gracefully (rx msg size)
Jan 11 09:38:02 raspberrypi vhusbdarm[460]: 192.168.188.11 connected as connection 2
Jan 11 09:38:10 raspberrypi vhusbdarm[460]: Connection 1 successfully removed (reason:timeout)
Jan 11 09:38:11 raspberrypi vhusbdarm[460]: Unmanaging device 113 [14cd:121c]
Jan 11 09:38:18 raspberrypi vhusbdarm[460]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 114
Jan 11 09:38:30 raspberrypi vhusbdarm[460]: Unmanaging device 114 [14cd:121c]
Jan 11 09:38:33 raspberrypi vhusbdarm[460]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 111
Jan 11 09:38:34 raspberrypi vhusbdarm[460]: Device 111 [14cd:121c] BOUND to connection 2
Jan 11 09:38:40 raspberrypi vhusbdarm[460]: Device 111 [14cd:121c] SURPRISE UNBOUND from connection 2
Jan 11 09:38:40 raspberrypi vhusbdarm[460]: Unmanaging device 111 [14cd:121c]
Jan 11 09:38:44 raspberrypi vhusbdarm[460]: Found High speed device [14cd:121c] "Generic, Mass Storage Device" at address 112
Jan 11 09:38:53 raspberrypi vhusbdarm[460]: Unmanaging device 112 [14cd:121c]