Detecting DCD

Detecting DCD

Post by Kevin Wormingto » Fri, 27 Feb 1998 04:00:00



I am very new to serial programming, so please forgive me if this is a
simple question.  I want to be able to detect DCD on a multi-port serial
line that does not support TIOCMIWAIT.  Is there any other method I can use
to cause portslave to "wait" for DCD from the modem??  The general idea is
to set the modem for auto-answer and have portslave wait for DCD from the
modem to begin the login/ppp process.

Please reply via e-mail as well as usenet.

Thanks in advance

Kevin

 
 
 

1. How to detect DCD on serial port

 Hi ! .. I was trying to make some software for my computer ...

 What I want is :

 It is "SUPOSSED" that if I try and OPEN on a serial port and there is  
 NO DATA CARRIER DETECT (DCD), the OPEN rutine MUST BLOCK until DCD is UP .

 RIGHT ??? So when the electricity goes off I can sense it, then make DCD UP
  in the serial port and then shutdown my machine before my UPS goes off
   ... easy isn't ?

 Well I'm programming on a NeXT (OS 2.0) the manual (zs) says :

   When /dev/ttyda is opened, the device driver
                    asserts DTR and then blocks waiting for the
                    modem to assert DCD
 OK ?

 So I was using /dev/ttyda and then make an open call BUt it returns
  inmediately !!! and there is nothing in the serial port A.

 Well this is my first problem ... is there a way to make this posible ??

 Another solution may be to open the port and then make a call to get some
 paremeters, maybe DCD as says <sys/ioctl>  :

#define         TIOCM_CAR       0100            /* carrier detect */

 So anybody out there knows how to get this parameter ?
 or how to make the OPEN call to blocks ??

 Many thanks in advance !!
 _____________________________________________________________________________
 Jose Angel Vela Avila.
  Instituto Tecnologico y de Estudios Superiores de Monterrey
    I.T.E.S.M
  Mexico.
  ___               _    ___  _         __



<_/

2. ppp's "nat deny_incoming yes" option doesn't log denied packets ?

3. Using select to detect DCD changes

4. CSLIP Boot problems

5. Detecting carrier (DCD) loss?

6. Set up a remote que

7. How does linux detect hang-up? (DCD?)

8. Binding a process to a specific processor.

9. DCD changed, how to detect?

10. allowing serial port logins when DCD (carrier detect) is not present

11. How does linux detect hang-ups? (DCD?)

12. Serial I/O, detecting loss of DCD

13. DCD Drops, then DTR Drops, Want to Increase Delay (SLIP)