Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jun 2002 21:47:02 -0700 (PDT)
From:      Matt Snow <drama@slakin.net>
To:        "Michael D. Harlan" <mike@harlanonline.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Sending AT commands to modem from commandline ?
Message-ID:  <20020601214507.H83157-100000@seven.slakin.net>
In-Reply-To: <20020602041247.GA13206@harlanonline.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I know you can use minicom but that is an application, maybe try
$ echo "ATS0=1" >> /dev/cuaa1
instead of
$ echo "ATS0=1" > /dev/cuaa1

Other then that I dont know, I havent had a modem for a long time now. =(

* * * * * * * *
Matt
 (@) drama@slakin.net
 (w) http://slakin.net.

On Sun, 2 Jun 2002, Michael D. Harlan wrote:

> Hi,
>
> I've spent the better half of 5 hours looking for the answer to this
> question.  As a last resort, I send this e-mail to you good folks:
>
> I have an external modem attached to COM2 (/dev/cuaa1).  Everything is in
> good working order and I can connect to it using 'tip' to send it AT
> commands.  My question is this: can I send AT commands to it from the
> command line (or better yet, from a Perl script)?
>
> I tried this:
> 	# echo "ATS0=1" > /dev/cuaa1
>
> and it didn't work.  Granted, the send/receive lights blinked rapidly,
> but the command didn't take.  The desired result would be for the modem to
> auto-answer after 1 ring.  It didn't.  I used 'tip' to send it the command
> and it worked.  From the command-line, I sent the ATS0=0 command, which
> turns off auto-answer.  It didn't work.  I then used 'tip' to send the
> command and it worked.
>
> Auto-answer isn't the only thing I'm trying to accomplish here, so don't
> concentrate on that.  It would be nice to be able to send the modem the
> string "AT&F" to do a soft-reset to factory settings, for example.
>
> I can't get tip to run in any way other than interactive mode, so I gave
> up using it.
>
> My end goal would be to throw a bunch of AT commands into a Perl script
> and feed it to the modem.
>
> Any ideas?  Are there any programs that will take redirected output from
> the command line?  Example:
> 	# ./my_command < my_at_commands.txt
>
> Or, perhaps I'm not using echo correctly on the command-line...
>
> Any help is GREATLY appreciated!
>
> --
> Mike Harlan
> mike@harlanonline.org
> http://www.harlanonline.org/
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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