http://www.wavecom.com/forum

Open AT ®  Release version:
3.13

Sample - Sound_Demo

Changes

Dependencies

This sample depends on the following libraries :

Application Description

This application provides some AT commands in order to access to the Open-AT Sound API.

As this application uses the MultiApp library, the following start/stop command has to be used to control the application execution.

 

  AT+SDSTART (Port Manager start/stop command)
CommandAnswers
AT+SDSTART?+SDSTART: <state>
OK
AT+SDSTART=?+SDSTART: (0-1)
OK
AT+SDSTART= <state> +CME ERROR: 3
or
OK
 
ParameterValues rangeDescriptionDefault value
state0-1The current application running state. This parameter is stored in non-volatile memory.0

The init entry point sent to the MultiApp library is the sd_init() function. The start/stop entry points linked to the +SDSTART command are the sd_run() and sd_stop() functions.

The AT commands described below may be used in order to access to the Open-AT Sound API.
Common parameters may be set as below :

Any playing sound may be stopped at any time with the +STOP command.
Sound may be played as below :

 

  AT+DEST (Sound destination selection command)
CommandAnswers
AT+DEST=?+DEST: (0-2)
OK
AT+DEST?+DEST: <Dest>
OK
AT+DEST= <Dest> OK
 
ParameterValues rangeDescriptionDefault value
Dest0-2Sound destination
0 : buzzer ;
1 : speaker ;
2 : GSM voice call (DTMF tones only)
1

 

  AT+GAIN (Sound gains selection command)
CommandAnswers
AT+GAIN=?+GAIN: (0-15) , (0-15)
OK
AT+GAIN?+GAIN: <Gain> , <Gain2>
OK
AT+GAIN= <Gain> ,[ <Gain2> ]OK
 
ParameterValues rangeDescriptionDefault value
Gain0-15DTMF, Tone or Melody gain.8
Gain20-15Second Tone gain.8

 

  AT+DURATION (Sound duration selection command)
CommandAnswers
AT+DURATION=?+DURATION: (0-255)
OK
AT+DURATION?+DURATION: <Duration>
OK
AT+DURATION= <Duration> OK
 
ParameterValues rangeDescriptionDefault value
Duration0-255DTMF or Tone duration (1 = 20ms).
(0 will play the DTMF/Tone endlessly)
Melody tempo (1 = a black duration of 20ms)
10

 

  AT+STOP (Sound stop command)
CommandAnswers
AT+STOP=? OK
AT+STOPOK
Stops all the playing sounds on the current destination.
 

 

  AT+DTMF (DTMF play command)
CommandAnswers
AT+DTMF=?+DTMF: (0-9,*,#,A-F)
OK
AT+DTMF= <DTMF> OK
 
ParameterValues rangeDescriptionDefault value
DTMF0-9,*,#,A-FDTMF character to play
Destination may be set with the +DEST command
Duration may be set with the +DURATION command
Gain may be set with the +GAIN command
The output sound may be stopped with the +STOP command
mandatory

 

  AT+TONE (Tones play command)
CommandAnswers
AT+TONE=?+TONE: (0-X) , (0-X)
OK
AT+TONE= <Frequency1> ,[ <Frequency2> ]OK
 
ParameterValues rangeDescriptionDefault value
Frequency10-XTone frequency to play ; maximum value depends on the current destination :
50000 Hz for speaker
4000 Hz for speaker
Destination may be set with the +DEST command
Duration may be set with the +DURATION command
Gain may be set with the +GAIN command
The output sound may be stopped with the +STOP command
mandatory
Frequency20-XSecond Tone frequency to play0

 

  AT+MELO (Melody play command)
CommandAnswers
AT+MELO=?+MELO: (0-255)
OK
AT+MELO= <NbTimes> OK
 
ParameterValues rangeDescriptionDefault value
NbTimes0-255Number of times the melody will be played (0 for an endlessly play)
Destination may be set with the +DEST command
Tempo may be set with the +DURATION command
Gain may be set with the +GAIN command
The output sound may be stopped with the +STOP command
mandatory

Updated: Wed Apr 4 13:15:59 CEST 2007;