From owner-freebsd-questions Sat Jun 1 21:12:53 2002 Delivered-To: freebsd-questions@freebsd.org Received: from challenger.harlanonline.org (c11b012.neo.rr.com [204.210.203.12]) by hub.freebsd.org (Postfix) with ESMTP id B717F37B408 for ; Sat, 1 Jun 2002 21:12:49 -0700 (PDT) Received: from challenger.harlanonline.org (localhost [127.0.0.1]) by challenger.harlanonline.org (8.12.3/8.11.6) with ESMTP id g524CmBb013269 for ; Sun, 2 Jun 2002 00:12:48 -0400 (EDT) (envelope-from r3mdh@challenger.harlanonline.org) Received: (from r3mdh@localhost) by challenger.harlanonline.org (8.12.3/8.12.2/Submit) id g524Cm7F013268 for freebsd-questions@freebsd.org; Sun, 2 Jun 2002 00:12:48 -0400 (EDT) (envelope-from r3mdh) Date: Sun, 2 Jun 2002 00:12:47 -0400 From: "Michael D. Harlan" To: freebsd-questions@freebsd.org Subject: Sending AT commands to modem from commandline ? Message-ID: <20020602041247.GA13206@harlanonline.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.27i 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 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