LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] (en?/dis?)-abling modem-control signals on a (not-open) serial port?

[ILUG] (en?/dis?)-abling modem-control signals on a (not-open) serial port?

Pádraig Brady P at draigBrady.com
Mon Jul 2 10:03:11 IST 2007


Brian Foster wrote:
>  what I'm curious about is how the ¬clocal setting is
>  being arranged?  the port's NOT-open, so (I'm guessing)
>  that mysterious something must have done something to
>  arrange for ¬clocal?

Those bits are stateful in the kernel so can be changed
by any program/script that opens it. Note they do default
to a known state at boot. You can (and must) set those bits
(including clocal) before using the port. One can do this
from the command line using the stty command.

Here is a python example where I set CLOCAL specifically so
open() will not hang: http://www.pixelbeat.org/programs/Tira-2/Tira-2.py

A general note, is serial programming is tricky.
I found the following required reading:
http://www.easysw.com/~mike/serial/
http://www.danlj.org/lad/ "Terminals and Pseudo Terminals" chapter

Pádraig.



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell