Path: utzoo!attcan!uunet!lll-winken!ames!ucsd!rutgers!bellcore!texbell!bigtex!qiclab!ditka!cocktrice!mdm From: mdm@cocktrice.UUCP (Mike Mitchell) Newsgroups: comp.unix.microport Subject: Re: Dropping DTR? Message-ID: <363@cocktrice.UUCP> Date: 23 Jan 89 13:22:46 GMT References: <362@cocktrice.UUCP> <916@ssbn.WLK.COM> Reply-To: mdm@cocktrice.UUCP (0000-Mike Mitchell) Organization: Mike's Playground, Santa Fe, New Mexico Lines: 55 In article <916@ssbn.WLK.COM> bill@ssbn.WLK.COM (Bill Kennedy) writes: >In article <362@cocktrice.UUCP> mdm@cocktrice.UUCP (Mike Mitchell) writes: >>Does anyone have a fancy trick for lowering DTR going to a modem attached >>to tty0? I have my modem set up to auto answer, however there are times >>that I do not want the modem to answer the phone. > >The obvious things would be to unplug either the phone line or serial cable >from the modem, but those leave you vulnerable to forgetting to plug them >back in. You could also arm and disarm with Not a good solution. I would forget. >>I can start a getty running on /dev/ttyM0 and the DTR comes up. When I kill >>the getty, the DTR drops for a moment and then comes up again. The modem >>still answers the phone, but there is nothing running to accept logins. > >That's odd. The first part is quite understandable because init spawns a >new getty when the old one dies, but it should prompt for a login, i.e. it >should be a shiny new getty ready to go. Init is not envolved yet at this stage. I was hand spawining the getty as an exercise from the console to insure that it works. >I have the same problem from time to time when I need the voice line to do >double duty, particularly at night. It's also rather handy to have the >modem to answer late night calls when I don't want to be disturbed. I run >a job with cron that arms and disarms a modem on the voice line. Using the >following inittab line as an example - A little more elegant way of doing this is to have the getty run at run state 3 only and just 'telinit 3' to fire it up, and 'telinit 2' to get rid of it. However this is not the mode I have been using (yet). The getty was spawned from the root login on the console. It behaved properly for a single login (to be expected) and when the login was terminated, the DTR only dropped for a moment. A new getty was not spawned, however the DTR came back up. This exercise is to allow me to share the single phone line for voice and data. I want my calls in the evening, however I would like to be able to dial in from work during the day. The brute force solution for this problem is in the works... Open /dev/mem and perform a couple of ioctls which would dump the magic modem bytes to the UART line control register to disable the DTR. Calls to this program would then be made from the 'gettyoff' shell script. This is not a real pretty solution though. I kind of feel like the kernel should do this for me. (And maybe it can--I am not sure how to massage it into happiness). -- Mike Mitchell BELL: (505) 471-7639 2020 Calle Lorca #43 ARPA: mdm@cocktrice.UUCP Santa Fe, NM 87505 UUCP: ...!uunet!dmk3b1!cocktrice!mdm