Tech Talk : AT Command – Check Modem TypeWhat kind of modem do I need for an alarm notification system???

It could be to notify anything; intrusion at home, garage door left opened while everyone is away, etc.

That was the question I was asking myself couple of months ago when one of my buddy had put a bug in my head about writing a C# application for alarm notification. Basically, the requirement was to notify a person on duty (24/7 on call) should there be any emergency alarm occurring in the processing plant. Yes you have guessed it, this was for an oil and gas application. The user should also be able to acknowledge the alarm using his/her phone as well.

With those requirements in mind, I bought US Robotics USR5637 USB modem (see image below) which they claims it does fax, data and voice. I will be using this USB modem to test some of the initial theory (whether it support voice or not) using the AT Command.

Xybernetics AT Command - Check Modem Type

Most modems have three basic characteristics/functions.

– Data and fax
– Data, fax and voice
– Data, fax, voice and speakerphone

For my application, the modem must support voice feature. The easiest way to find out if your modem supports voice is to execute AT Command by running a terminal emulator that supports serial port connections; such as HyperTerminal, TeraTerm and PuTTY just to name a few.

For our example, we will be running TeraTerm. Let’s start the TeraTerm and select the port number for the modem. The port number should be assigned if the driver is properly installed and the modem is connected to the computer.

Xybernetics AT Command - Check Modem Type

Make sure that the “Local echo” is turned on so that you can see what you are typing.

Xybernetics AT Command - Check Modem Type

Type “AT” and hit enter in the command prompt (it does not matter if it is uppercase or lowercase). If you connection to the modem is working you should get the “OK” feedback from the modem.

Xybernetics Inc

Let’s get to the meat and potatoes of the things we are trying to do.
Type “AT+FCLASS=?” and hit enter to determine what type of transmission does your modem support. If your modem responds with 0,1,2,8, it means that your modem supports data, fax and voice transmission. Here are the breakdowns of what each number means.

0: Data
1,2: Fax
8: Voice

Let’s set your modem to do voice transmission. Type “AT+FCLASS=8” and hit enter.

Next, let’s find out about its capabilities regarding the voice data formats it can handle. Type “AT+VSM=?” and hit enter.
You should be getting something like these.

Xybernetics AT Command - Check Modem Type

What these lines means is that my modem supports 5 different methods of encoding voice data. I will not be covering what each line means but my focus will be on the first method (the simplest one), which uses 8-bit linear (signed numbers) and supports the following sampling rates; 7200, 8000, or 11025 samples per second.

In theory, most human voice frequency falls between 1kHz to 4kHz. Sampling theory (Nyquist) indicates that you will have to take at least 8kHz in order to reconstruct voice content up to 4kHz. Higher than 8kHz would be better to avoid anti-aliasing. However, higher sampling rates come with the price of heavier data load.

For our purpose, we will be choosing 8000 samples per second which is 8kHz. Type “AT+VSM=128, 8000” and hit enter. And you should get “OK” back.

Encoding types and chipset specific default voice formats
In order to play voice messages on a voice modem, the voice data should be presented to the modem in an encoded format. When the modem records a voice message, the recorded voice will be digitized and presented to the application in an encoded format. Unfortunately, there is no standard encoding format that every modem supports.Supported formats vary from chipset to chipset and sometimes even within the same modem chipset. To make things worst, the way in which modems return the list of the supported voice formats is not standard.
The table below is a guideline of voice-encoding format for every supported chipset.

Modems Encoded Voice Format
Rockwell chipset modems Rockwell ADPCM, 7200 Hz
US Robotics modems 8Khz, 8 bit, mono, PCM encoded WAV files
Lucent chipset modems 8Khz, 8 bit, mono, PCM encoded WAV files
Cirrus logic chipset modems 11Khz, 8 bit, mono, PCM encoded WAV files
Conexant HCF chipset modems 11Khz, 8 bit, mono, PCM encoded WAV files

I hope that is enough ammo to get you started with your voice modem.