io-usb-otg
USB On-The-Go (OTG) server
Syntax:
io-usb-otg [-CcIVv] [-d dll [opts]]* [-E priority] [-e priority]
[-n name] [-O string] [-o dll [opts]]* [-P priority]
[-r num] [-T num] [-t memory=name] [-U priority]
Runs on:
QNX OS
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.
If you specify -c, then you can write your own utility to select configurations
through the libusbdi.so API.
If you don't specify this option, the io-usb-otg server automatically
selects the device's first configuration.
Note:Some devices might not be able to switch the configuration after an initial configuration is selected.
- -d dll [opts]
- Load this DLL, pass it the specified options, and start it. You can specify multiple -d 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.
- -I
- Run without I/O privilege.
Note:
The -I option isn't supported on x86 and x86_64 platforms.
- -n name
- Set the server name; the default is /dev/usb/io-usb-otg.
- -O string
- (
Oh
) Once running, run as the specified user, so that the program doesn't need to run as root. The string can be in one of these forms:- uid[:gid[,sup_gid]*]
- user_name[,sup_gid]*
In the second form, the primary group is the one specified for user_name in /etc/passwd.
- -o dll [opts]
- Load this DLL and pass it the specified options, but don't start the DLL. You can specify multiple -o options.
- -P priority
- Set the priority of 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 server 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 server 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 server version, then exit.
- -v
- Be verbose.
Description:
The io-usb-otg server manages the USB bus and USB protocols through hardware controller drivers (which are 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 server provides USB On-The-Go (OTG) service because it supports both USB host mode and USB device mode. The name of the hardware controller driver passed to a -d or -o option determines whether it's a host-mode DLL (devu-hcd-*) or device-mode DLL (devu-dcd-*).
The -o option is useful for a dual-mode system, because it lets you load pairs of DLLs that perform operations that must be mutually exclusive.
Note that mounting and unmounting DLLs isn't supported in this release. For information on host-mode DLLs and their syntax, see the devu-hcd-* entries. For information on device-mode DLLs and their syntax, see the devu-dcd-* information in your BSP documentation.
The io-usb-otg server handles all data transfers to and from devices connected to the USB bus. Drivers that are clients to the server are responsible for implementing class- or function-specific protocols (for instance, devb-ustor implements mass storage). To communicate with connected devices, class drivers use the host client library to talk to the server, which then talks to the device over the bus. Function drivers use the device client library to talk to the server.
- Class driver and host client library
- Function driver and device client library
- Host or device client library and io-usb-otg server
When a binary mismatch is detected, a warning is logged to slogger2.
The server uses the loaded hardware controller (devu-*) drivers to do data transfers with USB hardware. If a driver is found to be incompatible with the server, the driver isn't started, a warning is logged to slogger2, and the hardware remains inaccessible.
Examples:
io-usb-otg -dehci -dohci -duhci -dxhci
io-usb-otg -dehci ioport=0x02184000, irq=75