Maker Pro
Maker Pro

Modem AT commands -- confucious

I know that programming questions may be off topic for this group but
it's the type of basic question I can't get a handle on ANYWHERE,
including fruitless web searches.

I'm trying to get a basic understanding of how to talk to a modem.

I have a pretty decent understanding of VB.NET and using my
serialport, have written the very basic number one step....that is, a
simple dial out command....ATDT, the phone number etc.

So, there you have it, I can make my phone ring....whoopee! (And so
far, that's it).

My ultimate goal is to use the modem to make a call from my windows
program and play some audio from my soundcard for 30 seconds or so,
once the call is answered.

So, I need a voice modem and it's unique command set......I know that.

MY QUESTION IS --

Can you actually get responses to your AT commands from the
ORIGINATING modem or do you have to another modem answer the call and
IT sends back responses (like RING -- VCON -- etc).

Obviously, I won't be talking to another modem but will be calling a
telephone.

Problem is, when your writing code, I don't know where to start after
I've called the number...(with serialport.write).

The best thing I've seen is a textbox I have set up that looks at the
serialport read data and it shows my the called number.....but for the
life of me, I can't see anything else. (like all the feedback you're
supposed to see?)

My guess is, I've asked a stupid question.

YOU DO NOT get data back from the originating modem -- only another
modem that's talking to it. (?)

If that's the case, how in the heck do I accomplish what I want to do?
Just call, send the audio and hope that it will be answered?

THANKS kindly for any help on this.
 
J

Jamie

Jan 1, 1970
0
I know that programming questions may be off topic for this group but
it's the type of basic question I can't get a handle on ANYWHERE,
including fruitless web searches.

I'm trying to get a basic understanding of how to talk to a modem.

I have a pretty decent understanding of VB.NET and using my
serialport, have written the very basic number one step....that is, a
simple dial out command....ATDT, the phone number etc.

So, there you have it, I can make my phone ring....whoopee! (And so
far, that's it).

My ultimate goal is to use the modem to make a call from my windows
program and play some audio from my soundcard for 30 seconds or so,
once the call is answered.

So, I need a voice modem and it's unique command set......I know that.

MY QUESTION IS --

Can you actually get responses to your AT commands from the
ORIGINATING modem or do you have to another modem answer the call and
IT sends back responses (like RING -- VCON -- etc).

Obviously, I won't be talking to another modem but will be calling a
telephone.

Problem is, when your writing code, I don't know where to start after
I've called the number...(with serialport.write).

The best thing I've seen is a textbox I have set up that looks at the
serialport read data and it shows my the called number.....but for the
life of me, I can't see anything else. (like all the feedback you're
supposed to see?)

My guess is, I've asked a stupid question.

YOU DO NOT get data back from the originating modem -- only another
modem that's talking to it. (?)

If that's the case, how in the heck do I accomplish what I want to do?
Just call, send the audio and hope that it will be answered?

THANKS kindly for any help on this.
you can use a sound card if you wish, you'll need to do some wiring
to link the two together or, you can use the Fax/voice modem's feature,
which is in most cases, shows as a sound card in the system.

You need to get more acquainted with sound card programming to
capture the PCM data. It's a matter or enumerating the devices which
should yield a sound device with most likely low bit rate abilities.

Another area you may want to get acquainted in is the RAS "Remote
Access Service"

http://webpages.charter.net/jamie_5"
 
Paul --

Thank you SO MUCH.

You've really cleared some things up for me I wasn't able to get on
some programming forums.

I'm going to sleep on this tonight and hopefully, make better progress
tomorrow -- and hopefully as well, you may be kind enough to check
back on my replies.

First of all, I may not even be in "command mode" ?

But I thought that, when you preface everything with AT, your
automatically there. (?)

You've enlightened me with "connection progress messages" which
really, is what I'm after (and all I'll get with just MY modem and a
telephone on the other end).

BUT, that will be good enough.

At this point, I just need to know when the modem quits ringing -- put
it in voice mode and play the audio.
(Yes, I do have the card patched to the modem, I hear it fine).

I've tried everything ! to see those responses....RING VCON etc

stuffback = serialport.readexisting( )
textbox.text = stuffback


And don't worry --
no telephone solicitation involved !

Thanks.
 
N

Nobody

Jan 1, 1970
0
First of all, I may not even be in "command mode" ?

But I thought that, when you preface everything with AT, your
automatically there. (?)

The modem starts out in command mode, and stays that way until you
issue ATD... and get a CONNECT response, at which point DTR should go
high. Once connected, it stays in data mode until you send three "+"
characters followed by a break (many modems don't care about the break
part to avoid Hayes' patent).
 
G

Greegor

Jan 1, 1970
0
Once connected, it stays in data mode until you send three "+"
characters followed by a break (many modems don't care about the break
part to avoid Hayes' patent).

That could be fun if you're sending a text file with a row of + marks
in it!
 
Man I am so confused by these past few days I don't know where to
start.

I've read where +++ PUTS the modem in command mode! (from data
mode). See below ** (I got off a web page).

I just wish I could see the code to make this thing happen.....I'm all
over the place with it.

I know there are + and # voice modems.
I know I can make a call using ATDT and the number.
I've heard you put it in voicemode before calling.
I've also heard after calling.

** "+++ This is the default escape sequence. Transfers the modem from
data mode to command mode. Must be preceded by at least 1 second of no
characters and followed by one second of no characters. O0 (ATO0 or
ATO) returns the modem to data mode."

I just want to use a voicemodem, my serial port and VB.NET to....

(1) make a call to a telephone number (not a modem)
"ATDT1XXXXXXXXXX" & controlchars.cr
(2) know when the call is answered VRA?
VRN?
(3) play audio from my sound card for 30 seconds VLS? VTX?
(4) hang up the modem
"ATH" & controlchars.cr

Driving me nuts because I know it's just a few lines of simple code
but can't get it going.
 
N

Nobody

Jan 1, 1970
0
Man I am so confused by these past few days I don't know where to
start.

I've read where +++ PUTS the modem in command mode! (from data
mode). See below ** (I got off a web page).

That's correct. But the modem starts out in command mode, so you
only need to use +++ when you want to get out of data mode, e.g. to
terminate the call with ATH.
I just wish I could see the code to make this thing happen.....I'm all
over the place with it.

I know there are + and # voice modems.
I know I can make a call using ATDT and the number.
I've heard you put it in voicemode before calling.
I've also heard after calling.

So far as the serial interface is concerned, "voice mode" means that it
won't attempt to negotiate the protocol after connection, or send or
receive data.

If you're using it in voice mode, you just need to send it commands to
configure it, dial the number, and wait for CONNECT. From there, you're
dealing with the sound card until you want to terminate the call, at which
point you need to send +++ then ATH0.
I just want to use a voicemodem, my serial port and VB.NET to....

(1) make a call to a telephone number (not a modem)
"ATDT1XXXXXXXXXX" & controlchars.cr
(2) know when the call is answered VRA?
VRN?
(3) play audio from my sound card for 30 seconds VLS? VTX?
(4) hang up the modem
"ATH" & controlchars.cr

Driving me nuts because I know it's just a few lines of simple code
but can't get it going.

Can you communicate with the modem at all? E.g. can you send ATI0 and
read the response?

If not, you need to be reading the VB.NET documentation rather than
anything related to modems or the Hayes command set.

Are you reading the responses? AT commands will normally send OK (or
another response) upon completion, and the modem may not accept further
commands until the response has been read.
 
M

mkr5000

Jan 1, 1970
0
Here's the basic code I'm playing with (not written precisely) ---

Pause 1 second
serialport.write "AT+FCLASS=8" & controlchars.cr 'puts modem
in voice mode

Pause 1 second
serialport.write "AT+VLS=0" & controlchars.cr 'only
VLS=0 will let the modem dial out !

Pause 1 second
serialport.write "AT+VTX" & controlchars.cr
'transmits audio

Pause 1 second
serialport.write "ATDT1332456-7765" & controlchars.cr 'dials number
and my phone will ring
Pause 1 second
serialport.read (sends the read buffer to a textbox)


Start > My.Computer.audio.play (plays a wav file in a loop)




I'm using a new internal modem and have the onboard audio chosen in
sounds setup. Have a jumper cable from the SPKR output on the
soundcard (there is no "line output"), into the MIC input on the
modem.

(I've also tried all sorts of other configurations). EVERYTHING.

In the textbox I get an OK on everything but when I pick up --- NO
audio (and I know the audio is there).

Now -- here is one strange problem I need to look at today.....

When I try to change the VLS number to anything but 0, the modem will
not dial out. (a clue?)
Actually, I think I need VLS=2 or VLS=6 or something.

(AND, if I comment out the modem ATDT dialout, I CAN get all VLS
numbers (except 3) without an error). ?

Remember, I'm NOT talking to another modem.
I will be calling a telephone every time I use this.

Setup modem, dial out, (hopefully know when the call is answered
somehow), play audio for 30 seconds, then hang up.

Any help is appreciated.
 
M

mkr5000

Jan 1, 1970
0
Can you communicate with the modem at all? E.g. can you send ATI0 and
read the response?

as in eye-oh?

I get an error if I......

"AT+IO" & controlchars.cr

If I leave out the +

ATI0 then I get an OK.
 
M

mkr5000

Jan 1, 1970
0
Morning stupidity --

+ or # are for voice commands

But anyway, yeah I can talk to it.....just wish I could get this
project solved.
 
J

JosephKK

Jan 1, 1970
0
I know that programming questions may be off topic for this group but
it's the type of basic question I can't get a handle on ANYWHERE,
including fruitless web searches.

I'm trying to get a basic understanding of how to talk to a modem.

I have a pretty decent understanding of VB.NET and using my
serialport, have written the very basic number one step....that is, a
simple dial out command....ATDT, the phone number etc.

So, there you have it, I can make my phone ring....whoopee! (And so
far, that's it).

My ultimate goal is to use the modem to make a call from my windows
program and play some audio from my soundcard for 30 seconds or so,
once the call is answered.

So, I need a voice modem and it's unique command set......I know that.

MY QUESTION IS --

Can you actually get responses to your AT commands from the
ORIGINATING modem or do you have to another modem answer the call and
IT sends back responses (like RING -- VCON -- etc).

Obviously, I won't be talking to another modem but will be calling a
telephone.

Problem is, when your writing code, I don't know where to start after
I've called the number...(with serialport.write).

The best thing I've seen is a textbox I have set up that looks at the
serialport read data and it shows my the called number.....but for the
life of me, I can't see anything else. (like all the feedback you're
supposed to see?)

My guess is, I've asked a stupid question.

YOU DO NOT get data back from the originating modem -- only another
modem that's talking to it. (?)

If that's the case, how in the heck do I accomplish what I want to do?
Just call, send the audio and hope that it will be answered?

THANKS kindly for any help on this.

I wish to be sure about what you are asking us for. You wish us to
help you build a "computer telephone machine" that calls us in the
middle of our meals, sleep times, and other times while we live our
private lives, and pester us with unwanted voice messages, selling
some odd point of view or crappy merchandise? It is actually illegal
to do that in the USA.

Where in the pluperfect hell do you get off asking us to design for
you a machine to introduce hateful nuisances into our lives?
 
N

Nobody

Jan 1, 1970
0
I wish to be sure about what you are asking us for. You wish us to
help you build a "computer telephone machine" that calls us in the
middle of our meals, sleep times, and other times while we live our
private lives, and pester us with unwanted voice messages, selling
some odd point of view or crappy merchandise? It is actually illegal
to do that in the USA.

Where in the pluperfect hell do you get off asking us to design for
you a machine to introduce hateful nuisances into our lives?

There are legitimate uses for such things, e.g. where the receiver
specifically wants to receive such messages ("hi, this is your burglar
alarm; someone is breaking into your house"), or will probably consider it
reasonable ("hi, this is FEMA, you're about to get hit by a tornado"),
or if the call isn't automated but e.g. a text-phone for the speech
impaired.
 
M

mkr5000

Jan 1, 1970
0
I wish to be sure about what you are asking us for. You wish us to
help you build a "computer telephone machine" that calls us in the
middle of our meals, sleep times, and other times while we live our
private lives, and pester us with unwanted voice messages, selling
some odd point of view or crappy merchandise? It is actually illegal
to do that in the USA.


My project has NOTHING to do with the public.

Why would you assume it does?

Besides, it's really none of your beeswax anyway -- I'm here (like
everyone else) for
electronics problems.

Who died and made you the supervisor?


"Nobody", the above poster, pretty much hit the nail on the head as
far as my intent.


PS ---
Don't ever use the word "machine" when you're discussing electronics.
It's a contradiction.
 
M

mkr5000

Jan 1, 1970
0
Oh.....and I forgot to add.....

"you're an idiot"
 
J

JosephKK

Jan 1, 1970
0
There are legitimate uses for such things, e.g. where the receiver
specifically wants to receive such messages ("hi, this is your burglar
alarm; someone is breaking into your house"), or will probably consider it
reasonable ("hi, this is FEMA, you're about to get hit by a tornado"),
or if the call isn't automated but e.g. a text-phone for the speech
impaired.

Did you read OP's stated purpose for the machine??? It is there in
the thread.
 
J

JosephKK

Jan 1, 1970
0
I wish to be sure about what you are asking us for. You wish us to
help you build a "computer telephone machine" that calls us in the
middle of our meals, sleep times, and other times while we live our
private lives, and pester us with unwanted voice messages, selling
some odd point of view or crappy merchandise? It is actually illegal
to do that in the USA.


My project has NOTHING to do with the public.

Why would you assume it does?

Your previously stated purpose for the machine.
Besides, it's really none of your beeswax anyway -- I'm here (like
everyone else) for
electronics problems.

Who died and made you the supervisor?

You did. You came here posting in a braindead manner.
"Nobody", the above poster, pretty much hit the nail on the head as
far as my intent.


PS ---
Don't ever use the word "machine" when you're discussing electronics.
It's a contradiction.

Only when using your inadequate definition of machine.
 
M

mkr5000

Jan 1, 1970
0
Dear "Braindeader",

I AM the OP.

Read again -- closely.

I NEVER stated a purpose for it.
 
N

Nobody

Jan 1, 1970
0
Did you read OP's stated purpose for the machine??? It is there in
the thread.

I don't see anything more specific than:
My ultimate goal is to use the modem to make a call from my windows
program and play some audio from my soundcard for 30 seconds or so,
once the call is answered.

Did I miss something?
 
J

Jasen Betts

Jan 1, 1970
0
I know that programming questions may be off topic for this group but
it's the type of basic question I can't get a handle on ANYWHERE,
including fruitless web searches.

I'm trying to get a basic understanding of how to talk to a modem.

I have a pretty decent understanding of VB.NET and using my
serialport, have written the very basic number one step....that is, a
simple dial out command....ATDT, the phone number etc.

So, there you have it, I can make my phone ring....whoopee! (And so
far, that's it).

My ultimate goal is to use the modem to make a call from my windows
program and play some audio from my soundcard for 30 seconds or so,
once the call is answered.

So, I need a voice modem and it's unique command set......I know that.

MY QUESTION IS --

Can you actually get responses to your AT commands from the
ORIGINATING modem or do you have to another modem answer the call and
IT sends back responses (like RING -- VCON -- etc).

yes, you need to know and understand the voice commands,
I've not found them well documented, but you might find something in
the ini "driver" file for your modem.
Obviously, I won't be talking to another modem but will be calling a
The best thing I've seen is a textbox I have set up that looks at the
serialport read data and it shows my the called number.....but for the
life of me, I can't see anything else. (like all the feedback you're
supposed to see?)
My guess is, I've asked a stupid question.

probably you are not setting the modem up right, (not giving the right
commands before dialing)

there exists software to play sound out of the modem, use it as an
answering machine etc. so much more is possible,
 
Top