Linux "ldattach" Command Line Options and Examples
attach a line discipline to a serial line

The ldattach daemon opens the specified device file (which should refer to a serial device) and attaches the line discipline ldisc to it for processing of the sent and/or received data. It then goes into the background keeping the device open so that the line disci‐ pline stays loaded. The line discipline ldisc may be specified either by name or by number.


Usage:

ldattach [-1278denoVh] [-i iflag] [-s speed] ldisc device




Command Line Options:

-1
Set the number of stop bits of the serial line to one.
ldattach -1 ...
-2
Set the number of stop bits of the serial line to two.
ldattach -2 ...
-7
Set the character size of the serial line to 7 bits.
ldattach -7 ...
-8
Set the character size of the serial line to 8 bits.
ldattach -8 ...
-d
Keep ldattach in the foreground so that it can be interrupted or debugged, and to print verbose messages about its progress tostandard error output.
ldattach -d ...
-e
Set the parity of the serial line to even.
ldattach -e ...
-i
Set the specified bits in the c_iflag word of the serial line. The given value may be a number or a symbolic name. If valueis prefixed by a minus sign, the specified bits are cleared instead. Several comma-separated values may be given in order toset and clear multiple bits.
ldattach -i ...
-n
Set the parity of the serial line to none.
ldattach -n ...
-o
Set the parity of the serial line to odd.
ldattach -o ...
-s
Set the speed (the baud rate) of the serial line to the specified value.
ldattach -s ...
-c
Define an intro command that is sent through the serial line before the invocation of ldattach. E.g. in conjunction with linediscipline GSM0710, the command ´AT+CMUX=0\r´ is commonly suitable to switch the modem into the CMUX mode.
ldattach -c ...
-p
Sleep for value seconds before the invocation of ldattach. Default is one second.
ldattach -p ...
-V
Display version information and exit.
ldattach -V ...
-h
Display help text and exit.
ldattach -h ...