From owner-freebsd-questions Fri Mar 15 1:45:27 2002 Delivered-To: freebsd-questions@freebsd.org Received: from andrsn.stanford.edu (andrsn.Stanford.EDU [171.66.112.163]) by hub.freebsd.org (Postfix) with ESMTP id 6AF7F37B419 for ; Fri, 15 Mar 2002 01:45:02 -0800 (PST) Received: from localhost (andrsn@localhost.stanford.edu [127.0.0.1]) by andrsn.stanford.edu (8.9.3/8.9.1) with ESMTP id BAA38229; Fri, 15 Mar 2002 01:37:46 -0800 (PST) Date: Fri, 15 Mar 2002 01:37:46 -0800 (PST) From: Annelise Anderson To: Tim Preece Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Modem AT Commands In-Reply-To: <200203150907.g2F97Da13830@cpio.nildram.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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