From owner-freebsd-questions Sat Jun 1 21:47: 2 2002 Delivered-To: freebsd-questions@freebsd.org Received: from seven.slakin.net (adsl-67-112-126-134.dsl.pltn13.pacbell.net [67.112.126.134]) by hub.freebsd.org (Postfix) with ESMTP id D966D37B40B for ; Sat, 1 Jun 2002 21:46:55 -0700 (PDT) Received: from localhost (localhost.slakin.net [127.0.0.1]) by seven.slakin.net (Postfix) with ESMTP id D57A47ED; Sat, 1 Jun 2002 21:47:02 -0700 (PDT) Date: Sat, 1 Jun 2002 21:47:02 -0700 (PDT) From: Matt Snow To: "Michael D. Harlan" Cc: freebsd-questions@freebsd.org Subject: Re: Sending AT commands to modem from commandline ? In-Reply-To: <20020602041247.GA13206@harlanonline.org> Message-ID: <20020601214507.H83157-100000@seven.slakin.net> 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 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