io-usb-otg

On-The-Go (OTG) manager for USB

Syntax:

io-usb-otg [-CcVv] [-d dll [opts] ] [-E priority] [-e priority] 
           [-n name] [-o dll [opts]] [-P priority] 
           [-r num] [-T num] [-t memory=name] [-U priority]

Runs on:

QNX Neutrino

Options:

-C
Don't configure a device, even if it has only one configuration.
-c
Don't select a device configuration if the device has more than one configuration. See Device configuration below.
-d dll [opts]
Load this DLL and pass it the specified options.
-E priority
Set the priority of the transaction-timeout thread for the host bus; the default is 10.
-e priority
Set the priority of the enumeration thread; the default is 10.
-n name
Set the manager name; the default is /dev/usb/io-usb-otg.
-o dll [opts]
Load this DLL and pass it the specified options, but don't start the DLL.
-P priority
Set the priority for the server; the default is 21.
-r num
Set the number of enumeration retries; the default is 3.
-s smmu=[0 | 1 | off | on]
Use the QNX System Memory Management Unit Manager (SMMUMAN).

If the smmuman service is running, you can specify 1 or on to configure io-usb-otg to interface with smmuman to manage ("cage") access for non-CPU initiated reads and writes (i.e., DMA devices). If you specify 1 or on but smmuman isn't running, the io-usb-otg manager fails to start.

The default setting is 0 or off. An invalid setting is treated as off.

-t memory=name
Set the typed-memory name. This option tells the stack to allocate memory from the specified typed-memory region, such as the memory used for usbd_alloc(), and from other internal memory that's needed to transfer data from the USB chip. The default is /memory/below4G.
-T num
Set the default control transfer timeout, in milliseconds; the default is 2000.
-U priority
Set the priority of the usbmgr thread; the default is 10.
-V
Display the manager version, then exit.
-v
Be verbose.

Description:

The io-usb-otg manager manages the USB bus and USB protocols through hardware controller drivers (DLLs). The -d and -o options let you load the DLLs when you start io-usb-otg; to load more than one DLL, use multiple -d or -o options.

The io-usb-otg manager supports both USB host mode and USB device mode; the default mode is determined by the DLL passed to the -d option. The -o option is useful for a dual-mode system, as it lets you load DLLs for both modes. Typically, you use -o in conjunction with an external process such as the USB launcher service (usblauncher_otg), which can automatically start and stop the appropriate DLLs when io-usb-otg switches from one mode to the other. See the USB launcher chapter in the Device Publishers Developer's Guide for more information about this service.

Note: If you load a device-mode DLL, it must appear on the command line before any host-mode DLLs.

Note that mounting and unmounting DLLs isn't supported in this release. For information on DLLs and their syntax, see the devu-* entries.

The io-usb-otg manager handles all data transfers to and from devices connected to the USB bus. Drivers external to the manager are responsible for implementing class- or vendor-specific protocols (for instance, mass storage); these drivers communicate with the connected devices through the io-usb-otg manager.

Device configuration

You should use the -c option in conjunction with a launcher application such as usblauncher_otg, which chooses a device's configuration before launching the driver to manage a device's interfaces.

A launcher application must choose a default configuration for any device with more than one configuration, or the device won't function:

Note: Some devices might not be able to switch the configuration once an initial configuration is selected.

Examples:

Start the USB stack and USB drivers on a PCI-based system:

io-usb-otg -dehci -dohci -duhci -dxhci

Start the USB stack and the EHCI (high speed) USB driver:

io-usb-otg -dehci ioport=0x02184000, irq=75