Skip to main content

Capable Robot Programmable USB Hub Driver

This package has two functions:

  • It provides access to internal state of the Capable Robot USB Hub, allowing you to monitor and control the Hub from an upstream computer.
  • It creates a transparent CircuitPython Bridge, allowing unmodified CircuitPython code to run on the host computer and interact with I2C & SPI devices attached to the USB Hub.

Capable Robot logo & image of Programmable USB Hub

Installing

Install and update using pip:

pip install capablerobot_usbhub

This driver requires Python 3.6 or newer.

Additional Linux Instructions

On Linux, the the udev permission system will likely prevent normal users from accessing the USB Hub's endpoint which allows for Hub Monitoring, Control, and I2C Bridging. To resolve this, install the provided udev rule:

sudo cp 50-capablerobot-usbhub.rules /etc/udev/rules.d/
sudo udevadm control --reload
sudo udevadm trigger

Then unplug and replug your USB Hub. Note, the provided udev rule allows all system users to access the Hub, but can be changed to a specific user or user group.

Additional Windows Instructions

On Windows, the low-level USB driver for the Hub's VID/PID must be re-assigned from the default one to the libusbk driver. This can be done with the Zadig GUI, or by executing the following commands:

pip install capablerobot_usbregister
usbregister device usbhub

For additional details on how the usbregister command-line utility work, please vist the CapableRobot_USBRegister repository.

Usage & Examples

The examples folder has some code samples of how to use this Python API to control the Programmable USB Hub. There is also another example repository which includes additional host-side code as well as examples of customizing behavior via changing the Hub's firmware.

Working Functionality

  • Reading USB Hub registers over USB and decoding of register data.
  • Writing USB Hub registers over USB.
  • Reading & writing I2C data thru the Hub.
  • Python API to control and read the two GPIO pins.
  • CircuitPython I2C Bridge to the rear I2C1 port.
  • CircuitPython SPI Bridge to the internal mikroBUS header.

Not Working / Not Implemented Yet

No known errata at this time

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Release files for capablerobot-usbhub 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capablerobot-usbhub 0.5.0
File Size Uploaded
capablerobot_usbhub-0.5.0.tar.gz 578.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for capablerobot-usbhub 0.5.0
File Interpreter ABI Platform
capablerobot_usbhub-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size:1.2 MB

Release files / capablerobot_usbhub-0.5.0.tar.gz

Download URL capablerobot_usbhub-0.5.0.tar.gz
Size 578.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7546821eccfb705416e5b7a949844f98311095eaccdfa6caf22f5aa27b32e987
BLAKE2b-256 checksum
How to use checksums
49e0878d6c8ed124e16adb2d87a236c6ce8a4315969ecf5bbcf8d4edd9f8f987
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.7.1 Darwin/18.7.0

Release files / capablerobot_usbhub-0.5.0-py3-none-any.whl

Download URL capablerobot_usbhub-0.5.0-py3-none-any.whl
Size 595.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6b968527140e7180619e66dd4186f0d90d8e08489dd55c1e8fffadfa892e172
BLAKE2b-256 checksum
How to use checksums
a27435e01613439dd96ba28bb2588240825a2a1ce21fbf646c145d29fb840214
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.7.1 Darwin/18.7.0

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page