2 AT+CFUN=1 # turn on. =0 to turn off??
3 AT+COPS # connect to GSM network
4 AT+COPS? # get status and carrier
5 AT+COPS=? # get list of providers
6 +COPS: (2,"vodafone AU","voda AU","50503"),(3,"YES OPTUS","Optus","50502"),(3,"Telstra Mobile","Telstra","50501")
7 p=re.compile('^\+COPS: (\((\d+),"([^"]*)","([^"]*)","([^"]*)"\),)*$')
9 AT%SLEEP=2 # disable deep sleep to avoid some bug.
11 AT+CMGF=1 # enable text mode for SMS
18 AT+CPWD=fac,old,new fac=PS SC AB P2 ???
24 AT+CSQ # signal quality
25 AT+CREG? # are we registered?? (0,1)==at home, (0,5) == roaming
26 AT+CREG=2 # get regular updates of location : LAC and CELLID in hex
28 AT+CIMI # get imi number
30 AT+CPAS # activity status??
34 5 == ??? no connected??
37 ATA - answer call - +CRING: VOICE is received
38 Get 'OK' is there was nothing to answer any more
39 NO CARRIER when other end hangs up
41 AT+CLIP=1 enables calling number
42 +CLIP: "0403463349",129,,,,0
44 ATDnumber; makes a voice call.
45 get NO CARRIER on hangup.
46 Can tell if answered with CPAS (==4)
49 ATH - hangup or AT+CHUPA
51 AT+CUSD=1,"number" # sends special request, reply is asyn
53 e.g. *61# - divert on no answer.
56 AT+CMEE=2 verbose errors
65 AT+CMGL="ALL" or "REC UNREAD" etc to view all SMS messages
66 last number is byte count
68 AT+CMGR=N read message N
69 AT+CMGD=N delete message N
71 AT+CGDCONT=1,"IP","AU internet" # or whatever
77 AT+CNMI: (0-2),(0-3),(0,2),(0,1),(0,1)
78 (0-2) 1 to send is possible
79 (0-3) sms incoming: 1 == just index, 2 == message
80 (0,2) ditto for cell broadcast
81 (0,1) sms status report
82 (0,1) flush or clear any buffered messages
86 request cell broadcast be collected
88 Cell broadcast looks like
94 062000320111C2373DECCE37148D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D100
98 ^^32 port '50' is 'Cell Name'
101 Remainder is encoded as 7 data,, 'Botany\r\n\r\r\r....\n'
102 But there is a leading \b ??
105 07D000320111C5F09CCE0EAFCBF386A2D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D100
110 \bEastlakes\r\n\r\r\r....\n
113 AT%EM=2,1 - check Serving Cell INfo
114 AT%EM=2,3 - check neighbours
118 %EM: 102,39,39,39,49,28232,15,0,1,0,0,0,0,0,0,2215,0,0,2,255
119 ^^ ^^ cell ^^ location
128 19,32,34,22,22,18 strength??
130 28237,22793,22791,28237,22796,22798 <--- cell
131 2215,2215,2215,2215,2215,2215 <--- location
132 695457,2517437,2517437,2461758,644848,644848
133 3888,944,948,2424,3380,3380
144 %EM: 4,20,505,003,-1687800052
158 AT%N0187 # maybe cancel echo ??
161 AT+VTS=01234 - tone generation
163 ----------------------------------------------
165 Seem to have 4 channels.
167 1 must be reserved for pppd
173 Start muxer and connect
175 attempt to register. On failure, get list of available networks.
176 Continue to check every 10 minutes while not suspended.
177 If not registerred. leave
181 How do I get these???
184 +CMS ERROR: memory full
189 then they spontaneously appeared.
197 > +CCLK: "0/1/1,0:0:9"
200 > at+cclk="09/04/01,14:30:00+00"
205 > +CCLK: "9/4/1,14:30:3"
207 This is not set automatically :-(
215 Response: +COPS: (<mode>,[<format>,<oper>[,<AcT>]]),¡Ä, (<modeN>,[<formatN>,<operN>[,<AcTN>]])
218 Response: +COPS: <stat>, long <oper>, short <oper>, numeric <oper>, <AcT>
220 Response: +CME ERROR:
221 Command: AT+COPS=<mode>,[<format>,<oper>[,<AcT>]]
222 Response: OK | +CME ERROR
224 Description: Get/set current GSM/UMTS network operator, list available operators. This can be used to change for example access type and switch network.
228 0. Automatic network selection (<oper> ignored)
229 1. Manual network selection, <oper> must be present, <AcT> is optional.
230 2. Deregister from network.
231 3. Set <format only, no registration/deregistration.
232 4. Manual selection with automatic fall back (enters automatic mode if manual selection fails).
236 0. Long alphanumeric string
237 1. Short alphanumeric string
241 String (based on <format>) that identifies the operator.
250 <AcT> Network access type
258 6. UTRAN with HSDPA and HSU
260 -----------------------------------
273 +CUSD: 0,"Your bal is $18.18 &expires on 11/01/2011. Your Magic Top Up 22c rate applies until 10/02/2010. You've got 100 FREE texts with 100 to use before 10/02/2010.",15
279 0 - start new interchange
280 1 - follow up message
282 0 - no reply possible
283 1 - waiting for reply
286 So: If number matches
288 Then set button to "SEND" rather than "CALL" and us CUSD
289 Display reply in message area with "cancel" button.
290 If reply is wanted, also have "reply" button