Serial HOWTO
11. Interesting Programs You Should Know About11.1 Serial Monitoring/Diagnostics Programs• 11.2 Changing Interrupt Priority• 11.3 What is Setserial ?•
16.9 "Cannot open /dev/ttyS?: Device or resource busy• 16.10 "Cannot open /dev/ttyS?: Permission denied"• 16.11 "Cannot open /dev/
21. Other Serial Devices (not async RS-232)21.1 Successors to RS-232• 21.2 EIA-422-A (balanced) and EIA-423-A (unbalanced)• 21.3 EIA-485• 21.4 EIA-530
as well as some of the other HOWTOs. (See Related HOWTO's) This HOWTO lists info on various multiportserial cards. This HOWTO addresses Linux run
compare it to this version: v2.27 February 2011 .1.3 New in Recent VersionsFor a full revision history going back to the time I started maintaining th
Each serial port has a "file" associated with it in the /dev directory. It isn't really a file but it seems like one.For example, /dev/
3.1 TransmittingTransmitting is sending bytes out of the serial port away from the computer (output). Once you understandtransmitting, receiving (inpu
Another interrupt is issued to tell the device driver to send yet another byte to the now empty transmitbuffer3. Thus we say that the serial port is i
Both of these buffers are managed by the serial driver. But the driver does more than just dealing with thesebuffers. It also does limited filtering (
RS-232 (EIA-232, etc.)The serial port (not the USB) is usually a RS-232-C, EIA-232-D, or EIA-232-E. These three are almost thesame thing. The original
Table of Contents Serial HOWTO...
only by that port. Thus the FIFO waits until it has received a number of bytes and then issues an interrupt.However, this interrupt will also be sent
4.6 Flow ControlFlow control means the ability to slow down the flow of bytes in a wire. For serial ports this means the abilityto stop and then resta
Symptoms of No Flow ControlUnderstanding flow-control theory can be of practical use. The symptom of no flow control is that chunks ofdata missing fro
transmitted to the modem or (other device connected to the serial port) which also has a fair sized (say 1k)buffer. When the device driver (on orders
Now lets consider an example of the operation of flow control. Consider the flow of bytes from the remotecomputer at the other end of the phone line t
remote computer had a flow path to the hard-disk without bottlenecks, the same flow also went to a terminalwhich issued flow control "stops"
In 1888 (over 120 years ago) the "Cable Conference" reported its support of twisted-pair (for telephonesystems) and pointed out its advantag
like dumb serial cards do). Not all "smart" boards are equally efficient. Many boards today are Plug-and-Play.5.3 Getting/Enabling a DriverI
5.4 Multiport Devices in the /dev Directory,The serial ports your multiport board uses depends on what kind of board you have. Some have their owndevi
others) simultaneously. See Avoiding IO Address Conflicts with Certain Video Boards5.7 Dumb Multiport Serial Boards (with standard UARTchips)They are
Table of Contents Serial HOWTO4.4 Interrupts...
BB-1004 and BB-1008 do not support DCD and RI lines, and thus are not usable for dialin modems. Theywill work fine for all other purposes.Digi PC/8 In
Decision PCCOM (2-8 ports; ISA and PCI; aka PC COM)ISA:contact: mailto:[email protected] location: (dead link) ftp://ftp.cendio.se/pub/pccom8PCI:dr
driver status: supported by Microgate: synclink.oMoxa C218 (12MHz 80286; 8 ports),Moxa C320 (40MHz TMS320; 8 - 32 ports)website: http://www.moxa.comdr
server, communicating with the server over a network.There are two basic types of serial servers. One type is just an ordinary computer (perhaps rack
using a menu or a configuration file. This high-level configuring may also be done manually with the sttyprogram. stty is also useful to view the curr
When Linux starts, an effort is made to detect and configure (low-level) the serial ports. Exactly what happensdepends on your BIOS, hardware, Linux d
While kernel 2.2 supported PCI in general, it had no support for PCI serial ports (although some people gotthem working anyway). Starting with kernel
pairs are identical you must find out how they are set in both the driver and the hardware.8.6 What is the IO Address and IRQ per the driver ?Introduc
there because the configuration file is incorrect.With old jumper-set serial ports Linux sometimes gets IRQs wrong because it doesn't by default
8.7 What is the IO Address & IRQ of my Serial PortHardware?IntroductionIf it's PCI or ISA PnP then what's set in the hardware has been d
Table of Contents Serial HOWTO8.8 Choosing Serial IRQs...
ISA PnP portsFor an ISA Plug-and-Play (PnP) port one may try the pnpdump program (part of isapnptools). If youuse the --dumpregs option then it should
Interrupt sharing, Kernels 2.2+Sharing of IRQs is where two devices use the same IRQ. As a general rule, this wasn't allowed for the ISAbus. The
serial board it may not be able to use IRQs 8 and above.Make sure you don't use IRQs 1, 6, 8, 13 or 14! These are used by your motherboard. You w
Plug-and-Play (PnP) was designed to automate this io-irq configuring, but for Linux it initially made lifemuch more complicated. In modern Linux (2.4
9.2 Flow ControlConfiguring Flow Control: Hardware Flow Control is Usually Best See Flow Control for an explanation of it.It's usually better to
this to /etc/udev/udev.rulesBUS=="pci" KERNEL=="ttyS3", NAME="ttyS14"On-board serial ports on motherboards which have bo
doesn't fall into this trap so it's now OK to use such links.10.7 Which Connector on the Back of my PC is ttyS1, etc?Inspect the connectorsI
virtual terminal you may send something to ttyS2 (or whatever) by "echo test_message > /dev/ttyS2". Then goback to the receive virtual te
11.1 Serial Monitoring/Diagnostics ProgramsA few Linux programs (and one "file") will monitor various modem control lines and indicate if th
the jumperless serial port is set, setserial is not really needed anymore unless you're having problems orusing old hardware. Furthermore, if the
Table of Contents Serial HOWTO11.5 What is isapnp ?...
buffer (in main memory) were sent to the printer. The result was a truncated print job that didn't print the lastparagraph or last page, etc.But
should show where the configuration file(s) reside. In Debian there are 4 options for use of this configurationfile:Don't use this file at all. A
Boot-time ConfigurationWhile setserial may run via an initialization script, something akin to setserial also runs earlierwhen the serial module is lo
setserial, and a valid device name. You could do a test by executing this file manually (just type its nameas the super-user) to see if it works right
"AUTOSAVE-ONCE" option was created which only does a save when time the system is shut down for thefirst time (just after you install or upd
Introductionstty does much of the configuration of the serial port but since application programs (and the getty program)often handle this, you may no
ixany: Mainly for terminals. Hitting any key will restart the flow after a flow-control stop. If you stopscrolling with the "stop scroll" ke
it's a setting not allowed in raw mode).This situation can create problems. For example, suppose you corrupt your terminal interface. To restore
this you likely will have to reconfigure minicom and then exit it and restart it. Instead of all this bother, it maybe simpler to just reboot the PC o
12. Speed (Flow Rate)By "speed" we really mean the "data flow rate" but almost everybody incorrectly calls it speed. The speed ism
Table of Contents Serial HOWTO16.14 "Device /dev/ttyS? is locked."...
(a positive integer). This "divisor" divides the "maximum speed" of the hardware resulting in a slower speed(except a divisor of 1
FAQ is at http://www.best.com/~cae/irqtune13. Locking Out Others13.1 IntroductionWhen you are using a serial port, you may want to prevent others from
Using alternate names such as /dev/modem for /dev/ttyS2 may cause problems if one program opens/dev/ttyS2 while another program opens /dev/modem. This
ZyXEL is a control program for ZyXEL U-1496 modems. It handles dialin, dialout, dial backsecurity, FAXing, and voice mailbox functions.• SLIP and PPP
15.2 Kernel Configuration15.3 Number of Serial Ports SupportedIf you have more than 4 (or possibly 2) serial ports, then you must insure that the kern
Avoiding IO Address Conflicts with Certain Video BoardsThe IO address of the IBM 8514 video board (and others) is allegedly 0x?2e8 where ? is 2, 4, 8,
means off (-12 v). They also sell a "RS-232 Serial Jumper Box" Cat. #276-1403. This permits connecting thepins anyway you choose. Both these
number to it.Your port does have a ttyS number assigned to it (like ttyS14) but you don't know which physicalconnector it is (on the back of your
to create a conflict. But a real conflict can be created if "setserial" has told the kernel incorrect info. Thekernel has been lied to and t
Check the file permissions on this port with "ls -l /dev/ttyS?"_ If you own the ttyS? then you need read andwrite permissions: crw with the
Table of Contents Serial HOWTO22.2 Serial Software...
manually. Of course if there is no such process as 100 then you may just remove the lockfile but in most casesthe lockfile should have been automatica
busy message goes away, it was likely a potential interrupt conflict. It's not a good idea to leave itpermanently set at 0 since it will put more
16.21 Almost all characters are wrong; Many missing ormany extrasPerhaps a baud mismatch. If one port sends at twice the speed that the other port is
For the obsolete serial ports, only one character gets thru every several seconds. This is so slow that it seemsalmost like nothing is working (especi
internal modem, the serial port is on the same card and it's likely to check that this 16-byte receive buffer hasroom for more bytes before putti
Check /proc/interrupts to see if the IRQ is currently in use by another process. If it's in use by another serialport you could try "top&quo
a one-byte buffer.18.3 FIFOsTo understand the differences between dumb and FIFO (First In, First Out queue discipline) first let's examinewhat ha
If the serial port buffer contains 64 bytes ready to send when it receives a flow control signal to stop sending,it will send out the 64 bytes anyway
4 20 DTR Data Terminal Ready--> I'm ready to communicate 1 8 DCD Data Carrier Detect<-- Modem connecte
pins 2 and 3 cross over each other (if you draw them on a sheet of paper). The above example is for a 25 pinconnector but for a 9-pin connector the pi
Serial HOWTODavid S.Lawyer [email protected] original by Greg Hankinsv2.27 February 2011This document is for the UART serial port. This port has mostly di
The DTR and DSR PinsJust like RTS and CTS, these pins are paired. For DTE-to-DTE connections they are likely to cross over.There are two ways to use t
20.2 Voltage Sequence for a ByteThe transmit pin (TxD) is held at -12 V (mark) at idle when nothing is being sent. To start a byte it jumps to+12 V (s
Don't confuse this type of framing with the framing used for a packet of bytes on a network. The serial portjust frames every byte. For a network
ports as "modem port", "printer port", and/or "GeoPort".Mac also provided conventional RS-232 but at only at 5 volts (wh
limited to short distances of at most 5 meters (depends on configuration). Linux supports the bus, although notall devices that can plug into the bus
intervals between bytes (like someone typing characters at a keyboard).When a file is being sent thru the async serial port, the flow of bytes will li
Notes re books:"... Complete" has hardware details (including register) but the programming aspect is Windoworiented.1. "Physical Layer
23. Appendix A: Very Obsolete Hardware/Software23.1 Replacing pre 1990 UARTSMany 486 PCs (old) and all Pentiums (or the like) should have modern 16550
23.5 Lock-Files if you used the depreciated devfsThe abandoned device-filesystem (devfs) has the /dev directory with subdirectories. As of late 2001,
5. Multiport Serial Boards/Cards/Adapters5.1 Intro to Multiport Serial• 5.2 Dumb vs. Smart Cards• 5.3 Getting/Enabling a Driver• 5.4 Multiport Devices
Comments to this Manuals