Date: Sun, 2 Jun 2002 00:12:47 -0400 From: "Michael D. Harlan" <mike@harlanonline.org> To: freebsd-questions@freebsd.org Subject: Sending AT commands to modem from commandline ? Message-ID: <20020602041247.GA13206@harlanonline.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020602041247.GA13206>