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?

Michael Watterson watty at eircom.net
Sun Jul 1 00:25:09 IST 2007


Brian Foster wrote:
>  I'm running SUSE 9.2 and, for various not-relevant
>  reasons, decided to run the YaST2 init(8) “runlevel”
>  editor.  it hung during its initialisation.  after
>  investigating, I determined the bash(1) command:
>
>    isserial </dev/ttyS1
>
>  is hanging; strace(1) shows the (bash) open(2) of
>  /dev/ttyS1 is hanging.  this isn't too surprising
>  since ttyS1 is the serial modem (and all this was
>  done whilst I was off-line; i.e., that serial port
>  is NOT open, and there is probably no other process
>  trying to open it (and the permissions are not the
>  issue!)).
>
>  after a few false starts, I determined the hang is
>  because the line has _somehow_ been configured to
>  require various modem-control signals (i.e., it's
>  not a simple 3-wire connection).  again, not too
>  surprising (albeit it took me awhile to get to
>  this “obvious” point!  ;-\  ).   the (admittedly
>  unused) non-modem serial port is not so configured.
>
>  but at this point I'm stuck:  how does Linux (2.6)
>  configure a serial port to use (or to not use?)
>  modem-control signals?   this is (now) just for my
>  own curiosity since the original YaST2 problem can
>  be solved by a bit of hacking on the relevant shell
>  script.  I've _no_ intention of changing anything
>  w.r.t. the modem or the serial port; I am (now)
>  simply curious.
>
>  ( apologies if this is described someplace; I've
>   drawn a blank with quick searches for an answer.
>   nor did I spot anything in /etc/init.d/*, albeit
>   it's always possible I missed something? .... )
>
> cheers!
> 	-blf-
>   
There seem to be about 3 incompatible ways of doing this. I remember 
last year figuring this for a PIC based LCD + keypad I programmed as a 
terminal connected to serial port. I wanted keypress level interactive. 
The various examples on net about handshanking and how to disable CR 
input buffer AND have my Linux C programming skip char i/p if no key 
pressed (non-blocking).

I'm using two serial programs currently, one does the Xmodem to my 
latest developemtn board and the other handles screen / terminal 
formatting properly. (KDE).  Minicom does handshake, Xmodem & formating, 
but only with a modem. I set worong serial port and now it exits with error.

Presumably there is a Linux KDE equivalent to MS Hyperterminal for 
serial, that is free and actually does what I want, but I don;t know 
what it is.

Additonally there are three schemes for RS232 hardware handshake wiring, 
using one or two or both schemes of HW signalling,. A Modem can use two 
of them at same time, a Terminal or inter PC only needs either of those 
two, and some serial printers have used a third wiring scheme. Oridinary 
modems never use Xon/Xoff SW handshake.

-- 
Mike




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