Scripting USE and STOP USING command for certain ports

I wish to create a script using the API to allow certain client machines to connect to just one specific port on a server.
Looking at the API documentation I can see the command to connect to a server from a client example vhui64.exe -t "USE,QNAP.114", am I correct in assuming the QNAP is the FQDN of the server and the .114 is the port number? I've tried using the command in this way but it fails.
Again for the command "STOP USING,
" would it be [FQDN].[portnumber]?

Thanks for your help,
Rob

#2

Actually no, QNAP is the hostname command from the server. The virtualhere server sends along the hostname to the client and the client then uses that to distinguish between servers. The server doesnt have to be on the internet hence it doesnt use the FQDN. The 114 is the unique address of a usb port on the server

#3

OK thats what I thought. Does the client have to be connected to the server first before issuing a "USE" command?

#4

Yes

#5

vhui64.exe -t "USE, virtualhereserver.0002"

virtualhereserver is the hostname
0002 is the port

But I get an error "Error,invalid address", any ideas?

#8

C:\>vhui64.exe -t list

C:\>VirtualHere IPC, below are the available devices:
(Value in brackets = address, * = Auto-Use)

Raspberry Hub (virtualhereserver.gbhs.co.uk:7575)
*--> Freecom Databar (4294967408) (In-use by you)
--> USB SmartCard Reader (4294967411) (In-use by:SYSTEM (SYSTEM) at 192.168.7
.134)
--> USB SmartCard Reader (4294967410) (In-use by:SYSTEM (SYSTEM) at 192.168.7
.134)
--> CodeMeter-Stick (4294967409) (In-use by:SYSTEM (SYSTEM) at 192.168.7.134
)

Auto-Find currently off
Auto-Use All currently off
Reverse Lookup currently off
VirtualHere not running as a service

#9

what version of the client are you running? it seems like it might be very old

#10

3.6.7, but my server version is old if that make a difference.

I think I have another idea of installing it as a service on each machine then modify the ini file on each machine to bind a device. However the code under

[AutoShare]
0000000007fcc376.64758.1963=1

Not sure where I get those codes from as they don't relate to anything else I've seen. I guess I could get them all from a client by binding all the devices first.

Rob

#14

Neat thanks

#15

I'm currently running vhusbdarmhf, should I replace that with the vhusbdarmpi2 binary? (it's a Pi2)

#16

yes