Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!bionet!uwm.edu!spool.mu.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!boingo.med.jhu.edu!haven!mimsy!nocusuhs!nmrdc1!minixug!uwalt!waltje From: waltje@uwalt.nl.mugnet.org (Fred 'The Rebel' van Kempen) Newsgroups: comp.os.minix Subject: Re: modems and carrier detect under minix 1.5.10 IBM/XT Message-ID: <9102287337@uwalt.nl.mugnet.org> Date: 28 Feb 91 15:52:38 GMT References: <62684@bbn.BBN.COM> Organization: MicroWalt Corporation, for MINIX Software Development Lines: 61 In article <62684@bbn.BBN.COM>, grossman@bbn.com (Martin Grossman) wrote: > I've been fiddling with getting my modem on COM1 to work properly!!! Humm. It DOES work, but... : > 1) Minix doesn't examine the DCD line from the modem Correct. That is: _standard_ MINIX doesn't. Our ("NLMUG") does. > So I added some code in getty to do a port_in(0x03f8+6,&val) > and then examine bit 7. Now I can see DCD. Yuck! This won't work on 80286,386,486 and 680X0 machines ! It should be in the RS-232 driver in the kernel! > 2) Minix does enable all interrupts from the UART > When the DCD line changes state it causes an interrupt > that minix gets real fast and doesn't do anything with it, > thus I can never see the other bit (I think its bit 3) > that states that DCD changed states. No, bit 7 (3 is the DELTA DCD bit). I enabled this a long time ago, and, upon the request of many, I just finished the cleanup of my RS232 (and TTY) driver of NLMUG MINIX. I sent it to Bruce Evans for checking, and I will post the driver as soon as I get it back. > 3) I've hacked up getty and login as follows: > a) added some code before call to do_carier() to: > set -ECHO & RAW > output at\r > delay > output +++ > delay > output ath\r Brrr... You should use the DTR line to put the modem in OFFLINE state (by dropping the DTR line). This is usually done by setting the line's speed to 0. I implemented this a long time ago. See above. > b) defined CHOISE_A to examine DCD via doing a port_in() ^ C ? ^^^^^^^ Won't work on protected-mode CPU's ! > c) added timeouts (via sig #14) to correctly timeout both getty > and login if idle for too long. Already done. To all people raeding this: what version is currently being used by you? I am using version 3.17 here, and I will post it if many people are using an old version... > 4) TODO > fix the kernel to > a) do carrier correctly > b) send signal to process if its not getty and DCD went down. Already done, see above. You also need to modify MM to do (b) correctly. Cheers- The Rebel -- MicroWalt Corporation, for MINIX Development waltje@uwalt.nl.mugnet.org Tel (+31) 252 230 205, Hoefbladhof 27, 2215 DV VOORHOUT, The Netherlands