[Previous] [Contents] [Next]

Dev.ser

Serial device driver (QNX)

Syntax:

Dev.ser [[options]... [portspec...]]... &

Options:

The Dev.ser driver does not follow the utility syntax conventions. All options do not necessarily appear before operands; they may be intermixed. Options apply to those operands which follow them on the command line.

portspec
One of:
port[,irq[,p]]
A serial I/O port (in hex). A ",irq" after port specifies the IRQ (in decimal) used by the port. By default the interrupt will be autodetected. A ",p" after port and irq tells Dev.ser that the device is going to be found on a PCMCIA card (any socket).
p[socket[,socket]...]
A PCMCIA serial port in one of the socket(s) named.
-b number
The initial baud rate for subsequent ports (default is 9600).
-C number
The size of the canonical input buffer (default is 256 bytes).
-d
Set initial state of DSR to on (default).
-D
Set initial state of DSR to off.
-e
Set all subsequent ports to "edited" mode.
-E
Set all subsequent ports to "raw" mode (default).
-f
Enable hardware flow control on all subsequent ports and lock it on (default).
-F
Disable locked hardware flow control on all subsequent ports.
-h number
The flow control high-water mark (as a number of bytes of the input buffer in use) for subsequent ports (default is 75% of the input buffer -- see -I, below).
-I number
The size of the raw input buffer (default is 2048 bytes).
-l number
("el") The flow control low-water mark (as a number of bytes of the input buffer in use) for subsequent ports (default is 25% of input buffer -- see -I, above).
-m
Disable modem carrier processing (HUP).
-M
Enable modem carrier processing (HUP). Default.
-N name
Use this prefix for the device name. If a full path (i.e. one which includes the directory under which the device should be registered) is not specified, the name will implicitly be registered under /dev. (default is /dev/ser)
-O number
The size of the raw output buffer (default is 2048 bytes).
-p
Enable packet mode. (Modem status change causes "packet" event.)
-P
Disable packet mode (default)
-r
Set initial state of RTS to on (default).
-R
Set initial state of RTS to off.
-s
Enable split of output flow control signals -- transmission requires CTS only (default).
-S
Disable split of output flow control signals -- transmission requires both CTS and DSR.
-t number
Set 16550 FIFO threshold to 1, 4, 8 or 14 to help minimize CPU utilization. 0 disables the FIFO. (Default 0)
-w
Enable hardware shutdown on SIGPWR.
-W
Disable hardware shutdown on SIGPWR (default)
-x
Enable software flow control (XON/XOFF) on all subsequent ports and lock it on.
-X
Disable locked software flow control on all subsequent ports (default).
-y
Set baudrate divisor (default is 115200).

Description:

The Dev.ser driver manages standard PC/AT and PCMCIA serial port devices in a QNX system, including multiport devices which appear as standard serial ports on the bus but which may share a common interrupt. Serial "smartcards" require special drivers from other companies (such as the smartcard manufacturer).

If no serial ports are specified on the command line, Dev.ser scans the hardware, looking for a port at 3F8 (COM1) or a port at 2F8 (COM2), or both. If COM1 is present, Dev.ser assumes that it uses interrupt IRQ 4; if COM2 is present, Dev.ser assumes that it uses interrupt IRQ 3. If the scan shows that neither of COM1 nor COM2 is present, Dev.ser terminates.

Locking flow control prevents application programs -- with the exception of stty -- from changing the flow control modes.

When using -t to enable the 16550 FIFO, be aware that it will not generate a receive interrupt until either the FIFO is full or 4 idle character times at the current baud rate have elapsed. This could have ramifications for low-latency protocol applications. Note that the 16550 will always buffer incoming data. The -t option affects only the generation of interrupts.


Note:

Dev.ser must be run as root and may be started only after the Device Manager (Dev) has been started.


Examples:

Scan for COM1 and COM2:

    Dev.ser &

Set port at 3F8 as a raw device at 1200 baud, and port at 2F8 as an edited device at 9600 baud:

    Dev.ser  -E -b 1200 3f8,4  -e -b 9600 2f8,3  &

Specify a standard COM1 port at 3F8 as well as four ports on a multiport card:

    Dev.ser  3f8,4 280,3 288,3 290,3 298,3  &

Do the same, but allow Dev.ser to autodetect the IRQs used for the four ports:

    Dev.ser  3f8 280 288 290 298 &

Set the driver up for one serial port /dev/ser1 which will be a PCMCIA card in socket 1 or 2:

    Dev.ser p1,2 &

Set the driver up for two serial ports (/dev/ser1 and /dev/ser2 one of which will be a PCMCIA card in socket 1 and the other a PCMCIA card in socket 2:

    Dev.ser p1 p2 &

Set the driver up for two serial ports at 0x3f8/irq3 and 0x2f8/irq4, plus a third serial port at 0x3e8/irq7 which will be found on a PCMCIA card which may be in any socket:

    Dev.ser 3f8,3 2f8,4 3e8,7,p &

Files:

Dev.ser closes its standard input, standard output and standard error immediately upon startup.

Dev.ser will cause Dev to adopt a number of character special files under its directory (/dev). These will usually be named sern, where n will range from 1 to the number of serial devices encountered during the scan of possible port locations or specified explicitly on the command line. The base filename (ser) will be different if the -N is specified with an alternate name.

Exit status:

Dev.ser will terminate only upon receipt of a signal or upon encountering a problem during startup.

0
Received a signal and performed a clean shutdown or Dev.ser scanned for serial ports (none specified on the command line) and found none.
12
Failed to mount driver with Dev
19
Failed to arm driver with Dev
23
Failed to register driver with Dev
34
Too many ports specified on the command line. (>64)

Note:

A common cause of failure on startup is that Dev has hit its maximum number of devices and rejects the driver's attempt to register. If this happens, increase the value of Dev's -n option.


See also:

Dev, Dev.*, modem, Mouse, Net.fd, qtalk, qcp, stty, tinit

QNX Installation & Configuration


[Previous] [Contents] [Next]