Python

Power measurement with the USBHub3+ with HubTool or Brainstem API

How to monitor voltage and power with the GUI or Python

Among other properties, we can view:

  • Per-port Voltage
  • Per-port Current
  • Input Voltage
  • Input Current

Measuring voltage and current with HubTool

If you haven't already, install HubTool, which is part of the Brainstem Dev Kit.
Power on the hub and connect one of the host ports to your computer

Independently control VBus and data connections on each port of the USBHub3+

The USBHub3+ provides advanced control beyond basic on/off switches, allowing for precise USB customization.

The USBHub3+ can also independently enable and disable Voltage and Data:

  • Vbus
  • All Data
  • High Speed data (480 Mbps)
  • Super Speed data (5 Gbps)

We'll be working interactively using the Brainstem API in a Python console so you can see the results line-by-line. 

Using PyInstaller with Acroname's BrainStem Development Kit

If you are not familiar with PyInstaller it is an application that allows you to bundle a python file or project into a single executable by providing a fully encapsulated environment. The benefit being that you won't need to fuss with setting up a python environment.  Simply execute the application.

Many times pyinstaller can be excuited without any additional commands such as:

Introducing the world’s first industrial programmable USB-C Hub, Power Delivery Analyzer, and Tester

The USBHub3c is designed specifically for mobile device test labs, USB-PD validation testing, USB-C device production testing, end-of-line battery charge, and for testing dual role data (DRD) and dual role power (DRP) devices. Fully programmable, engineers can control USB-PD parameters, connectivity options, real-time measurements, and data.

 

 

Using the Acroname Programmable USB 2x4 hub as a software accessible USB switch between two hosts

How to Accomplish a Host Switch With the USBHub2x4

Often a simple USB switch with a physical button is used to switch USB devices between two different host computers. In many cases it would be nice to execute the host switch without physically pushing a button on the device. The Acroname Programmable USBHub2x4 hub allows a user to switch hosts programmatically without pushing a button.

Up and running with BrainStem using our Python API

Check out our new YouTube video "Up and running with BrainStem using our Python API".

This video details how to properly configure your system to communicate with our Brainstem modules.  It includes: installing Python, pip, and the BrainStem API (.whl).  Once everything is up and running a basic example using a USBStem module is shown.  Configuration, along with the examples, are shown for both Windows and Macintosh platforms (also compatible with Linux).