Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Mar 95 9:21:29 MST
From:      terry@cs.weber.edu (Terry Lambert)
To:        duane@gargamel.ptw.com (Duane Ellison)
Cc:        questions@FreeBSD.org
Subject:   Re: Assistance Requested: Com Stuff (fwd)
Message-ID:  <9503071621.AA24538@cs.weber.edu>
In-Reply-To: <Pine.BSF.3.91.950306230211.113A-100000@saber.ptw.com> from "Duane Ellison" at Mar 6, 95 11:02:30 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> I am kind of confused (as usual) on a couple of things and I hope someone 
> out there can help me out.
> 
> 1.	Is it not the "CORRECT" way to configure a communications port to
> 	just leave it as /dev/tty02.  I have noticed in different documents
> 	that different device identifiers (definitions) are used, such as
> 	/dev/cua2, /dev/ttyd2.  Right now I am just using the tty devices
> 	for everything I want to do and just changing the /etc/ttys file
> 	as required.  If I should use these other device names how do I go
> 	about configuring them?

It depends on what you mean by a communications port.  If you mean a
serial port with a modem on it or an internal modem that pretends to
be a serial port, then you must use a calling unit, not a tty, for
controlling the port.

The biggest difference is that the calling unit reacts to modem
control signals, while a tty, since it is expected to be directly
connected to a terminal or another machine, does not.

You can create these devices with MAKEDEV.  If this still works like
it used to, this will make the tty's go away at the same time.  You
should examine the script /dev/MAKEDEV for further questions.


> 2.	In setting up PPP on my system I modeled my scripts after the ppp
> 	document in the FAQ area (document by Grennady B. Sorokopud).  
> 	One thing I have noticed is that I have to (before starting the 
> 	script) issue a &C &D for it to work.  If I don't kermit (or anything
> 	else for that matter) will not return from /dev/tty02 and upon 
> 	completion of the kermit.dial (quit) the modem hangs up.  My question
> 	is: is this how this is suppose to work or am I not configuring 
> 	something correctly?

The default behaviour for &C and &D is not defined.  Typically, if
this is a Hayes command set II modem, then &C1 (carrier follows
remote carrier presence instead of being forced high) and &D2 (an
on-to-off transition of DTR causes the modem to go on hook and reset
to power on state) are what you want.  This assumes the cable between
your modem and machine are correct, assuming it's an external modem.

The DCD tracking is required so that the getty open will not complete
until after the modem has answered the phone and spewed the baud rate
message, while the DTR is so that unless an open is present (in which
case DTR will be raised), the modem will not answer the phone.  When
the last close occurs, the DTR will be dropped momentarily, which
should cause the modem to hang up on the caller and the modem to reset.

Many modems, such as Avatek, do not retrain baud after one call unless
they are reset this way.  That means that for a 1200/2400 modem (for
instance), a caller at 1200 will prevent subsequent calls at 2400, and
vice versa.

Think of the C setting as causing the -CLOCAL stty flag to work and
the DTR as causing the HUPCL flag to work.


> 3.	Now this question may go inline with the above (meaning the fix
> 	{if any}) for 2 will fix this.  How do you correctly use the 
> 	pppd with the chat command.  I have gone over both the pppd and
> 	chat man pages and I have tried every different options that I can
> 	think of and have not be able for it to work.  It does access the 
> 	modem (I see the TR light come on) but no commands are send to 
> 	the modem.  Basically I have tried:
> 	pppd /dev/tty02 57600 connect 'chat atdt999 connect ogin: bla'

First set up your modem and calling units correctly, and if the
problems persist, repost this particular question to the questions
list so a PPP guru can help you out.  I can only guess based on
what people have posted to the list in the past, and this is not
necessarily adequate to answer the question.


					Terry Lambert
					terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9503071621.AA24538>