Debian Codegraph @

doc/gsmctl.man

raw
1 .TH GSMCTL 8 "##DATE##" "gsmctl v##VERSION##"
2 .SH NAME
3 gsmctl, gsmsiectl \- GSM mobile phone control program
4 .SH SYNOPSIS
5 .B gsmctl
6 .RB [\| \-b
7 .IR baudrate \|]
8 .RB [\| \-\-baudrate
9 .IR baudrate\| ]
10 .RB [ \|\-d
11 .IR device\| ]
12 .RB [ \|\-\-device
13 .IR device\fP ]
14 .RB [ \|\-h\| ]
15 .RB [ \|\-\-help\| ]
16 .RB [ \|\-I
17 .IR "init string" \|]
18 .RB [ \|\-\-init
19 .IR "init string" \|]
20 .RB [ \|\-v\| ]
21 .RB [ \|\-\-version\| ]
22 .RB [ \|\-X\| ]
23 .RB [ \|\-\-xonxoff\| ]
24 .BI \-o \ operation
25 .RB | \ \-\-operation
26 .IR operation \ |
27 .I parameters
28 .PP
29 .B gsmsiectl
30 .RB [\| \-b
31 .IR baudrate \|]
32 .RB [\| \-\-baudrate
33 .IR baudrate\| ]
34 .RB [ \|\-d
35 .IR device\| ]
36 .RB [ \|\-\-device
37 .IR device\fP ]
38 .RB [ \|\-h\| ]
39 .RB [ \|\-\-help\| ]
40 .RB [ \|\-I
41 .IR "init string" \|]
42 .RB [ \|\-\-init
43 .IR "init string" \|]
44 .RB [ \|\-v\| ]
45 .RB [ \|\-\-version\| ]
46 .RB [ \|\-X\| ]
47 .RB [ \|\-\-xonxoff\| ]
48 .BI \-o \ operation
49 .RB | \ \-\-operation
50 .IR operation \ |
51 .I parameters
52 .SH DESCRIPTION
53 .B gsmctl
54 can request information from or perform operations on an GSM mobile
55 phone.
56 .PP
57 .B gsmctl
58 attaches itself to the
59 .I device
60 given on the command line (usually an GSM modem) using the specified
61 .IR baudrate .
62 If no
63 .I device
64 is given, the device
65 .I /dev/mobilephone
66 is used. If no
67 .I baudrate
68 is given, a default baud rate of 38400 is used.
69 .PP
70 .B gsmctl
71 can be used in to modes: If no
72 .B \-\-operation
73 option is given the
74 .I parameters
75 specify the status information to be retrieved from
76 the mobile phone. See the section
77 .B STATUS INFORMATION
78 for more details. If an
79 .B \-\-operation
80 option is given the requested
81 .I operation
82 is performed on the mobile using the
83 .IR parameters .
84 See the section
85 .B OPERATIONS
86 for more details.
87 .PP
88 .B gsmsiectl
89 is the same program with some extension for Siemens mobile phones.
90 Some extra
91 .B OPERATIONS
92 are available in this case.
93 .PP
94 Error messages are printed to the standard error output. If the
95 program terminates on error the error code 1 is returned.
96 .SH OPTIONS
97 .TP
98 .BI \-b\ baudrate ,\ \-\-baudrate\ baudrate
99 The baud rate to use. Defaults to 38400.
100 .TP
101 .BI \-d\ device ,\ \-\-device\ device
102 The device to which the GSM modem is connected. The default is
103 .IR /dev/mobilephone .
104 .TP
105 .B \-h,\ \-\-help
106 Prints an option summary.
107 .TP
108 .BI \-I\ "init string" ,\ \-\-init\ "init string"
109 Initialization string to send to the TA (default: "E0"). Note that the
110 sequence "ATZ" is sent first.
111 .TP
112 .BI \-o\ operation ,\ \-\-operation\ operation
113 This option is used to perform an operation on the mobile phone. Refer
114 to the section
115 .B OPERATIONS
116 for more information on the available
117 operations and the
118 .I parameters
119 required for each operation.
120 .TP
121 .B \-v,\ \-\-version
122 Prints the program version.
123 .TP
124 .B \-X,\ \-\-xonxoff
125 Uses software handshaking (XON/XOFF) for accessing the device.
126 .SH STATUS INFORMATION
127 If called without the
128 .B \-\-operation
129 option
130 .B gsmctl
131 prints out default mobile phone status information as specified by the
132 .I parameters
133 described below:
134 .TP 7
135 .B ALL
136 Prints all available information.
137 .TP 7
138 .B BATT
139 Prints out information about the current battery status. Two lines of
140 the form "<BATT0> text" and "<BATT1> charge" are printed. Text may be
141 of "0 ME is powered by the battery", "1 ME has a battery connected,
142 but is not powered by it", "2 ME does not have a battery connected",
143 or "3 Recognized power fault, calls inhibited". Charge is a number in
144 the range 0..100 where 0 means that the battery is empty or not
145 connected and 100 means full charge.
146 .TP 7
147 .B BITERR
148 Prints information about the current bit error rate. The output is of
149 form "<BITERR0> value" where value can be of 0..7, 99 (99 means not
150 available or not detectable).
151 .TP 7
152 .B CLIP
153 This option prints a line of the form "<CLIP0> on" if caller line
154 identification is turned on in the network, "<CLIP0> off" otherwise.
155 .TP 7
156 .B CSET
157 Display info about charsets. The output is in the form "<CSET0>
158 available" and "<CSET1> current", which describes the charsets
159 available and which is current.
160 .TP 7
161 .B CURROP
162 Prints information about the current operator. The output line has the
163 form "<CURROP0> Long name: \'xxxx\' Short name: \'yyyy\' Numeric Name: zzzz".
164 .TP 7
165 .B FLCAP
166 Prints out the two-letter names of available facility locks. The
167 meaning of standardized facility lock names is as follows:
168 .RS
169 .TP 3
170 .I CS
171 Lock control surface (eg. phone keyboard)
172 .TP 3
173 .I PS
174 Lock phone to SIM card (mobile phone asks password when other than
175 current SIM card inserted)
176 .TP 3
177 .I SC
178 Lock SIM card (SIM asks password in mobile phone power-up and when
179 this lock command issued)
180 .TP 3
181 .I AO
182 Barr all outgoing calls
183 .TP 3
184 .I OI
185 Barr outgoing international calls
186 .TP 3
187 .I OX
188 Barr outgoing international calls except to home country
189 .TP 3
190 .I AI
191 Barr all incoming calls
192 .TP 3
193 .I IR
194 Barr incoming calls when roaming outside the home country
195 .TP 3
196 .I NT
197 Barr incoming calls from numbers not stored to TA memory
198 .TP 3
199 .I NM
200 Barr incoming calls from numbers not stored to mobile phone memory
201 .TP 3
202 .I NS
203 Barr incoming calls from numbers not stored to SIM memory
204 .TP 3
205 .I NA
206 Barr incoming calls from numbers not stored in Any memory
207 .TP 3
208 .I AB
209 All Barring services (FIXME)
210 .TP 3
211 .I AG
212 All outGoing barring services (FIXME)
213 .TP 3
214 .I AC
215 All inComing barring services (FIXME)
216 .TP 3
217 .I FD
218 SIM fixed dialling memory feature (if PIN2 authentication has not been
219 done during the current session, PIN2 is required as <passwd>)
220 .PP
221 Note that mobile phones may implement facility locks not documented
222 here.
223 .RE
224 .TP 7
225 .B FLSTAT
226 Prints information about the status of facility locking in the mobile
227 phone. For each facility a line of the form "<FLSTATn> \'facilityname\'
228 classes" is printed. The classes may be "Voice", "Data", and/or "Fax"
229 depending on the class for which the facility is enabled. If "unknown"
230 is printed out this means that the TA is not able to report the
231 status. If the facility is not enabled for any class, no class
232 identifier is printed. See
233 .B FLCAP
234 for information about the available two-letter names of facility
235 locks.
236 .TP 7
237 .B FORW
238 Prints information about call forwarding enabled in the mobile
239 phone. For each combination of reason (UnconditionalReason,
240 MobileBusyReason, NoReplyReason, and NotReachableReason) and class
241 (Voice, Data, and Fax) a line of the form "<FORWn.m> reason class
242 number: xxx subaddr: yyy time: zzz" is printed. The time is the number
243 of seconds to wait before forwarding in case of NoReplyReason.
244 .TP 7
245 .B ME
246 Prints manufacturer, model, revision, and serial number of
247 the mobile phone (ME = mobile equipment). Output lines are numbered from
248 "<ME0>" to "<ME3>".
249 .TP 7
250 .B OP
251 Prints information about the currently available mobile network
252 operators. For each operator an output line of the form "<OPn> status
253 Long name: \'xxxx\' Short name: \'yyyy\' Numeric name: zzz" is returned
254 where status may be of:
255 .RS
256 .TP 10
257 .I unknown
258 The status of the operator is unknown.
259 .TP
260 .I current
261 This is the currently selected operator.
262 .TP
263 .I available
264 This operator is available for selection.
265 .TP
266 .I forbidden
267 This operator is not available for selection, ie. not
268 accessible with this SIM card.
269 .RE
270 .TP 7
271 .B PIN
272 Prints information about the current PIN status. The output is of
273 form "<PIN0> status". Where status can be one of the following lines:
274 .RS
275 .TP 10
276 .I READY
277 ME is not pending for any password.
278 .TP
279 .I SIM PIN
280 ME is waiting SIM PIN to be given.
281 .TP
282 .I SIM PUK
283 ME is waiting SIM PUK to be given.
284 .TP
285 .I PH\-SIM PIN
286 ME is waiting phone/-to/-SIM card password to be given.
287 .TP
288 .I PH/-FSIM PIN
289 ME is waiting phone/-to/-very first SIM card password to be given.
290 .TP
291 .I PH/-FSIM PUK
292 ME is waiting phone/-to/-very first SIM card unblocking password to be
293 given.
294 .TP
295 .I SIM PIN2
296 ME is waiting SIM PIN2 to be given.
297 .TP
298 .I SIM PUK2
299 ME is waiting SIM PUK2 to be given.
300 .TP
301 .I PH/-NET PIN
302 ME is waiting network personalisation password to be given.
303 .TP
304 .I PH/-NET PUK
305 ME is waiting network personalisation unblocking password to be given.
306 .TP
307 .I PH/-NETSUB PIN
308 ME is waiting network subset personalisation password to be given.
309 .RE
310 .TP 7
311 .B PW
312 Facilities in the mobile phone may be protected by passwords (ie. PINs
313 or PUKs). This option prints out lines of the form "<PWn>
314 \'facilityname\' len" for each facility for which a facility lock
315 password exists. See
316 .B FLCAP
317 for information about the available two-letter names of facility
318 locks.
319 .TP 7
320 .B SCA
321 Reports the default SMS service centre address currently set in the
322 mobile phone.
323 .TP 7
324 .B SIG
325 Prints information about the current network signal
326 strength. The output is of the form "<SIG0> value". Following values
327 are possible:
328 .TP
329 .po +7
330 .I 0
331 -113 dBm or less
332 .TP
333 .I 1
334 -111 dBm
335 .TP
336 .I 2...30
337 -109... -53 dBm (in steps of 2 dBm)
338 .TP
339 .I 31
340 -51 dBm or greater
341 .TP
342 .I 99
343 not known or not detectable
344 .PP
345 .po
346 .SH OPERATIONS
347 .TP
348 .BI dial\ number
349 Dials
350 .IR number .
351 After dialling
352 .B gsmctl
353 waits for a <CR> keypress to terminate.
354 .PP
355 .B forw
356 .IR mode\ reason\ number\ [\| facilityclass\| ]\ [ forwardtime ]
357 .RS
358 Changes the call forwarding behaviour in the network.
359 .I mode
360 can be any of:
361 .RS 3
362 .I disable
363 Call forwarding is disabled.
364 .PP
365 .I enable
366 Call forwarding is enabled. The call forwarding reason, number, and
367 (optionally) forwardtime must be registered beforehand.
368 .PP
369 .I register
370 This registers the call forwarding reason, number, and forwardtime in
371 the network.
372 .PP
373 .I erase
374 This is the counterpart to register. It erase the call forwarding info
375 in the network.
376 .RE
377 .PP
378 .I reason
379 can be any of:
380 .RS 3
381 .I unconditional
382 This applies to every call.
383 .PP
384 .I mobilebusy
385 The mobile phone is busy.
386 .PP
387 .I noreply
388 The call is not answered in \fIforwardtime\fP seconds.
389 .PP
390 .I notreachable
391 Mobile phone cannot be reached (ie. switched off).
392 .PP
393 .I all
394 This refers to all forwarding reasons.
395 .PP
396 .I allconditional
397 This refers to all conditional forward reasons
398 .RI ( mobilebusy ,\ noreply ,\ notreachable ).
399 .RE
400 .PP
401 .I number
402 is the number the incoming call is forwarded to. See the explanation
403 for
404 .I lock
405 operation for the meaning of
406 .IR facilityclass .
407 The default for
408 .I forwardtime
409 is 20 seconds if omitted.
410 .I forwardtime
411 can be in the range 1..30.
412 .RE
413 .PP
414 .TP
415 .BI off
416 Sets functionality level of the phone to 0 (low functionality). The
417 effects of this command depend on the phone (eg. sets low power
418 consumption).
419 .PP
420 .TP
421 .BI on
422 Sets functionality level of the phone to 1 (high functionality). The
423 effects of this command depend on the phone.
424 .PP
425 .TP
426 .BI pin\ pin
427 Sets PIN code. Use
428 .BI gsmctl\ pin
429 to get the current pin status.
430 .PP
431 .B lock
432 .IR facility\ [\| facilityclass \|]\ [\| passwd \|]
433 .RS
434 Locks the named facility. Use
435 .BI gsmctl\ flcap
436 to get a list of supported facilities. The
437 .I facilityclass
438 can be any of:
439 .RS 3
440 .I all
441 Voice, data, and fax.
442 .PP
443 .I v\ vf\ vd\ f\ fd\ d
444 Any combination of voice, data and fax.
445 .RE
446 .PP
447 The default is \fIall\fP if \fIfacilityclass\fP is omitted. The
448 \fIpasswd\fP is password for the facility. If no password is given
449 this parameter can be omitted.
450 .RE
451 .PP
452 .BI setop\ opmode\ numericname
453 .RS
454 Sets the current operator to
455 .IR numericname .
456 Use
457 .BI gsmctl\ op
458 to get a list of operators with their numeric codes.
459 .I opmode
460 can be any of:
461 .RS 3
462 .I automatic
463 .PP
464 .I manual
465 .PP
466 .I deregister
467 Deregister from network.
468 .PP
469 .I manualautomatic
470 If manual selection fails, automatic mode is entered.
471 .RE
472 .RE
473 .PP
474 .B setpw
475 .IR facility\ [\| oldpasswd\| ]\ [\| newpasswd\| ]
476 .RS
477 Sets the password for the facility. If one of the passwords is omitted
478 this means that the facility has no password protection. Passwords are
479 PIN1, PIN2, PUK etc.
480 .RE
481 .TP
482 .BI setsca\ service\ centre\ address
483 Sets the default SMS service centre address.
484 .PP
485 .B unlock
486 .IR facility\ [\| facilityclass\| ]\ [ \|passwd\| ]
487 .RS
488 This is the reverse operation to \fBlock\fP. See above for a
489 description of the parameters.
490 .RE
491 .PP
492 .B Extra operators for gsmsiectl:
493 .PP
494 .B cset
495 .RS
496 Charset info.
497 .RE
498 .PP
499 .B pbook
500 .RS
501 Phone book info.
502 .RE
503 .PP
504 .B signal
505 .RS
506 Signal tone info.
507 .RE
508 .PP
509 .B ring
510 .RS
511 Ringing tone info.
512 .RE
513 .PP
514 .B binary
515 .RS
516 Binary info.
517 .RE
518 .SH EXAMPLES
519 The following invocation of
520 .I gsmctl
521 prints out all available status information for the mobile phone
522 connected to
523 .B /dev/mobilephone
524 .PP
525 .nf
526 .IP "" 3
527 gsmctl all
528 .fi
529 .PP
530 The output could look like (lines edited to fit):
531 .RS 3
532 .PP
533 .PD 0
534 <ME0> Manufacturer: SIEMENS
535 .HP
536 <ME1> Model: S10
537 .HP
538 <ME2> Revision: 06
539 .HP
540 <ME3> Serial Number: 448058511817585
541 .HP
542 <OP0> Status: available Long name: 'D1/-TELEKOM' Short name: '' Numeric name: 26201
543 .HP
544 <OP1> Status: forbidden Long name: 'D2 PRIVAT' Short name: '' Numeric name: 26202
545 .HP
546 <CURROP0> Long name: 'D1/-TELEKOM' Short name: '' Numeric name: 26201 Mode: automatic
547 .HP
548 <FLSTAT0> 'CS'
549 .HP
550 <FLSTAT1> 'PS'
551 .HP
552 <FLSTAT2> 'SC' Voice Data Fax
553 .HP
554 <FLSTAT3> 'AO'
555 .HP
556 <FLSTAT4> 'OI'
557 .HP
558 <FLSTAT5> 'OX'
559 .HP
560 <FLSTAT6> 'AI'
561 .HP
562 <FLSTAT7> 'IR'
563 .HP
564 <FLCAP0> 'CS' 'PS' 'SC' 'AO' 'OI' 'OX' 'AI' 'IR' 'AB' 'AG' 'AC'
565 .HP
566 <PW0> 'PS' 8
567 .HP
568 <PW1> 'SC' 8
569 .HP
570 <PW2> 'AO' 4
571 .HP
572 <PW3> 'OI' 4
573 .HP
574 <PW4> 'OX' 4
575 .HP
576 <PW5> 'AI' 4
577 .HP
578 <PW6> 'IR' 4
579 .HP
580 <PW7> 'AB' 4
581 .HP
582 <PW8> 'AG' 4
583 .HP
584 <PW9> 'AC' 4
585 .HP
586 <CLIP0> on
587 .HP
588 <FORW0.0> UnconditionalReason Voice inactive number: subaddr: time: -1
589 .HP
590 <FORW0.1> UnconditionalReason Data inactive number: subaddr: time: -1
591 .HP
592 <FORW0.2> UnconditionalReason Fax inactive number: subaddr: time: -1
593 .HP
594 <FORW1.0> MobileBusyReason Voice active number: +494012345678 subaddr: time: -1
595 .HP
596 <FORW1.1> MobileBusyReason Data inactive number: subaddr: time: -1
597 .HP
598 <FORW1.2> MobileBusyReason Fax inactive number: subaddr: time: -1
599 .HP
600 <FORW2.0> NoReplyReason Voice active number: +494012345678 subaddr: time: 20
601 .HP
602 <FORW2.1> NoReplyReason Data inactive number: subaddr: time: -1
603 .HP
604 <FORW2.2> NoReplyReason Fax inactive number: subaddr: time: -1
605 .HP
606 <FORW3.0> NotReachableReason Voice active number: +494012345678 subaddr: time: -1
607 .HP
608 <FORW3.1> NotReachableReason Data inactive number: subaddr: time: -1
609 .HP
610 <FORW3.2> NotReachableReason Fax inactive number: subaddr: time: -1
611 .HP
612 <BATT0> 0 ME is powered by the battery
613 .HP
614 <BATT1> 100
615 .HP
616 <BITERR0> 0
617 .HP
618 <SIG0> 19
619 .RE
620 .PD
621 .PP
622 The following locks the keys on the mobile phone:
623 .nf
624 .IP "" 3
625 gsmctl -o lock cs
626 .fi
627 .PP
628 This changes the SIM card PIN from 1234 to 2345:
629 .nf
630 .IP "" 3
631 gsmctl -o setpw sc 1234 2345
632 .fi
633 .PP
634 Switch off all call forwarding (actually erase the numbers):
635 .nf
636 .IP "" 3
637 gsmctl -o forw erase all
638 .fi
639 .PP
640 Switch on call forwarding to German D1 voice box:
641 .nf
642 .IP "" 3
643 gsmctl -o forw register notreachable 3313
644 gsmctl -o forw enable notreachable
645 .fi
646 .PP
647 .SH FILES
648 .TP
649 .B /dev/mobilephone
650 Default mobile phone device.
651 .SH AUTHOR
652 Peter Hofmann <[email protected]>
653 .SH BUGS
654 Report bugs to [email protected]. Include a complete, self-ncontained
655 example that will allow the bug to be reproduced, and say which
656 version of \fIgsmctl\fP you are using.
657 .SH COPYRIGHT
658 Copyright \(co 1999 Peter Hofmann
659 .PP
660 .B gsmctl
661 is free software; you can redistribute it and/or modify it under the
662 terms of the GNU Library General Public License as published by the
663 Free Software Foundation; either version 2, or (at your option) any
664 later version.
665 .PP
666 .B gsmctl
667 is distributed in the hope that it will be useful, but WITHOUT ANY
668 WARRANTY; without even the implied warranty of MERCHANTABILITY or
669 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
670 License for more details.
671 .PP
672 You should have received a copy of the GNU Library General Public
673 License along with
674 .BR gsmctl ;
675 see the file COPYING. If not, write to the Free Software Foundation,
676 675 Mass Ave, Cambridge, MA 02139, USA.
677 .SH "SEE ALSO"
678 .BR gsminfo (7),
679 .BR gsmpb (1),
680 .BR gsmsendsms (1),
681 .BR gsmsmsd (8),
682 .BR gsmsmsstore (1).
683