Skip to main content

usb2

The usb2 command controls the USB 2.0 layer on devices with USB 2.0 routing support: pairing endpoints, setting extender chipset options, and resetting the extender.

Command TypeDisplayNet
Minimum Version3.x.x

Usage

usb2 pair <source> <destination>
usb2 pairhub <source> <destination>[,<destination>...]
usb2 removepair <source> [<destination>]
usb2 setoption <device> <msa | multiuser> <on | off>
usb2 setrole <device> <local | remote>
usb2 reset <device>

Devices are addressed by hostname or MAC address. Any device that supports USB 2.0 routing can be used; when pairing, the source should be a TX device and the destination an RX device.

Subcommands

SubcommandDescription
pairPair two USB devices exclusively
pairhubPair multiple RX devices to a single TX, creating a virtual hub
removepairRemove one pairing, or all of a device's pairings
setoptionChange USB extender chipset options on DN-3xx devices
setroleSet a device's USB extender role (local or remote)
resetReset the USB extender chipset on a device

pair

Pairs two USB devices. Any existing pairings on either device are cleared first, so pair always results in a single one-to-one pairing. Use pairhub to pair multiple RX devices to one TX.

Pair a computer's USB to a seat
usb2 pair computer front_desk

pairhub

Pairs one or more RX devices to a single TX device, creating a virtual hub. Unlike pair, pairhub is additive: repeated commands add devices to the hub. Up to 7 RX devices are supported. Requires multiuser mode to be enabled on the devices (see setoption).

Add two seats to a source's virtual hub
usb2 pairhub bluray_player hd_monitor,monitor_two

removepair

Removes a pairing between source and destination. If destination is omitted, all of the source device's pairings are removed. Removing a pairing that does not exist is a no-op.

Remove all pairings from a source
usb2 removepair bluray_player

setoption

Changes a USB extender chipset option on DN-3xx devices. After changing an option, the extender chipset must be reset with the reset subcommand before the change takes effect.

OptionValuesDescription
msaon / offMass storage acceleration. Recommended off when using multiuser mode
multiuseron / offSimultaneous User (SUI) mode, which allows multiple RX devices to pair to one TX as a virtual hub (see pairhub)
Disable mass storage acceleration
usb2 setoption avp1 msa off

setrole

Sets the USB 2.0 extender role for an endpoint, determining whether it acts as the Local or Remote extender in the USB extension link. The role is independent of the device's TX/RX mode and can be set on either device.

RoleMeaning
localLocal extender (host side)
remoteRemote extender (device side)
Set extender roles on an endpoint pair
usb2 setrole endpoint_one local
usb2 setrole endpoint_two remote

reset

Resets the USB extender chipset on a device. Required after changing an option with setoption.

Reset a device's USB extender
usb2 reset avp1

Return value

usb2 pairhub bluray_player monitor_two
{
"status": "SUCCESS",
"request_id": null,
"result": null,
"error": null
}

Errors

ErrorCause
<device> is not a USB 2.0 extenderThe device has no USB 2.0 extender support
Invalid Option specifiedsetoption with an option other than msa/multiuser
Invalid Option Value specifiedsetoption with a value other than on/off
Cannot remove USB pair on locked deviceThe device is locked in DisplayNet Manager

State and side effects

  • The pairing is held by the USB extenders themselves, not by DisplayNet. It survives a server restart because the extender hardware remembers it, and clearing DisplayNet's records does not unpair anything.
  • Both ends are changed together. Unpairing removes the pairing from the peer as well.
  • A locked device at either end refuses the change, source or destination. See lock.

Notifications

Pairing changes produce a NOTIFICATION with event type SETTINGS_CHANGED when device options change.

setoption produces a DN_NOTIFICATION with the change reflected in the USB subobject of a streams_update result:

usb2 setoption avp1 multiuser off (excerpt)
{
"status": "DN_NOTIFICATION",
"request_id": null,
"result": {
"streams_update": [
{
"device_id": "6cdffb00387f",
"USB": {
"SUIEnabled": false,
"MSAEnabled": false,
"PendingReset": true,
"HubConnection": "off"
}
}
]
},
"error": null
}

REST API

Endpoint typeDisplayNet API command
AddressPOST /api/displaynet/<operation>, or name the operation in the body of a POST /api/displaynet. See Sending commands.
RoleUser
SubcommandOperationParameters
pairusb2_pairsource destination
pairhubusb2_pairhubsource destinations
removepairusb2_removepairsource destination
resetusb2_resetsource
setoptionusb2_setoptiondevice option value
setroleusb2_setroledevice role

See also

  • connect: connect USB performs a pair as part of general routing
  • disconnect: disconnect usb removes pairings