USB System

API Documentation: [cpp] [python] [.NET] [LabVIEW]

The USBSystem class provides high level control of the lower level Port Entity

Upstream Control

The USBHub2x4 has the ability to designate one of the upstream ports (4-5) as the upstream connection. This is very useful for moving devices between hosts.

stem.hub.setUpstream() [cpp] [python] [NET] [LabVIEW]
stem.hub.getUpstream() [cpp] [python] [NET] [LabVIEW]


The Power Modes can only be changed when the port power is disabled.

Enumeration Delay

Once a USB device is detected by the USBHub2x4 it is possible to delay its connection to an upstream host computer and subsequent enumeration on the USB bus. The enumeration delay can mitigate or eliminate host kernel instabilities by forcing devices to enumerate in slow succession, allowing a focus on validation of drivers and software. The enumeration delay is configured in milliseconds, representing the time delay between enabling each successive port. Enumeration delay is applied when the hub powers on or when a new upstream connection is made.

stem.hub.setEnumerationDelay() [cpp] [python] [NET] [LabVIEW]
stem.hub.getEnumerationDelay() [cpp] [python] [NET] [LabVIEW]

Data Behavior

The USBHub2x4 is capable of a few different behaviors for how it switches upstream port connections. It can auto switch based on port priority or have a fixed upstream port. The method in which these events are handled is referred to as data behavior.

List of Available Data Behaviors for USBHub2x4




Hard Coded






Port Priority



Hard Coded (Default Configuration)

The Hard Coded data behavior is used to fix the Upstream port to a single port and not allow it to move except for a command through the Set Upstream API.

Port Priority

The Port Priority data behavior prioritizes making the Upstream port the lowest numbered port on the USBHub2x4 that is capable of being an Upstream port.

Relevant API’s

stem.hub.setDataRoleBehavior() [cpp] [python] [NET] [LabVIEW]
stem.hub.getDataRoleBehavior() [cpp] [python] [NET] [LabVIEW]