Chapter 13 – Specific AT Commands
Multi-Tech Systems, Inc. Wireless GSM/GPRS AT Commands (Document Number S000293I)
117
Play Tone +WTONE
Description:
This command allows a tone to be played on the current speaker or on the buzzer. Frequency, gain and
duration can be set.
Values:
<mode>
0
Stop playing.
1
Play a tone
<dest>
Sets the destination (mandatory if <mode>=1)
1
Speaker
2
Buzzer
<freq>
Sets tone frequency (in Hz) (mandatory if <mode>=1).
<freq2>
Sets the 2
nd
tone frequency (in Hz) (mandatory if <mode>=1). Available with speaker only.
If <dest>=1
speaker:
Range is 1 Hz to 3999 Hz
If <dest>=2
buzzer:
Range is between 1 Hz and 50000 Hz.
<gain>
Sets the tone gain for the <freq>. The default is 9.
<gain2>
Sets the tone gain for the <freq2>. The default is 9.
Range of values is 0 to 15
<gain>
Speaker (db)
Buzzer (db)
0 0
-0.25
1 -0.5 -0.5
2 -1 -1
3 -1.5 -1.5
4 -2 -2
5 -3 -3
6 -6 -6
7 -9 -9
8 -12 -12
9 -15 -15
10 -18 -18
11 -24 -24
12 -30 -30
13 -36 -40
14 -42
-infinite
15 -infinite
-infinite
<duration>
Sets tone duration (unit of 100 ms).
Range is 0 to 50. Default 0. 1 -> 0,1 s., 50 -> 5 s.)
When this <duration>=0, the duration is infinite, and the tone can be stopped by
AT+WTONE=0.
Note:
The frequency <freq2> and gain <gain2> are allowed for the speaker only.
Caution:
Hardware can only generate the following frequencies:
Freq = (13 000 000 / (N * 64))
N: Interger value in the recommended range 1 to 2048.
With N=1, the frequency 203 125 Hz is generated.
With N=2048, the frequency 99.18 Hz is generated.
Some noise problems have been detected if the frequency is below 100 Hz.
The lowest frequency possible is 12 Hz.
Syntax: Command
syntax:
AT+WTONE=<mode>[,<dest>,<freq>,<gain>,<duration>[,<freq2>,[gain2>]]]]]
Response
syntax:
OK or +CME ERROR: <err>
Command
Possible responses
AT+WTONE=1,1,300,9,50
Note: Play a tone
OK
Note: Done
AT+WTONE=0
Note: Stop playing
OK
Note: Done
AT+WTONE=?
Note: Test command
OK
Note: Done
AT+WTONE?
Note: Current value
ERROR
AT+WTONE=1,1,300,9,50,600,9
Note: Play a tone with 2 frequencies (allowed with speaker only)
OK
Note: Done
AT+WTONE=1,2,300,9,50,600,9
Note: Play a tone with 2 frequencies with the buzzer
+CME ERROR: 3 (Note: Dual
frequency for speaker only)