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;
Verbose output.
Old style output.
Lists interfaces of a device which has devId identifier (for composite devices).
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.
Text message that will be shown in the request window at the Client side.
Password if required by the Client.
callback list Lists callback connections.
callback del <callback id | all> Removes the callback connection specified by callback id, or all callbacks.
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.
Allow local use until Client connects.
Allow connecting the USB device even if it is occupied by another user.
[-pass <password>]
Protect device with password.
Reset power.
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 | -rn name | all> Removes sharing rule defined by ruleId, or name, or removes all rules.
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;
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.
Ping packet interval.
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.