PC Review


Reply
Thread Tools Rate Thread

Sending AT modem commands from the command line?

 
 
ironcladlou
Guest
Posts: n/a
 
      3rd Aug 2007
Simple question. Through a batch file or a VBScript, I need to send an
ATI1 command to a modem on COM4, then capture the output to a text
file. Can't figure it out for the life of me. Appreciate the help.

--
ironcladlou

 
Reply With Quote
 
 
 
 
Bob I
Guest
Posts: n/a
 
      3rd Aug 2007
Try something on the order of

copy "ATS0=1" > COM4 > C:\output.txt


ironcladlou wrote:

> Simple question. Through a batch file or a VBScript, I need to send an
> ATI1 command to a modem on COM4, then capture the output to a text
> file. Can't figure it out for the life of me. Appreciate the help.
>
> --
> ironcladlou
>


 
Reply With Quote
 
 
 
 
ironcladlou
Guest
Posts: n/a
 
      3rd Aug 2007
On Aug 3, 11:40 am, Bob I <(E-Mail Removed)> wrote:
> Try something on the order of
>
> copy "ATS0=1" > COM4 > C:\output.txt


I see where you're going with it, but it doesn't work. That command
doesn't putput anything to the file, and if I try echo ATI1 > COM4 > C:
\output.txt, I just get a file that says ATI1. Thanks, though.

--
ironcladlou

 
Reply With Quote
 
Bob I
Guest
Posts: n/a
 
      3rd Aug 2007
maybe my memory is going to heck

see what you get for screen output from

echo "AT&V" > COM1

ironcladlou wrote:

> On Aug 3, 11:40 am, Bob I <(E-Mail Removed)> wrote:
>
>>Try something on the order of
>>
>>copy "ATS0=1" > COM4 > C:\output.txt

>
>
> I see where you're going with it, but it doesn't work. That command
> doesn't putput anything to the file, and if I try echo ATI1 > COM4 > C:
> \output.txt, I just get a file that says ATI1. Thanks, though.
>
> --
> ironcladlou
>


 
Reply With Quote
 
ironcladlou
Guest
Posts: n/a
 
      3rd Aug 2007
On Aug 3, 1:03 pm, Bob I <(E-Mail Removed)> wrote:
> maybe my memory is going to heck
>
> see what you get for screen output from
>
> echo "AT&V" > COM1


When I put the quotes in, it looks for a file called "AT&V" and can't
find it. When I issue any AT command via echo, I get no output on the
screen.

--
ironcladlou

 
Reply With Quote
 
Bob I
Guest
Posts: n/a
 
      3rd Aug 2007


ironcladlou wrote:

> On Aug 3, 1:03 pm, Bob I <(E-Mail Removed)> wrote:
>
>>maybe my memory is going to heck
>>
>>see what you get for screen output from
>>
>>echo "AT&V" > COM1

>
>
> When I put the quotes in, it looks for a file called "AT&V" and can't
> find it. When I issue any AT command via echo, I get no output on the
> screen.
>



What kind of response do you get from the modem if you open
Hyperterminal, and send commands to the modem there?

 
Reply With Quote
 
ironcladlou
Guest
Posts: n/a
 
      3rd Aug 2007
On Aug 3, 1:26 pm, Bob I <(E-Mail Removed)> wrote:
> ironcladlou wrote:
> > On Aug 3, 1:03 pm, Bob I <(E-Mail Removed)> wrote:

>
> >>maybe my memory is going to heck

>
> >>see what you get for screen output from

>
> >>echo "AT&V" > COM1

>
> > When I put the quotes in, it looks for a file called "AT&V" and can't
> > find it. When I issue any AT command via echo, I get no output on the
> > screen.

>
> What kind of response do you get from the modem if you open
> Hyperterminal, and send commands to the modem there?


If I type an ATI1, I get this:

Manufacturer: NOVATEL WIRELESS INCORPORATED
Model: EXPEDITE EV620

and a few more lines. It's a Verizon Wireless EVDO card, but for some
insane reason, it responds to the standard AT command set.

--
ironcladlou

 
Reply With Quote
 
Beverly Howard [Ms-MVP/MobileDev]
Guest
Posts: n/a
 
      3rd Aug 2007
no quotes... think it should be

echo at&1 > com4:

however, the spoiler is the "&" character which is used in batch files
so that command won't work, so

put the string in a text file, then use

copy test.txt com4:

(the quotes are not necessary if the file doesn't contain spaces)

Beverly Howard [MS MVP-Mobile Devices]
 
Reply With Quote
 
ironcladlou
Guest
Posts: n/a
 
      4th Aug 2007
On Aug 3, 3:03 pm, "Beverly Howard [Ms-MVP/MobileDev]"
<BevNoSpamBevHoward.com> wrote:
> no quotes... think it should be
>
> echo at&1 > com4:
>
> however, the spoiler is the "&" character which is used in batch files
> so that command won't work, so
>
> put the string in a text file, then use
>
> copy test.txt com4:
>
> (the quotes are not necessary if the file doesn't contain spaces)


Yeah, the command I need to input to the modem is ATI1, so the
ampersand isn't the problem. The problem is getting the modem's
response into a text file.

--
ironcladlou

 
Reply With Quote
 
Beverly Howard [Ms-MVP/MobileDev]
Guest
Posts: n/a
 
      4th Aug 2007
>> The problem is getting the modem's response into a text file. <<

don't think you are going to have much success with this from the
command prompt since there are "text buffering" issues...

i.e. the modem is going to send it's response when it wants to, so there
has to be some kind of bucket in place to catch the response, otherwise
it's like water pouring on the ground... it happens, but it's not
retained, and, afaik, without a program running in place to capture
process the data from the comm port, dos alone can't do it.

Beverly Howard [MS MVP-Mobile Devices]


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending AT modem commands from the command line? ironcladlou Windows XP General 1 3rd Aug 2007 04:40 PM
Sending AT Commands To GPRS MODEM Tihomir Ignatov Microsoft Dot NET Compact Framework 4 25th May 2006 11:14 AM
Sending commands to multiple command prompt windows. Iain Windows XP General 1 9th Nov 2005 01:52 PM
Convert 'Open Report' commands to 'Output to' commands Leslie Isaacs Microsoft Access Macros 9 7th Mar 2005 07:03 PM
Sending AT Commands to modem at Startup? Lewis Drakker Microsoft Windows 2000 Setup 1 29th Jul 2003 08:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:54 PM.