libusbsio is a Python wrapper for the NXP LIBUSBSIO C library, designed to facilitate interaction with NXP's USB-to-I2C/SPI/GPIO bridge devices. It provides a high-level API for enumerating, opening, and communicating with supported hardware from Python applications. The current version is 2.2.0, with updates typically tied to enhancements or bug fixes in the underlying C library or the Python binding itself.
pip install libusbsioVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to enumerate available NXP SiO devices and open the first one found. It uses a context manager (`with ... as`) to ensure the device is properly closed after use. Note that the underlying NXP LIBUSBSIO C library must be installed on your system for this code to run successfully.
Refer to NXP's documentation or the `libusbsio` Python wrapper's GitHub README for instructions on installing the appropriate C library and drivers for your specific OS (Windows, Linux, macOS).
Configure `udev` rules to grant your user account access to the NXP SiO devices. Typically, this involves creating a rule in `/etc/udev/rules.d/` with the device's Vendor ID (VID) and Product ID (PID), and adding your user to a group like `plugdev` or `dialout`.
Ensure you are using a supported NXP USB-to-I2C/SPI/GPIO bridge device. If you're working with other hardware, a different library will be required.
Install the NXP LIBUSBSIO C library and its necessary drivers/DLLs according to NXP's official instructions. On Windows, ensure the DLLs are in a directory included in your system's PATH environment variable or in the Python script's directory.
Verify that your NXP device is securely connected and powered. Check your OS device manager (Windows) or use `lsusb` (Linux) to confirm the device is visible at the OS level. Ensure the correct NXP drivers are installed.
On Linux, you likely need to set up `udev` rules for the NXP device's Vendor ID (VID) and Product ID (PID) to grant access to a specific user group (e.g., `plugdev`) and add your user to that group. Restart your system or log out/in after changing udev rules/group memberships.