http://www.wavecom.com/forum Open AT ® Release version: 3.13 |
This sample depends on the following libraries :
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)
Command | Answers |
AT+SDSTART? | +SDSTART:
<state>
OK |
AT+SDSTART=? | +SDSTART:
(0-1)
OK |
AT+SDSTART= <state> | +CME ERROR: 3 or OK |
Parameter | Values range | Description | Default value |
state | 0-1 | The 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)
Command | Answers |
AT+DEST=? | +DEST:
(0-2)
OK |
AT+DEST? | +DEST:
<Dest>
OK |
AT+DEST= <Dest> | OK |
Parameter | Values range | Description | Default value |
Dest | 0-2 | Sound destination 0 : buzzer ; 1 : speaker ; 2 : GSM voice call (DTMF tones only) | 1 |
AT+GAIN (Sound gains selection command)
Command | Answers |
AT+GAIN=? | +GAIN:
(0-15)
,
(0-15)
OK |
AT+GAIN? | +GAIN:
<Gain>
,
<Gain2>
OK |
AT+GAIN= <Gain> ,[ <Gain2> ] | OK |
Parameter | Values range | Description | Default value |
Gain | 0-15 | DTMF, Tone or Melody gain. | 8 |
Gain2 | 0-15 | Second Tone gain. | 8 |
AT+DURATION (Sound duration selection command)
Command | Answers |
AT+DURATION=? | +DURATION:
(0-255)
OK |
AT+DURATION? | +DURATION:
<Duration>
OK |
AT+DURATION= <Duration> | OK |
Parameter | Values range | Description | Default value |
Duration | 0-255 | DTMF 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)
Command | Answers |
AT+STOP=? | OK |
AT+STOP | OK Stops all the playing sounds on the current destination. |
AT+DTMF (DTMF play command)
Command | Answers |
AT+DTMF=? | +DTMF:
(0-9,*,#,A-F)
OK |
AT+DTMF= <DTMF> | OK |
Parameter | Values range | Description | Default value |
DTMF | 0-9,*,#,A-F | DTMF 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)
Command | Answers |
AT+TONE=? | +TONE:
(0-X)
,
(0-X)
OK |
AT+TONE= <Frequency1> ,[ <Frequency2> ] | OK |
Parameter | Values range | Description | Default value |
Frequency1 | 0-X | Tone 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 |
Frequency2 | 0-X | Second Tone frequency to play | 0 |
AT+MELO (Melody play command)
Command | Answers |
AT+MELO=? | +MELO:
(0-255)
OK |
AT+MELO= <NbTimes> | OK |
Parameter | Values range | Description | Default value |
NbTimes | 0-255 | Number 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;