]> git.neil.brown.name Git - freerunner.git/blob - sms/notes
Lots of random updates
[freerunner.git] / sms / notes
1
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+),"([^"]*)","([^"]*)","([^"]*)"\),)*$')
8
9 AT%SLEEP=2   # disable deep sleep to avoid some bug.
10
11 AT+CMGF=1    # enable text mode for SMS
12
13
14 # PIN
15 AT+CPIN? 
16 AT+CPIN="XXXX"
17
18 AT+CPWD=fac,old,new  fac=PS SC AB P2 ???
19
20  AB = 1234
21
22 ATE0  - no echo
23
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
27
28 AT+CIMI  # get imi number
29
30 AT+CPAS  # activity status??
31    0 == nothing
32    3 == incoming call
33    4 == on call
34    5 == ??? no connected??
35
36
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
40
41 AT+CLIP=1 enables calling number
42   +CLIP: "0403463349",129,,,,0
43
44 ATDnumber;  makes a voice call.
45 get NO CARRIER on hangup.
46 Can tell if answered with CPAS (==4)
47
48
49 ATH - hangup  or AT+CHUPA
50
51 AT+CUSD=1,"number"   # sends special request, reply is asyn
52  +CUSD: 2 .....
53  e.g. *61#  - divert on no answer.
54
55
56 AT+CMEE=2   verbose errors
57 # SMS
58
59 AT+CMGS="phonenumber"
60 > text
61 > text
62 > ctrl-Z
63              # send a text message
64
65 AT+CMGL="ALL" or "REC UNREAD"  etc to view all SMS messages
66              last number is byte count
67
68 AT+CMGR=N   read message N
69 AT+CMGD=N   delete message N
70 # GPRS
71 AT+CGDCONT=1,"IP","AU internet"   # or whatever
72 ATD*99#
73
74
75 # new messages:
76
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
83 AT+CNMI=1,2,2,0,1
84
85 AT+CSCB=?
86     request cell broadcast be collected
87
88 Cell broadcast looks like
89 +CBM: 2000,50,1,1,1
90 Eastlakes
91
92 or in packet mode
93 +CBM: 88
94 062000320111C2373DECCE37148D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D100
95 ^^ 6 letters
96   ^^ 20 == ??
97     ^^ 00 
98       ^^32  port '50' is 'Cell Name'
99         ^^01 == ??
100
101 Remainder is encoded as 7 data,, 'Botany\r\n\r\r\r....\n'
102 But there is a leading \b ??
103
104 +CBM: 88
105 07D000320111C5F09CCE0EAFCBF386A2D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D168341A8D46A3D100
106 ^^ 7 letters
107   D000
108       32
109         01
110           \bEastlakes\r\n\r\r\r....\n
111
112
113 AT%EM=2,1 - check Serving Cell INfo
114 AT%EM=2,3 - check neighbours
115
116 AT%EM=2,1
117
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
120           strength
121 OK
122 AT%EM=2,3
123
124 %EM: 6
125 96,88,93,572,622,612
126 17,30,32,1,1,-3
127 17,30,32,-3,-3,-7
128 19,32,34,22,22,18   strength??
129 17,35,50,9,32,38
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
134 0,0,0,0,0,0
135 0,0,0,0,0,0
136 2,2,2,2,2,2
137 7,7,7,7,7,7
138 0,0,0,2,2,2
139 0,0,0,0,0,0
140 0,0,0,23,23,23
141
142 AT%EM=2,4
143
144 %EM: 4,20,505,003,-1687800052
145
146  505 is country
147  003 is carrier
148
149 OK
150 AT+CIMI
151
152 505038240084403
153
154
155
156
157
158 AT%N0187  # maybe cancel echo ??
159
160
161 AT+VTS=01234  - tone generation
162
163 ----------------------------------------------
164
165 Seem to have 4 channels.
166
167 1 must be reserved for pppd
168 1 for management
169 1 for SMS sending?
170 1 for monitor
171
172 Management:
173   Start muxer and connect
174   turn on device
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 
178
179
180
181 How do I get these???
182 +CMS ERROR: 322
183
184 +CMS ERROR: memory full
185
186 I did
187   at+CMGR=?
188
189 then they spontaneously appeared.
190
191
192 OK
193
194 current date time
195 > at+cclk?
196
197 > +CCLK: "0/1/1,0:0:9"
198
199 > OK
200 > at+cclk="09/04/01,14:30:00+00" 
201
202 > OK
203 > at+cclk? 
204
205 > +CCLK: "9/4/1,14:30:3"
206
207 This is not set automatically :-(
208
209
210 call volume level
211
212 at+clvl=230
213
214 Command: AT+COPS?,
215 Response: +COPS: (<mode>,[<format>,<oper>[,<AcT>]]),¡Ä, (<modeN>,[<formatN>,<operN>[,<AcTN>]])
216
217 Command: AT+COPS=?
218 Response: +COPS: <stat>, long <oper>, short <oper>, numeric <oper>, <AcT>
219
220 Response: +CME ERROR:
221 Command: AT+COPS=<mode>,[<format>,<oper>[,<AcT>]]
222 Response: OK | +CME ERROR
223
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.
225
226 <mode>
227
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).
233
234 <format>
235
236    0. Long alphanumeric string
237    1. Short alphanumeric string
238    2. Numeric ID
239
240 <oper>
241 String (based on <format>) that identifies the operator.
242
243 <stat>
244
245    0. Unknown
246    1. Available
247    2. Current
248    3. Forbidden
249
250 <AcT> Network access type
251
252    0. GSM
253    1. Compact GSM
254    2. UTRAN
255    3. GSM with EGPRS
256    4. UTRAN with HSDPA
257    5. UTRAN with HSUPA
258    6. UTRAN with HSDPA and HSU
259
260 -----------------------------------
261 ATH
262 AT+CUSD=0
263 ATH
264 AT+CUSD=0,"*100#",15
265
266 reply:
267 +CUSD: 1,"Try Again
268 1.Your Balance
269 2.Voucher Top-Up",15
270 AT+CUSD=1,"1"
271
272 OK
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
274
275 OK
276
277
278 So when sending:
279  0 - start new interchange
280  1 - follow up message
281 When receiving
282  0 - no reply possible
283  1 - waiting for reply
284
285
286 So: If number matches
287   [*#].*#
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