Starting the char driver
It's important to note that QNX provides a set of character drivers,
classified as devc-*
or
devc-ser*
, which include:
devc-con
(Only available for X86_64 target)devc-con-hid
(Only available for X86_64 target)devc-serpl011
Each of these drivers have different set of options and specifications.
To view these specifications, you can either utilize the use
command
or consult the documentation. The generic devc-*
or
devc-ser*
options are available on top of each specific serial driver options.
Here is an example command of using the use
command and starting the
devc-serusb
driver:
root@qnxpi:~# use devc-serusb
devc-serusb - Driver for USB-to-serial adapters
devc-serusb [options]
devc-serusb specific options:
-d args[,args ...] Device-specific options. See below.
-t Test the connection by completing the initialization
but don't begin processing data and just exit afterwards.
Use this option if you want to confirm that the device is
connected properly, without running any data through the driver.
The device-specific options that you can specify with the -d option are:
args:
busno=bus The bus number of the USB controller.
debug=[rx|tx|intr|all|none] Write raw URB data to slogger2.
devno=dev The USB address of the device.
did=did The device ID of the device.
drt=num Data ready timeout (device-specific).
dtrtx=[hi|lo] DTR TX line mode for MOSCHIP 7840 device in RS485 mode. Default is "hi".
ifaces=idx[:idx] A list of USB interfaces to use. Must specify at least one interface.
Use a colon (:) to separate multiple interfaces.
ign_remove Specify to prevent the removal callback from being attached.
mode=name Mode RS485 or RS232 (Default: rs232)
module=name Set the hardware module to use for an unknown vendor ID or device ID.
name=name The basename for the pathname entry. The default is /dev/serusb.
path=name Connect to the specified USB stack. Default is"/dev/usb/io-usb-otg".
pindex=idx Set the port that the index options are to be applied to.
priority=num Set the priority of the event-processing thread. Default is 21.
query_modules Display the currently supported hardware modules.
retry=num The number of retries if a status of USBD_STATUS_DEV_NOANSWER is given.
rx_urbs=num The number of URBs for BulkIn. Default is 4.
tx_urbs=num The number of URBs for BulkOut. Default is 4.
unit=num Unit number (1 = /dev/serusb1, 2 = /dev/serusb2, etc..)
Default = first available number starting from 1.
vid=vid The vendor ID of the device.
wait=num Wait num seconds for the USB stack. Default is 60 seconds.
Note:
If you provide the busno and devno arguments, then the driver
will not attach an insertion callback to detect newly inserted devices.
The driver will only work with the already inserted device that
corresponds to the arguments specified on the command line. When the
device is removed the driver will be terminated (unless the ign_remove
option was also specified).
Note:
The unit option only has meaning when the driver is started for a
specific device by using the busno and devno arguments. If
the driver is managing device insertions then the default behavior
will always apply.
Note:
As this is a USB class driver, the USB server must be running prior to
starting this driver.
io-char common options(Apply for all devc-*)
-C number Size of canonical input buffer (default 256)
-e Set options to "edit" mode
-E Set options to "raw" mode (default)
-f Enable hardware flow control (default)
-F Disable hardware flow control
-I number Size of raw input buffer (default 2048)
-o opt[,opt] string options:
disable=rx (Disable the UART receiver on driver startup)
devperm (Set permissions to the serial device)
highwater=value (RX watermark for input flow control (bytes))
kdebug (Drop into Kernel Debugger)
log=flow[@directory_path] (Specify whether to log data for receive, transmit, or both. Default log directory is /dev/shmem)
Specify one of these values for flow:
tx — transmit data only
rx — receive data only
all — both transmit and receive
nodaemon (Don't call procmgr_daemon() to make the driver run in the background)
priority=prio (Set the working priority of the internal pulse as a numeric value)
smmu=0|1|off|on (Specify whether or not support for the system memory management unit (IOMMU/SMMU) manager is required)
0 or off — disable SMMU support. This is the default.
1 or on — SMMU support is required
termflags=[-]flag[:[-]flag]* (Specify terminal flag settings)
ticksize_ms=value (timer granularity in ms. default 50ms)
-O number Size of output buffer (default 2048)
-s Enable software flow control
-S Disable software flow control (default)
-v Increase verbosity level(default 2)
io-char serial options(Apply for devc-ser* and devc-virtio only)
-b number Define initial baud rate (default 115200)
-c clk/div Set the input clock rate and divisor
-u unit Set serial unit number (default 1)
devc-serusb -d vid=0x045c,did=0x0195,busno=0,devno=2,module=generic,ign_remove
Page updated: