*BSD News Article 24342


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!foxhound.dsto.gov.au!fang.dsto.gov.au!yoyo.aarnet.edu.au!news.adelaide.edu.au!gateway.dircsa.org.au!apanix!cleese!cleese!not-for-mail
From: newton@cleese.apana.org.au (Mark Newton)
Newsgroups: comp.os.386bsd.questions
Subject: Re: FreeBSD multiport serial troubles...
Date: 24 Nov 1993 00:06:23 +1030
Organization: cleese.apana.org.au public access UNIX
Lines: 35
Message-ID: <2ct3l5$6re@cleese.apana.org.au>
References: <2cglg6$hm@wzv.win.tue.nl> <CGsMxF.3L5@swi.psy.uva.nl> <1993Nov22.031429.27227@mcshub.dcss.mcmaster.ca>
NNTP-Posting-Host: cleese.apana.org.au

In article <1993Nov22.031429.27227@mcshub.dcss.mcmaster.ca> todd@flex.eng.mcmaster.ca (Todd Pfaff) writes:
>The modem answers, getty responds and starts login, and login seems to
>change the tty to cs7 so the remote, which is set for 8-bit data, sees 
>garbage.  You may be experiencing the same problem.  During a modem login
>attempt, try 'stty -f /dev/serial-device' and check for cflags: cs7.
>
>Is it login that sets the tty to 7-bit?  If so, why?  If not, then what's
>the culprit?  Is there a simple solution?

It's getty.  For me, the simple solution was to write my own getty
specifically for modems :-)

It listens for CONNECT responses and adjusts its speed accordingly
(or it can ignore the CONNECT string's baud rate for modems with constant
port rates);  it sets 8-bit mode properly, as well as flow control.
It also handles resetting the modem after each call, for modems without
battery-backed NVRAM (one of my modems is one of these, which is
why it behaves like that :-)

On the downside, it doesn't use /etc/gettytab (that's a downside?). 
The banner message it prints before the login: prompt is hard-coded
into it (to change it you have to edit a #define in the source and
recompile).  I guess I could hack the gettytab-reading code into it,
but it currently suits all my needs - why bother? :-)

And yes, I am using it on a multiport card.

If anyone wants it, mail me and I'll send it out to you.

   - mark
-- 
--------------------------------------------------------------------
I tried an internal modem,                newton@cleese.apana.org.au
     but it hurt when I walked.                          Mark Newton
----- Voice: +61-8-3224071 --------------- Data: +61-8-3222915 -----