Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query usb

Status
Not open for further replies.

jaymzter

Vendor
Jul 8, 2002
441
US
Normally to query a modem for it's firmware version i'd fire up minicom and enter 'ati', however I'm working on a script which must upgrade firmware on attached modems. I don't want to pop minicom up in the middle of the script to bother some user to verify the firmware version. Has anyone run across a command line tool which will send hayes commands to a modem and receive a response in a noninteractive manner?
I'm new to scripting, so forgive me for asking, but could I use a named pipe to send the command to /dev/modem (maybe using cat or echo), and somehow read a response from another pipe? I'm stuck!
 
Since I received no answer I thought I'd post what I decided on. I'll make an expect script to use cu to query the modem, then use the output to check if the firmware needs to be upgraded. If anyone can think of anything even easier it'd be nice to hear!
HTH
 
I am not sure if this helps, but I found this perl module that may be able to help implemet what you need.


I know you are using shell scripting, but maybe you can write a perl script that your shell script calls just to get the info from the serial device.
 
That's exactly what I did, using IO::pty and Expect. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top