devu-umass_client-block

Function driver for USB mass storage devices

Note: You must be logged in as root, and start the USB DCD stack (see io-usb-otg) before you start this driver.

Syntax:

devu-umass_client-block [options*] &

Runs on:

QNX Neutrino

Options:

-l lun_options[,lun_options]*
Specify options by logical unit, separated by commas; see LUN options,” below.

You can specify more than one -l. Specifying mutiple lun_options presents multiple logical devices to the host.

-n name
The name associated with the resource manager (the default is /dev/umass_client). You must also specify the -r option.
-p prio
Specify the event priority. The default is 20.
-r
Enable resource manager initialization. This provides access to the _IO_DEVCTL messages.
-s stack
The name of the stack to attach to (default: /dev/usb/io-usb-otg).
-U user_name
-U uid[:gid[,sup_gid]*]]
Once running, run as the specified user, so that the program doesn't need to run as root:
  • In the first form, the service sets itself to be the named user and uses that user's groups. This form depends on the /etc/passwd and /etc/group files.
  • In the second form, the service sets its user ID, and optionally its group ID and supplementary groups, to the values provided.
-v
Be verbose. Additional v characters increase the verbosity (default I/O and memory errors):
  • -v: Mass Storage Class (MSC) errors
  • -vv: level debug info
  • -vvv: SCSI_WRITE10 debugging information
  • -vvvv: Extra debugging information
-w secs
Wait sec seconds for the USB stack (default: 60 seconds).

LUN options

Each set of lun_options specified with the -l option is in this form:

lun=lun_id[,option]*

All options after a lun option target the preceeding specified LUN ID. LUN identifiers must start at index 0 and be sequential to a maximum of 3 (four LUNs total).

The options include:

fname=filesystem
Specify the filesystem name to be used by the driver. If not specified, no filesystem will be visible to the host.
iface=if
Specify the interface number associated with current option list (default=0). The interface specified should match a valid MSC interface number found in the device descriptors information.
ltype=lun_type
Indicate the type of medimum presented to host. For CDROM devices, you must specify ltype=cd. You don't need to specifiy this option for other types of devices.

The cd option also implies the rdonly option. The provided filesystem would normally be a preformatted CDROM image.

rdonly
Mark the initial state of media as read-only.
scsi_pid=string
The SCSI product ID string (default: USB udisk).
scsi_rev=string
The SCSI revision string (default: 124).
scsi_vid=string
The SCSI vendor ID string (default: QNX Disk).
Note: Use commas to separate the options. You must specify at least one option. Specify the lun or iface option first (when needed); otherwise values will be applied to default options and could cause unexpected behavior. The remaining options can be presented in any order.

Description:

The devu-umass_client-block driver is the function driver for USB Mass Storage Class Bulk-Only (BBB) devices. It also complies with the USB Mass Storage Class Bootability and the USB Mass Storage Class Compliance Test specifications. This driver, in combination with the USB device controller driver (DCD) stack (io-usb-otg) supports a MSC (Mass Storage Class) interface presented to a connected USB host.

Note: The host machine (e.g., Windows, Mac, Linux ) can't access the data stored in the filesystem (on the target hardware) at the same time as applications running on the target hardware. There will be a conflict as both filesystems believe they have exclusive access to the raw media for filesytem updates. Doing so will cause corruption of the filesystem as both filesytems may attempt to update the media without the other's knowledge. Once the board is disconnected or ejected from the host, it's safe to mount and access the filesystem from applications on the target hardware.

Examples:

Start the driver without arguments. No filesystem is visible to the host:

devu-umass_client-block &

Start the driver and specify a filesystem associated with LUN 0:

devu-umass_client-block -l lun=0,fname=/tmp/disk.img &

Start the driver and specify a filesystem associated with LUNs 0 and 1, specifing that LUN 1 is a CDROM:

devu-umass_client-block -l lun=0,fname=/tmp/disk.img -l lun=1,ltype=cd,fname=/tmp/cdrom.img &

Do the same as the previous example, but using only one -l option to provide multiple LUN configurations. Increase the driver verbosity to level 3 (SCSI_WRITE10):

devu-umass_client-block -l lun=0,fname=/tmp/disk.img,lun=1,ltype=cd,fname=/tmp/cdrom.img -vvv &