(M)  s i s t e m a   o p e r a c i o n a l   m a g n u x   l i n u x ~/ · documentação · suporte · sobre

  Next Previous Contents

1. Introduction

This is the Linux Serial Programming HOWTO. All about how to program communications with other devices / computers over a serial line under Linux. Different techniques are explained: Canonical I/O (only complete lines are transmitted/received), asyncronous I/O, and waiting for input from multiple sources.

This document does not describe how to set up serial ports, because this has been described by Greg Hankins in the Serial-HOWTO.

I have to emphasize that I am not an expert in this field, but have had problems with a project that involved such communication. The code examples presented here were derived from the miniterm code available from the LDP programmers guide (ftp://sunsite.unc.edu/pub/Linux/docs/LDP/programmers-guide/lpg-0.4.tar.gz and mirrors) in the examples directory.

Since I wrote this document in June 1997, I have moved to WinNT to satisfy customers need, so I have not built up more in depth knowledge. If anybody has any comments, I will gladly incorporate them into this document (see sect. Feedback). If someone would like to take over and do a better job, please e-mail me.

All examples were tested using a i386 Linux Kernel 2.0.29.

1.1 Copyright

The Linux Serial-Programming-HOWTO is copyright (C) 1997 by Peter Baumann. Linux HOWTO documents may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions.

All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice. That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below.

In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright on the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs.

If you have questions, please contact Tim Bynum, the Linux HOWTO coordinator, at linux-howto@sunsite.unc.edu via email.

1.2 New Versions Of This Document

New versions of the Serial-Programming-HOWTO will be available at
ftp://sunsite.unc.edu:/pub/Linux/docs/HOWTO/Serial-Programming-HOWTO and mirror sites. There are other formats, such as PostScript and DVI versions in the other-formats directory. The Serial-Programming-HOWTO is also available at http://sunsite.unc.edu/LDP/HOWTO/Serial-Programming-HOWTO.html and will be posted to comp.os.linux.answers monthly.

1.3 Feedback

Please send me any corrections, questions, comments, suggestions, or additional material. I would like to improve this HOWTO! Tell me exactly what you don't understand, or what could be clearer. You can reach me at Peter.Baumann@dlr.de via email. Please include the version number of the Serial-Programming-HOWTO when writing, this is version 0.3.

Next Previous Contents