Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 2002 01:37:46 -0800 (PST)
From:      Annelise Anderson <andrsn@andrsn.stanford.edu>
To:        Tim Preece <tim@cpio.nildram.co.uk>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Modem AT Commands
Message-ID:  <Pine.BSF.4.10.10203150129550.37854-100000@andrsn.stanford.edu>
In-Reply-To: <200203150907.g2F97Da13830@cpio.nildram.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 15 Mar 2002, Tim Preece wrote:

> 
> Hi,
> 
> Can anyone please inform me as to how I may send specific commands 
to a modem. ?
> 
> I have a script that switches my ppp dial up number depending on 
weather I am calling in the day time, or at night and weekends. 
However I would like to refine this further so that I can turn my 
modem speaker off during the night, and back on during the day.
> 
> My modem uses M0 to turn off the speaker, so I have tried adding 
ATM0 into my chat script in various ways, i.e.
> 
> set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK 
ATE1Q0 OK \\ ATM0 OK \\dATDT\\T TIMEOUT 40 CONNECT"

Please wrap lines at ~72 characters...

I'd try adding the M0 to ATE1Q0, i.e., make it ATE1Q0M0 and don't
changed the set dial line otherwise.
 
> or 
> 
> set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK 
ATE1Q0 ATM0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
> 
> but all this does is cause the script to hang, although at 
some point, I did get the speaker to turn off.
> 
> If it cant be done through the chat script, is there some 
software that would allow me to communicate to the modem 
directly ( this would be nice to do anyhow ) ?

cu -l /dev/cuaa0 (cuaa1, whatever)

The exit is ~.  (tilde dot).

You have to save it with an AT command before exiting....as
some modems need a cold reboot, this is probably not your 
best bet, but it's interesting to see what's in those strings.
You can usually save a couple of setups to the modem's NVRAM
as Y0 and Y1, which may work in the above AT strings.

	Annelise

-- 
Annelise Anderson
Author of: 		 FreeBSD: An Open-Source Operating System for Your PC
Available from:	 BSDmall.com and amazon.com
Book Website:    http://www.bittreepress.com/FreeBSD/introbook/	




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?Pine.BSF.4.10.10203150129550.37854-100000>