Command Line Interface

Use USBSRVCmd.exe console program to configure the program via command line interface.

Command line USBSRVCmd.exe file is created during the program installation. You can find it in USB over Network Server program folder.

Command Line Keys

Key Description
help Shows this help.
tcpport [ -d | <port> ] Set TCP-port.
list [[-v][-o] [-i] [<devId>] | [-s]] Lists USB devices and shared USB ports;
   -v - verbose output;
   -o - old style output;
   -i <devId> - lists interfaces of a device which has devId identifier (for composite devices);
   -s - shows only devId without additional info (name, status, etc.).
share <devId> | -a [VID][:PID][:REV] [-s serial] [-p port] Shares the USB device identified by devId or VID:PID:REV serial and port.
unshare <devId> | -a [VID][:PID][:REV] [-s serial] [-p port] Unshares the USB device identified by devId or VID:PID:REV serial and port.
shareport <devId> | <-p port> Shares the USB port where the USB device with devId identifier is plugged.
unshareport <devId> | <-p port> Unshares the USB port.
callback add <host> [<port>] [-m <message>] [-p <password>] Initiates a callback connection to the Client.
   port - TCP-port of the Client;
   -m <message> - text message that will be shown in the request window at the Client side;
   -p <password> - password if required by the Client.
callback list Lists callback connections.
callback del <callback id> Removes the callback connection specified by callback id.
listrules [-v] Lists sharing rules.
addrule [-rn <name>] [-id VID[:PID][:REV]] [-cls CLS[:SCLS][:PROTO]] [-s <serial>] [-p <port>] [-share | -prevent] [-dd <DeviceDescription>] [-ds <serial>] [-ap permanent | unplug | restart] [-lu] [-co] [-pass <password>] [-rp =1|=0] [-rs] [-approx <1-10>] Adds sharing rule with the next parameters:
   [-rn <name>] - sharing rule name;
   [-id VID[:PID][:REV]] - VID, PID, Revision paramenters of USB devices;
   [-cls CLS[:SCLS][:PROTO]] - Class, Subclass, Protocol paramenters of USB devices;
   [-s <serial>] - device serial number;
   [-p <port>] - USB port;
   [-share | -prevent] - action that will be performed to matched devices;
   [-dd <DeviceDescription>] - custom device nickname;
   [-ds <serial>] - replace device serial number;
   [-ap permanent | unplug | restart] - action persistence;
   [-lu] - allow local use until Client connects;
   [-co] - allow connecting the USB device even if it is occupied by another user;
   [-pass <password>] - protect device with password;
   [-rp] - reset power;
   [-rs] - reset device on share;
   [-approx <1-10>] - approximation for pointing devices.
editrule <ruleId> [-enable | -disable] [-rn <name>] [-id VID[:PID][:REV]] [-cls CLS[:SCLS][:PROTO]] [-s <serial>] [-p <port>] [-share | -prevent] [-dd <DeviceDescription>] [-ds <serial>] [-ap permanent | unplug | restart] [-lu] [-co] [-pass <password>] [-rp =1|=0] [-rs] [-approx <1-10>] Edits sharing rule defined by ruleId:
   [-enable | -disable] - enable or disable the rule;
Other parameters described above.
removerule <ruleId> Removes sharing rule defined by ruleId.
password -s [password]|-g Sets or gets password required for client authentication.
ssl [=0|=1] Gets, enables or disables SSL settings.
ssl cert [<path>] Path to the PEM-encoded Certificate file for the Server.
ssl key [<path>] Path to the PEM-encoded Private Key file for the Server, Private Key must be unencrypted.
ssl use_chain [=0|=1] Gets, enables or disables using of certification authorities chain file.
ssl chain [<path>] Path to the PEM-encoded CA Certificate files.
ssl use_auth [=0|=1] Gets, enables or disables Clients authentication.
ssl auth [<path>] Path to the PEM-encoded client authentication certificate list file.
ssl use_revoc [=0|=1] Gets, enables or disables the use of the certificate revocation list.
ssl revoc [<path>] Path to the certificate revocation list.
ssl chkname [=1|=0] Check common name.
lickey [[-f] <key file path>] Applies the license key from a specified path;
   -f - applies the license key even if it is outdated.
licsrv [list]|[set [host [port]] Gets or sets using the License Server instead of local license;
   host, port - License Server network path and TCP-port.
export [<path>] Export the program configuration to a specified path.
import [<path>] Import the program configuration from a specified path.
log [level error|debug]|[show] Specifies the logging level (error or debug) or shows the program log in notepad.
alias my -s [name]|-g Sets or gets alias name of this computer;
alias other -s [=1|=0]|-g Enables/disables or gets current state of displaying alias names of other computers.
disconnect <devId> Disconnect from Client the USB device specified by devId;
ping [-t ping_timeout -p ping_tick ] Sets ping options.
   -t - ping packet interval;
   -p - break connection interval.

Command Line Usage Examples:

Get the list of available USB devices:

C:\Program Files\USB over Network>usbsrvcmd list
devID:0 - USB Mouse  (unshared)
devID:3 - TTDC TTDC PPG Receiver  (unshared)
devID:4 - PANTECH USB MMC Storage  (unshared)

To share a device use the "share" key and specify its devId:

C:\Program Files\USB over Network>usbsrvcmd share 4
Device shared successfully.

To unshare a USB device use the "unshare" key and specify its devId:

C:\Program Files\USB over Network>usbsrvcmd unshare 4
Device unshared successfully.