From owner-freebsd-questions Sat Jun 1 22:44: 6 2002 Delivered-To: freebsd-questions@freebsd.org Received: from serv1.wallnet.com (server1.wallnet.com [208.225.162.122]) by hub.freebsd.org (Postfix) with ESMTP id 09A2037B404 for ; Sat, 1 Jun 2002 22:44:01 -0700 (PDT) Received: (from root@localhost) by serv1.wallnet.com (8.11.5/8.11.5) id g525i0j26580; Sun, 2 Jun 2002 01:44:00 -0400 (EDT) (envelope-from timothyk@serv1.wallnet.com) Received: from localhost (timothyk@localhost) by serv1.wallnet.com (8.11.5/8.11.5av) with ESMTP id g525hvn26572; Sun, 2 Jun 2002 01:43:57 -0400 (EDT) (envelope-from timothyk@serv1.wallnet.com) X-Authentication-Warning: serv1.wallnet.com: timothyk owned process doing -bs Date: Sun, 2 Jun 2002 01:43:57 -0400 (EDT) From: Tim Kellers To: "Michael D. Harlan" Cc: Subject: Re: Sending AT commands to modem from commandline ? In-Reply-To: <20020602041247.GA13206@harlanonline.org> Message-ID: <20020602014013.W24922-100000@serv1.wallnet.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS perl-11 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 Try using the ppp(8) command as a user process: bash-2.05a# ppp Working in interactive mode Using interface: tun0 ppp ON mts-128> ppp ON mts-128> term issue your AT commands, here. Tim Kellers CPE/NJIT 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