Background: io-usb
, the USB stack, and USB drivers on QNX
As Linux is a monolithic kernel operating system, the USB stack is managed directly by the OS. Drivers are written as kernel modules which register themselves with the USB stack on loading and then manage their specific devices.
As QNX is a microkernel operating system, the USB stack isn't part of
the kernel and runs in user space as its own process. On most QNX
images, the USB stack is configured to boot on startup. It should appear as
io-usb
when inspecting processes via pidin
. Drivers are written
as separate processes that communicate with io-usb
using
libusbdi, often providing resources to client applications in some
way.

It's important to note that any given device on the USB Stack can only provide I/O to one driver at a time. This means:
Any included USB class drivers (i.e.,
io-hid
, which covers Class 0x03 Devices) should be used when communicating with said devices, as any additional I/O connections will be denied.Applications should refrain from connecting directly to
io-usb
if possible, as they then block access for the duration of the connection. Instead, create a driver as an intermediary.
Additional resources:
If you need to reference the USB Specification, refer to USB in a NutShell.
For information about QNX Inter-Process Communication, check out QNX's courses, QNX Training Modules.
For an example of a USB Driver, refer to USB and HID Gamepad to Screen Driver. This example demonstrates a USB and HID driver that publishes gamepad inputs to the Screen subsystem.