Ignoring carrier detect

Leslie Mikesell les at chinet.chi.il.us
Thu Apr 18 05:59:39 AEST 1991


In article <1991Apr16.131028.10095 at unhd.unh.edu> pss610 at unhd.unh.edu (Paul S Secinaro) writes:
>I have been trying to set up Columbia C-Kermit for use under AT&T SVR3.2.1
>with one major problem.  When I do a 'set line /dev/tty01' command, the
>system hangs completely and I have to reboot.  I think I know what may be
>causing the problem:  The device I'm connected to does not implement any
>control signals except the transmit and recieve lines (TX and RX in RS-232
>jargon).  I believe the hang up may be caused by the lack of a carrier detect
>signal being asserted by the remote device.

>Is there any way to set up a serial port so that it ignores carrier detect
>and other control signals?  The SysAdmin Guide as well as the FAQ for this
>newsgroup mention something about 'modem control' ports, but I'm not sure
>how to set them up or if they'll solve the problem.

The simple way to deal with this is to loop back your DTR lead to your DCD.
Opening a tty device will always assert DTR and thus supply the needed
DCD for the open to complete.  Remember - hardware is easy...
The software solution involves going into every program and setting
O_NDELAY in the open flags, then using ioctl() to turn on CLOCAL in the
termio struct, then fcntl() to clear the O_NDELAY flag.  I really
wonder about the guys who dreamed this stuff up!  Oh well - kermit
already has most of the code in place and it looks like someone
intended for the command "set modem unknown" to let the script functions
work like the built-in dialers, but it still wants to clear CLOCAL
before letting you connect.  As a quick hack, you can just compile
a version that never clears the CLOCAL bit.  

Les Mikesell
  les at chinet.chi.il.us



More information about the Comp.unix.sysv386 mailing list