Good Afternoon,
I have a PcTel HSP56 Mr Data/Fax/Voice/Speakerphone modem. I want
to set up a program to answer the phone in my absence and present
the caller with a little menu.
So far, the program waits for an incomming ring, switches to
speakerphone mode with at#cls=8, and answers with ata. From here,
I can record a message because the modem is connected to my sound
card, so at#vls=6 sends the line input from the modem to my sound
card for recording.
The part where I'm stuck is: how should i play sound files over
the modem to the caller? I have tried at#vtx to put the modem in
audio transmit mode, and it says connect. From here, I can submit
audio data to the modem, but all I get on the phone is a loud
roar, sounds like I'm not submitting the data in the right format.
I tried Microsoft ADPCM 4-bit, 8000 Hurtz when I got the roar. I
also tried DVI-IMA ADPCM and that didn't work, either. But the
description of AT#VTX says "Voice transmit mode (ADPCM)". So my
question is really: What audio format is the PcTel HSP56 Mr
Data/Fax/Voice/SpeakerPhone modem looking for when in At#VTX, and
does the rest of my program look correct?
Thank you so much! - Craig. |
Request for Question Clarification by
aht-ga
on
19 Aug 2003 17:42 PDT
Can you clarify something for me? Are you writing a custom program to
use with your modem? Have you already tried commercial software like
FaxTalk Messenger Pro, which supports a basic IVR capability using a
heirarchy of mailboxes?
|
Request for Question Clarification by
aht-ga
on
19 Aug 2003 17:49 PDT
Also, please send the modem a "AT+VSM=?" or "AT#VSM=?" command to see
what compression modes it supports, you may need to force a
compression type using "AT+VLM=<number>" in order to have it match the
type of sound data you are attempting to play.
|
Clarification of Question by
marvelsoft-ga
on
19 Aug 2003 18:52 PDT
Hi Aht,
Thanks so much for the quick response! Yep, I'm writing the program
myself. I want to do this myself - no 3rd party stuff. I'm a bit of a
weirdo that way - I want to know what's going on under the hood. Or
what isn't in this case <Grin>
My modem doesn't support at#vsm. I sent a at#vci? and it returned
PcTel;ADPCM;32. HTH - Craig.
PS: You can find a list of AT commands my modem does support here:
http://www.zoltrix.com/support_html/PUBLIC/MODEM/ATmanual/ATHSP336.HTM
|
Request for Question Clarification by
aht-ga
on
19 Aug 2003 20:40 PDT
Craig,
Here's a web document from Zoltrix related to programming a Voice
modem; while it is not specifically for your modem, I think you will
find the examples in section 8.6 informative. You may wish to try
using 4-bit, 7200 Hz as the ADPCM compression settings, this is
mentioned in one of the examples. Also, note that in order to support
voice compression, the DTE<>modem comm rate must be 38,400 bps (again,
mentioned in the examples).
http://www.zoltrix.com/PUBLIC/MODEM/ATmanual/ATVROCK.HTM
I'm posting this as a Clarification Request so that you can experiment
with the information at that programming guide to see if it helps. If
it does, and you are willing to accept this as your Answer, please let
me know.
Regards,
aht-ga
|
Clarification of Question by
marvelsoft-ga
on
19 Aug 2003 22:42 PDT
Hello again Aht,
Wow! That page you found is fantastic! It goes through everything
- My programming style is bang-on! That sure is good to know.
A super idea to change the baud. In voice command mode, I issued
at#bdr=16. 16 represents the number of times 2400 is multiplied.
So that makes 38400, and it didn't seem to make any difference.
I did try converting the test file I have to 4bit ADPCM, with a
sampling rate of 7200. I tried this in IMA ADPCM and Microsoft
ADPCM with no luck. Just more roaring.
As a point of interest, AT#VSR (the command to change the audio
codec sampling rate) only allows one parameter, 8000. When I issue
AT#VSR?, it says 8000.
Do you think I could be communicating with the modem wrong, that
is, setting up xon/xof wrong? Would that cause this roaring
problem? I'm not sure, but it's a possibility, I guess. I'm just
sending a baud rate of 38400. I'm not specifying any further
parameters.
You're doing a super job researching this. If you can think of
anything else to try I'll gladly do it!--Craig.
|
Request for Question Clarification by
aht-ga
on
20 Aug 2003 05:43 PDT
I'm going to ask some "simple" questions as a clarification request,
please indulge me... when you mention that you tried issuing an
AT#BDR=16 command to set the modem to a DTE rate of 38.4 kbps, is it
safe for me to assume that you also changed your serial comm rate (at
the PC end) to 38.4kbps immediately thereafter?
Also, how are you sending the decompressed data from the ADPCM codec
to the modem? And, have you tried to "play" the sound file through the
sound card (taking advantage of the speakerphone capability, assuming
that you have the sound card output tied into the modem's input),
instead of transmitting the decompressed ADPCM data to the modem for
it's DAC to reconstitute as sound?
I have come across some references online to a Rockwell ADPCM format
being proprietary, so my last "simple" question is, have you tried
recording a message through the modem (in VRX mode), and successfully
played it back through either the MS ADPCM codec, or the DVI-IMA ADPCM
codec? It may be that your codec isn't compatible. I refer you to an
example reference at:
http://www.blackice.com/Help/Tools/Voice%20OCX%20webhelp/WebHelp/Using_the_Codec_library_to_convert_to_and_from_modem_specific_formats.htm
There's a very good chance that this might be the problem.
|
Request for Question Clarification by
aht-ga
on
20 Aug 2003 05:46 PDT
Continuing with the possibility that it's your codec, check out this
shareware converter program:
http://www.fmjsoft.com/aaframe.html
It can handle conversion to/from the Rockwell ADPCM format.
|
Clarification of Question by
marvelsoft-ga
on
20 Aug 2003 10:30 PDT
Good morning Aht,
Wow, you're an amazing searcher. Good work!
Sadly, though, nothing seems to help. I did try on numerous
occasions to just send the files to the sound card hoping the
modem would transmit that data as it sends voice data to the sound
card when a caller speaks. The modem doesn't recognize anything I
send it.
I tried the Black Ice Software Fax Voice C++ program you pointed
me to. Well actually I tried playing the four different demo
formats they gave me. Infuriatingly enough, I just got more
roaring.
I am not submitting the audio through a codec. I simply read in
the file with a binary file read and print the data to the modem.
Is this not the correct way to do things?
You are being so patient, I really appreciate it. Good luck with
this one, and hopefully I've given you something to go on.--Craig.
|
Clarification of Question by
marvelsoft-ga
on
20 Aug 2003 10:34 PDT
Sorry, forgot to answer a couple of things.
Yes, after I issue at#bdr=16, I change my baud rate to 38400.
I can't record a file from the modem when in voice receive mode,
because the modem doesn't give me the audio data. It just sends it
off to the sound card. If only the modem would do either one or
the other, and not handle this differently for input and
output!--Craig.
|
Request for Question Clarification by
aht-ga
on
20 Aug 2003 22:02 PDT
Assuming that you have your modem driver installed properly (this
modem is a Winmodem, so its performance depends on the proper driver),
then you need to send a Conexant/Rockwell ADPCM formatted data stream
to it at the expected bit rate (4-bit, 7.2 kHz appears to be the
default, the 8 kHz includes overhead).
The HSP56's driver has an integrated codec for the Rockwell ADPCM
format. When in speakerphone mode, that codec automatically converts
the Rockwell ADPCM data stream from the modem's DAC into a Windows
standard PCM format which the sound card's driver is able to
understand and send to the sound card's DAC for conversion back into
sound.
In your case, you are trying to communicate directly to the modem, so
you need to send it preformatted data in the Rockwell ADPCM format.
Please try the FMJSoft program, Awave Audio, that I provided the link
to in a previous Clarification Request (up above). Use it to convert a
WAV file (recorded using your sound card and Windows Sound Recorder)
to a 4-bit 7.2 kHz Rockwell ADPCM file. Then, try sending that file to
the modem.
Silly question, but are you getting a CONNECT response from the modem
when you enter AT#VTX mode?
|
Clarification of Question by
marvelsoft-ga
on
22 Aug 2003 12:29 PDT
Good Morning, Aht,
Thanks to your step-by-step directions, I finally managed to get that
darn modem working. So please go ahead and formally answer the
question - even though you've already done so!
Thanks again for everything, and have a wonderful week-end! - Craig.
|