Modem setup for dial-in

Modem setup for dial-in

Post by trebo » Sun, 31 Dec 1899 09:00:00

I'm having trouble enabling >9600 baud on my modem for dial-in. Based on
feedback from a previous post, and other research, I'd like to send the
AT&B1 command to my modem.

However, in my previous post I asked how to send AT commands to the serial
port. Two suggestions came in. Both failed for my setup:

=>1: Simply use the echo command, redirecting output to /dev/ttyS1 (my modem
is on COM2). Unfortunately, the command hangs and I have to Ctrl-C to get
out of it:

    echo "AT&B1" > /dev/ttyS1

When I do this, nothing happens. I let it run for at least 60 seconds, then
hit Ctrl-C. The following appears, but only after I pressed Ctrl-C:

    bash: /dev/ttyS1: Interrupted system call

I also tried - and it also hung - the command:

    echo "ATS0=1" > /dev/ttyS1

I thought echo might be* because getty already has the port in use.
So I removed ttyS1 from /etc/inittab, ran 'kill -1 1' and confirmed that the
getty process that ran for ttyS1 was no longer running - it wasn't.
Nevertheless, echo still hangs.

=>2. Second suggestion was to use minicom. Unfortunately, I'm working on a
stripped-down red hat 6.1 system, and RPM isn't included. Argh.


In reading about getty, I find  there are many variants (eg, mgetty,
uugetty, getty_em, and agetty). My stripped down system only has
/sbin/getty, /sbin/mingetty and /sbin/uugetty. I'm calling /sbin/getty in
/etc/inittab. Should I use uugetty instead?

I tried uugetty in inittab, as follows:

    S1:1345:respawn:/sbin/uugetty ttyS1 F9600

and also:

    S1:1345:respawn:/sbin/uugetty ttyS1 F115200

but now after the modems connect, they IMMEDIATELY drop the line. In
Hyperterminal on the calling system I see only the CONNECT message, then the
line drops immidiately. At that moment, I see this syslog message:

    uugetty[1048]: exiting on HANGUP signal

This is worse that when I used plain /sbin/getty .. at least it stayed
connected, albeit all data in and out are garbled due to the apparent baud
rate mismatch.



Modem setup for dial-in

Post by David Efflan » Sun, 03 Dec 2000 11:44:18

>I'm having trouble enabling >9600 baud on my modem for dial-in. Based on
>feedback from a previous post, and other research, I'd like to send the
>AT&B1 command to my modem.

I have only used mgetty for that and it has configuration commands for
modem init strings.  It will not help to try to set things like this
externally because mgetty periodically resets the modem as long as nothing
else (like pppd dialing out) is using it.

However, this requires that any other program using that modem uses the
same /dev description, so lockfiles work properly.  If you try to dial out
pppd using /dev/modem and mgetty is using same as /dev/ttyS1, mgetty will
not know that the modem is in use and will reset it.  As long as any
program using the modem uses the same lockfile, then mgetty will wait
quietly until the lock clears.

Not sure why you want to force 9600, unless one of them is a 14.4K RPI
modem.  RPI was a Rockwell protocol that had no error correction or
compression without special software, and without such software could not
reliably connect to 28.8K or faster modems unless forced back to 9600.