USB System


Upstream Control

The USBExt3c has the unique ability to designate either of its full featured hub ports (0,1) or the HDBaseT-USB3 link as the upstream connection. This is very useful for moving devices between hosts or testing dual-role port functionality.

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

Enumeration Delay

Once a USB device is detected by the USBExt3c 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]

Power Behavior

Ports 0,1, and control of the USBExt3c are each capable of sourcing 60 watts based on available system power. The method in which power is allocated across these ports is called the power behavior and it can be configured through

stem.hub.setPowerBehavior() [cpp] [python] [NET] [LabVIEW]
stem.hub.getPowerBehavior() [cpp] [python] [NET] [LabVIEW]

Some behaviors require additional configuration. In most cases this is a list of port numbers that define which ports should be prioritized for power allocation.

stem.hub.setPowerBehaviorConfig() [cpp] [python] [NET] [LabVIEW]
stem.hub.getPowerBehaviorConfig() [cpp] [python] [NET] [LabVIEW]

Data Behavior

Many devices are now capable of being Dual-Role Ports (DRP) meaning that they can be both a device (downstream) and a host (upstream). These devices can request to become a host at anytime which may or may not contradict the users desired upstream setting. The method in which these events are handled is referred to as data behavior. Just as power behavior it can be configured with a similar set of APIs

List of Available Data Behaviors for USBExt3c

Behavior

Value

Define

Hard Coded

0

usbsystemDataBehavior_HardCoded

Reserved

1

usbsystemDataBehavior_Reserved

Port Priority

2

usbsystemDataBehavior_PortPriority

Hard Coded

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 or via the Serial Communication Feature.

Newest Connection (default)

The newest connection data behavior assigns the Upstream port role to the port with the most recently connected host-capable device. This means a USB-C connection that’s a sink or a USB PD connection that has described itself as USB Coms Capable and can act as a Host.

Relevant API’s

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

Some behaviors require additional configuration. In most cases this is a list of port numbers that define which ports should be prioritised for power allication.

stem.hub.setDataRoleBehaviorConfig() [cpp] [python] [NET] [LabVIEW]
stem.hub.getDataRoleBehaviorConfig() [cpp] [python] [NET] [LabVIEW]

High-Level Control of the Port Entity

The USBSystem Entity and the Port Entity are capable of doing many of the same things its merely their perspective. The PortClass acts on individual elements where as the USBSystemClass acts on all of the ports. For instance if you wanted to enable all of the ports of the USBExt3c you would need to loop through each index and individually enable each port. With the USBSystem class you can do the exact same thing, but with a single API call with each bit representing a given port.

//USBSystem Entity method.
stem.hub.setEnabledList(0x03); //0b0000 0011 bits 0-1 set high = ports 0-1

//Port Entity method.
for(int x = 0; x <= 1; x++) {
    stem.hub.port[x].setEnabled(true);
}
stem.hub.setEnabledList() [cpp] [python] [NET] [LabVIEW]
stem.hub.getEnabledList() [cpp] [python] [NET] [LabVIEW]

The same logic can also be applied to Data Role, Mode, and State elements, but with slightly different interfaces depending on the size of the data.

stem.hub.setModeList() [cpp] [python] [NET] [LabVIEW]
stem.hub.getModeList() [cpp] [python] [NET] [LabVIEW]

Data Role and State are slightly different in that there are only get calls for these functions:

stem.hub.getDataRoleList() [cpp] [python] [NET] [LabVIEW]
stem.hub.getStateList() [cpp] [python] [NET] [LabVIEW]