Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!nuchat!kevin From: kevin@nuchat.sccsi.com (Kevin Brown) Newsgroups: comp.os.minix Subject: Re: PC Minix Serial Ports Message-ID: <1991Feb10.095318.6603@nuchat.sccsi.com> Date: 10 Feb 91 09:53:18 GMT References: <10561@bunny.GTE.COM> Organization: /users/kevin/.organizati/files/news/comp/os/minix Lines: 53 In article <10561@bunny.GTE.COM> seb3@gte.com (Steve Belczyk) writes: >Hi there. I'm running PC Minix with Bruce's 386 changes. I'm having >trouble getting the serial lines to work well with modems: > >- When a caller logs out, Minix doesn't drop carrier, it just gives > another login prompt. > >- If a caller drops carrier in the middle of a session, Minix doesn't > know about it. The next caller picks up the session right where the > last caller left off. > >I looked through the documentation and a fair amount of the code but I >couldn't find anything obvious. Hopefully I just have things set up >incorrectly. Any help sure would be appreciated! I've been asking basically the same thing. In looking at the serial device driver code, it looks like there is ZERO support for DTR (the line is kept high all the time). And it also looks like there is zero support for DCD. So to solve your first problem, you're either going to have to (a) modify the driver and the file system to support DTR and have a driver program fork/exec a getty on the line, wait for the child's death, and then drop DTR, or (b) you're going to have to write the driver program to understand your modem so that it will get your modem into command mode and cause it to hang up. I suppose you could also implement DTR dropping when DCD goes away, but that leads to the second problem... Your second problem is, I think, more complex. Basically, you're going to have to implement (a) DCD detection in the serial driver, and (b) SIGHUP generation when you see DCD go away. I don't know how to do either (though the code in tty.c makes it look like you can do a cause_sig() if you know the process group associated with the terminal. I'm not sure how to implement this right, though. It looks like the tty driver only deals with the serial port via interrupts, and currently that is used for incoming and outgoing character I/O only. This would have to be modified for DCD status change). So while I'm not sure about how to handle SIGHUP generation, I have some idea. But I'm completely stumped about DCD line status detection. I don't see any clues at all about it in the serial driver. Anyone know how to do DCD detection on the IBM rs232 ports? The only modem status bit defined in the serial driver is CTS (0x10). Could someone post a complete listing of the modem status bits in the serial port's status register? >Steve Belczyk CIS: 75126,515 BBS: +1 508 664-0149 (2400 bps) >seb3@gte.com GEnie: sbelczyk UUCP: {harvard,vaxine}!bunny!seb3 -- Kevin Brown Disclaimer: huh? nuchat!kevin@uunet.uu.net csci31f7@cl.uh.edu Minix -- the Unix[tm] of the 90's. System V -- the Multics of the 90's. :-)