USB Endpoint

The USB class provides methods to interact with a USB hub and USB switches.

Different USB hub products have varying support; check the datasheet to understand the capabilities of each product.

See the USB Entity for generic information.

PUT /api/v1/brainstem/(serial_num)/usb/(index)/portenable

Enable both power and data lines for a port.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/portdisable

Disable both power and data lines for a port.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/dataenable

Enable the only the data lines for a port without changing the state of the power line.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/datadisable

Disable only the data lines for a port without changing the state of the power line.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/hispeeddataenable

Enable the only the data lines for a port without changing the state of the power line, Hi-Speed (2.0) only.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/hispeeddatadisable

Disable only the data lines for a port without changing the state of the power line, Hi- Speed (2.0) only.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/superspeeddataenable

Enable the only the data lines for a port without changing the state of the power line, SuperSpeed (3.0) only.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/superspeeddatadisable

Disable only the data lines for a port without changing the state of the power line, SuperSpeed (3.0) only.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/powerenable

Enable only the power line for a port without changing the state of the data lines.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/powerdisable

Disable only the power line for a port without changing the state of the data lines.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/portcurrent/(channel)

Get the current through the power line for a port.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/portvoltage/(channel)

Get the voltage on the power line for a port.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/hubmode

Get a bit mapped representation of the hubs mode; see the product datasheet for mode mapping and meaning.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/hubmode

Set a bit mapped hub state; see the product datasheet for state mapping and meaning.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    32-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/portclearerrorstatus

Clear the error status for the given port.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/upstreammode

Get the upstream switch mode for the USB upstream ports. Returns auto, port 0 or port 1.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/upstreammode

Set the upstream switch mode for the USB upstream ports. Values are usbUpstreamModeAuto, usbUpstreamModePort0, usbUpstreamModePort1, and usbUpstreamModeNone.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/upstreamstate

Get the upstream switch state for the USB upstream ports.

Returns 2 if no ports plugged in, 0 if the mode is set correctly and a cable is plugged into port 0, and 1 if the mode is set correctly and a cable is plugged into port 1.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/hubenumerationdelay

Set the inter-port enumeration delay in milliseconds.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    32-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/hubenumerationdelay

Get the inter-port enumeration delay in milliseconds.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/portcurrentlimit/(channel)

Set the current limit for the port.

If the set limit is not achievable, devices will round down to the nearest available current limit setting.

This setting can be saved with a stem.system.save() call.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – USB downstream channel to limit.

Request JSON Object:
  • value (integer) –

    32-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/portcurrentlimit/(channel)

Get the current limit for the port.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – USB downstream channel to limit.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/portmode/(channel)

Set the mode for the Port.

The mode is a bitmapped representation of the capabilities of the usb port.

These capabilities change for each of the BrainStem devices which implement the usb entity.

See your device reference page for a complete list of capabilities.

Some devices use a common bit mapping for port mode, as sub-definitions of usbPortMode.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – USB downstream channel to set the mode on.

Request JSON Object:
  • value (integer) –

    32-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/portmode/(channel)

Get the current mode for the Port.

The mode is a bitmapped representation of the capabilities of the usb port.

These capabilities change for each of the BrainStem devices which implement the usb entity.

See your device reference page for a complete list of capabilities.

Some devices use a common bit mapping for port mode, as sub-definitions of usbPortMode.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – USB downstream channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/portstate/(channel)

Get the current State for the Port.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – USB downstream channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/porterror/(channel)

Get the current error for the Port.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – USB downstream channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/upstreamboostmode

Set the upstream boost mode.

Boost mode increases the drive strength of the USB data signals (power signals are not changed).

Boosting the data signal strength may help to overcome connectivity issues when using long cables or connecting through “pogo” pins.

Possible modes are 0 - no boost, 1 - 4% boost, 2 - 8% boost, 3 - 12% boost.

This setting is not applied until a stem.system.save() call and power cycle of the hub.

Setting is then persistent until changed or the hub is reset.

After reset, default value of 0% boost is restored.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/downstreamboostmode

Set the downstream boost mode.

Boost mode increases the drive strength of the USB data signals (power signals are not changed).

Boosting the data signal strength may help to overcome connectivity issues when using long cables or connecting through “pogo” pins.

Possible modes are 0 - no boost, 1 - 4% boost, 2 - 8% boost, 3 - 12% boost.

This setting is not applied until a stem.system.save() call and power cycle of the hub.

Setting is then persistent until changed or the hub is reset.

After reset, default value of 0% boost is restored.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/upstreamboostmode

Get the upstream boost mode.

Possible modes are 0 - no boost, 1 - 4% boost, 2 - 8% boost, 3 - 12% boost.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/downstreamboostmode

Get the downstream boost mode.

Possible modes are 0 - no boost, 1 - 4% boost, 2 - 8% boost, 3 - 12% boost.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/downstreamdataspeed/(channel)

Get the current data transfer speed for the downstream port.

The data speed can be Hi-Speed (2.0) or SuperSpeed (3.0) depending on what the downstream device attached is using

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – USB downstream channel to check.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/connectmode/(channel)

Sets the connect mode of the switch.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/connectmode/(channel)

Gets the connect mode of the switch.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/cc1enable/(channel)

Set Enable/Disable on the CC1 line.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – USB channel.

Request JSON Object:
  • value (boolean) –

    Boolean value to set.

    May be specified as a boolean, integer, or a string (formatted as “True”, “FALSE”, “1”, etc.)

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/cc1enable/(channel)

Get Enable/Disable on the CC1 line.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – USB channel.

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/cc2enable/(channel)

Set Enable/Disable on the CC2 line.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – USB channel.

Request JSON Object:
  • value (boolean) –

    Boolean value to set.

    May be specified as a boolean, integer, or a string (formatted as “True”, “FALSE”, “1”, etc.)

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/cc2enable/(channel)

Get Enable/Disable on the CC1 line.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – USB channel.

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/cc1current/(channel)

Get the current through the CC1 for a port.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/cc2current/(channel)

Get the current through the CC2 for a port.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/cc1voltage/(channel)

Get the voltage of CC1 for a port.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/cc2voltage/(channel)

Get the voltage of CC2 for a port.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/sbuenable/(channel)

Enable/Disable only the SBU1/2 based on the configuration of the usbPortMode settings.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Request JSON Object:
  • value (boolean) –

    Boolean value to set.

    May be specified as a boolean, integer, or a string (formatted as “True”, “FALSE”, “1”, etc.)

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/sbuenable/(channel)

Get the Enable/Disable status of the SBU

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/cableflip/(channel)

Set Cable flip. This will flip SBU, CC and SS data lines.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Request JSON Object:
  • value (boolean) –

    Boolean value to set.

    May be specified as a boolean, integer, or a string (formatted as “True”, “FALSE”, “1”, etc.)

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/cableflip/(channel)

Get Cable flip setting.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/usb/(index)/altmode/(channel)

Set USB Alt Mode Configuration.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel

Request JSON Object:
  • value (integer) –

    32-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/altmode/(channel)

Get USB Alt Mode Configuration.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/sbu1voltage/(channel)

Get the voltage of SBU1 for a port.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/usb/(index)/sbu1voltage/(channel)

Get the voltage of SBU2 for a port.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

  • channel – The USB sub channel.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value