?? gsmctl.man
字號:
.TH GSMCTL 8 "##DATE##" "gsmctl v##VERSION##".SH NAMEgsmctl \- GSM mobile phone control program.SH SYNOPSIS.B gsmctl.RB [\| \-b.IR baudrate \|].RB [\| \-\-baudrate.IR baudrate\| ].RB [ \|\-d.IR device\| ].RB [ \|\-\-device.IR device\fP ].RB [ \|\-h\| ].RB [ \|\-\-help\| ].RB [ \|\-I.IR "init string" \|].RB [ \|\-\-init.IR "init string" \|].RB [ \|\-v\| ].RB [ \|\-\-version\| ].RB [ \|\-X\| ].RB [ \|\-\-xonxoff\| ].BI \-o \ operation.RB | \ \-\-operation.IR operation \ |.I parameters.SH DESCRIPTION.B gsmctlcan request information from or perform operations on an GSM mobilephone..PP.B gsmctl attaches itself to the .I devicegiven on the command line (usually an GSM modem) using the specified.IR baudrate . If no.I deviceis given, the device.I/dev/mobilephoneis used. If no .I baudrateis given, a default baud rate of 38400 is used..PP.B gsmctlcan be used in to modes: If no .B \-\-operationoption is given the.I parametersspecify the status information to be retrieved fromthe mobile phone. See the section .B STATUS INFORMATIONfor more details. If an .B \-\-operationoption is given the requested.I operationis performed on the mobile using the.IR parameters . See the section .B OPERATIONSfor more details..PPError messages are printed to the standard error output. If theprogram terminates on error the error code 1 is returned..SH OPTIONS.TP.BI \-b\ baudrate ,\ \-\-baudrate\ baudrateThe baud rate to use. Defaults to 38400..TP.BI \-d\ device ,\ \-\-device\ deviceThe device to which the GSM modem is connected. The default is.IR /dev/mobilephone ..TP.B \-h,\ \-\-helpPrints an option summary..TP.BI \-I\ "init string" ,\ \-\-init\ "init string"Initialization string to send to the TA (default: "E0"). Note that thesequence "ATZ" is sent first..TP.BI \-o\ operation ,\ \-\-operation\ operationThis option is used to perform an operation on the mobile phone. Referto the section .B OPERATIONSfor more information on the availableoperations and the .I parametersrequired for each operation..TP.B \-v,\ \-\-versionPrints the program version..TP.B \-X,\ \-\-xonxoffUses software handshaking (XON/XOFF) for accessing the device..SH STATUS INFORMATIONIf called without the .B \-\-operationoption .B gsmctlprints out default mobile phone status information as specified by the.I parametersdescribed below:.TP 7.B ALLPrints all available information..TP 7.B BATTPrints out information about the current battery status. Two lines ofthe form "<BATT0> text" and "<BATT1> charge" are printed. Text may be of "0 ME is powered by the battery", "1 ME has a battery connected,but is not powered by it", "2 ME does not have a battery connected",or "3 Recognized power fault, calls inhibited". Charge is a number in the range 0..100 where 0 means that the battery is empty or notconnected and 100 means full charge..TP 7.B BITERRPrints information about the current bit error rate. The output is ofform "<BITERR0> value" where value can be of 0..7, 99 (99 means notavailable or not detectable)..TP 7.B CLIPThis option prints a line of the form "<CLIP0> on" if caller lineidentification is turned on in the network, "<CLIP0> off" otherwise..TP 7.B CSETDisplay info about charsets. The output is in the form "<CSET0>available" and "<CSET1> current", which describes the charsetsavailable and which is current..TP 7.B CURROPPrints information about the current operator. The output line has theform "<CURROP0> Long name: \'xxxx\' Short name: \'yyyy\' Numeric Name: zzzz"..TP 7.B FLCAPPrints out the two-letter names of available facility locks. Themeaning of standardized facility lock names is as follows:.RS.TP 3.I CSLock control surface (eg. phone keyboard).TP 3.I PSLock phone to SIM card (mobile phone asks password when other thancurrent SIM card inserted).TP 3.I SCLock SIM card (SIM asks password in mobile phone power-up and whenthis lock command issued).TP 3.I AOBarr all outgoing calls.TP 3.I OIBarr outgoing international calls.TP 3.I OXBarr outgoing international calls except to home country.TP 3.I AIBarr all incoming calls.TP 3.I IRBarr incoming calls when roaming outside the home country.TP 3.I NTBarr incoming calls from numbers not stored to TA memory.TP 3.I NMBarr incoming calls from numbers not stored to mobile phone memory.TP 3.I NSBarr incoming calls from numbers not stored to SIM memory.TP 3.I NABarr incoming calls from numbers not stored in Any memory.TP 3.I ABAll Barring services (FIXME).TP 3.I AGAll outGoing barring services (FIXME).TP 3.I ACAll inComing barring services (FIXME).TP 3.I FDSIM fixed dialling memory feature (if PIN2 authentication has not beendone during the current session, PIN2 is required as <passwd>).PPNote that mobile phones may implement facility locks not documentedhere..RE.TP 7.B FLSTATPrints information about the status of facility locking in the mobilephone. For each facility a line of the form "<FLSTATn> \'facilityname\'classes" is printed. The classes may be "Voice", "Data", and/or "Fax"depending on the class for which the facility is enabled. If "unknown"is printed out this means that the TA is not able to report thestatus. If the facility is not enabled for any class, no classidentifier is printed. See .B FLCAPfor information about the available two-letter names of facilitylocks..TP 7.B FORWPrints information about call forwarding enabled in the mobilephone. For each combination of reason (UnconditionalReason,MobileBusyReason, NoReplyReason, and NotReachableReason) and class(Voice, Data, and Fax) a line of the form "<FORWn.m> reason classnumber: xxx subaddr: yyy time: zzz" is printed. The time is the number of seconds to wait before forwarding in case of NoReplyReason..TP 7.B MEPrints manufacturer, model, revision, and serial number ofthe mobile phone (ME = mobile equipment). Output lines are numbered from "<ME0>" to "<ME3>"..TP 7.B OPPrints information about the currently available mobile networkoperators. For each operator an output line of the form "<OPn> status Long name: \'xxxx\' Short name: \'yyyy\' Numeric name: zzz" is returnedwhere status may be of:.RS.TP 10.I unknownThe status of the operator is unknown..TP.I currentThis is the currently selected operator..TP.I availableThis operator is available for selection..TP.I forbiddenThis operator is not available for selection, ie. notaccessible with this SIM card..RE.TP 7.B PINPrints information about the current PIN status. The output is ofform "<PIN0> status". Where status can be one of the following lines:.RS.TP 10.I READYME is not pending for any password..TP.I SIM PINME is waiting SIM PIN to be given..TP.I SIM PUKME is waiting SIM PUK to be given..TP.I PH-SIM PINME is waiting phone-to-SIM card password to be given..TP.I PH-FSIM PINME is waiting phone-to-very first SIM card password to be given..TP.I PH-FSIM PUKME is waiting phone-to-very first SIM card unblocking password to begiven..TP.I SIM PIN2ME is waiting SIM PIN2 to be given..TP.I SIM PUK2ME is waiting SIM PUK2 to be given..TP.I PH-NET PINME is waiting network personalisation password to be given..TP.I PH-NET PUKME is waiting network personalisation unblocking password to be given..TP.I PH-NETSUB PINME is waiting network subset personalisation password to be given..RE.TP 7.B PWFacilities in the mobile phone may be protected by passwords (ie. PINs or PUKs). This option prints out lines of the form "<PWn>\'facilityname\' len" for each facility for which a facility lockpassword exists. See .B FLCAPfor information about the available two-letter names of facilitylocks..TP 7.B SCAReports the default SMS service centre address currently set in themobile phone..TP 7.B SIGPrints information about the current network signalstrength. The output is of the form "<SIG0> value". Following valuesare possible:.TP.po +7.I 0-113 dBm or less.TP.I 1-111 dBm.TP.I 2...30-109... -53 dBm (in steps of 2 dBm).TP.I 31-51 dBm or greater.TP.I 99not known or not detectable.PP.po .SH OPERATIONS.TP.BI dial\ numberDials .IR number .After dialling .B gsmctlwaits for a <CR> keypress to terminate..PP.B forw.IR mode\ reason\ number\ [\| facilityclass\| ]\ [ forwardtime ].RSChanges the call forwarding behaviour in the network. .I modecan be any of:.RS 3.I disableCall forwarding is disabled..PP.I enableCall forwarding is enabled. The call forwarding reason, number, and(optionally) forwardtime must be registered beforehand..PP.I registerThis registers the call forwarding reason, number, and forwardtime inthe network..PP.I eraseThis is the counterpart to register. It erase the call forwarding info in the network..RE.PP.I reasoncan be any of:.RS 3.I unconditionalThis applies to every call..PP.I mobilebusyThe mobile phone is busy..PP.I noreplyThe call is not answered in \fIforwardtime\fP seconds..PP.I notreachableMobile phone cannot be reached (ie. switched off)..PP.I allThis refers to all forwarding reasons..PP.I allconditionalThis refers to all conditional forward reasons .RI ( mobilebusy ,\ noreply ,\ notreachable )..RE.PP.I numberis the number the incoming call is forwarded to. See the explanationfor .I lockoperation for the meaning of .IR facilityclass .The default for .I forwardtimeis 20 seconds if omitted. .I forwardtimecan be in the range 1..30..RE.PP.TP.BI pin\ pinSets PIN code. Use.BI gsmctl\ pinto get the current pin status..PP.B lock.IR facility\ [\| facilityclass \|]\ [\| passwd \|].RS Locks the named facility. Use .BI gsmctl\ flcapto get a list of supported facilities. The .I facilityclasscan be any of:.RS 3.I allVoice, data, and fax..PP.I v\ vf\ vd\ f\ fd\ dAny combination of voice, data and fax..RE.PPThe default is \fIall\fP if \fIfacilityclass\fP is omitted. The\fIpasswd\fP is password for the facility. If no password is giventhis parameter can be omitted..RE.PP.BI setop\ opmode\ numericname.RSSets the current operator to .IR numericname . Use .BI gsmctl\ opto get a list of operators with their numeric codes. .I opmodecan be any of:.RS 3.I automatic.PP.I manual.PP.I deregisterDeregister from network..PP.I manualautomaticIf manual selection fails, automatic mode is entered..RE.RE.PP.B setpw.IR facility\ [\| oldpasswd\| ]\ [\| newpasswd\| ].RSSets the password for the facility. If one of the passwords is omitted this means that the facility has no password protection. Passwords are PIN1, PIN2, PUK etc..RE.TP.BI setsca\ service\ centre\ addressSets the default SMS service centre address..PP.B unlock.IR facility\ [\| facilityclass\| ]\ [ \|passwd\| ].RSThis is the reverse operation to \fBlock\fP. See above for adescription of the parameters..RE.SH EXAMPLESThe following invocation of .I gsmctlprints out all available status information for the mobile phoneconnected to.B /dev/mobilephone.PP.nf.IP "" 3 gsmctl all.fi.PPThe output could look like (lines edited to fit):.RS 3.PP.PD 0<ME0> Manufacturer: SIEMENS.HP<ME1> Model: S10.HP<ME2> Revision: 06.HP<ME3> Serial Number: 448058511817585.HP<OP0> Status: available Long name: 'D1-TELEKOM' Short name: '' Numeric name: 26201.HP<OP1> Status: forbidden Long name: 'D2 PRIVAT' Short name: '' Numeric name: 26202.HP<CURROP0> Long name: 'D1-TELEKOM' Short name: '' Numeric name: 26201 Mode: automatic.HP<FLSTAT0> 'CS'.HP<FLSTAT1> 'PS'.HP<FLSTAT2> 'SC' Voice Data Fax.HP<FLSTAT3> 'AO'.HP<FLSTAT4> 'OI'.HP<FLSTAT5> 'OX'.HP<FLSTAT6> 'AI'.HP<FLSTAT7> 'IR'.HP<FLCAP0> 'CS' 'PS' 'SC' 'AO' 'OI' 'OX' 'AI' 'IR' 'AB' 'AG' 'AC' .HP<PW0> 'PS' 8.HP<PW1> 'SC' 8.HP<PW2> 'AO' 4.HP<PW3> 'OI' 4.HP<PW4> 'OX' 4.HP<PW5> 'AI' 4.HP<PW6> 'IR' 4.HP<PW7> 'AB' 4.HP<PW8> 'AG' 4.HP<PW9> 'AC' 4.HP<CLIP0> on.HP<FORW0.0> UnconditionalReason Voice inactive number: subaddr: time: -1.HP<FORW0.1> UnconditionalReason Data inactive number: subaddr: time: -1.HP<FORW0.2> UnconditionalReason Fax inactive number: subaddr: time: -1.HP<FORW1.0> MobileBusyReason Voice active number: +494012345678 subaddr: time: -1.HP<FORW1.1> MobileBusyReason Data inactive number: subaddr: time: -1.HP<FORW1.2> MobileBusyReason Fax inactive number: subaddr: time: -1.HP<FORW2.0> NoReplyReason Voice active number: +494012345678 subaddr: time: 20.HP<FORW2.1> NoReplyReason Data inactive number: subaddr: time: -1.HP<FORW2.2> NoReplyReason Fax inactive number: subaddr: time: -1.HP<FORW3.0> NotReachableReason Voice active number: +494012345678 subaddr: time: -1.HP<FORW3.1> NotReachableReason Data inactive number: subaddr: time: -1.HP<FORW3.2> NotReachableReason Fax inactive number: subaddr: time: -1.HP<BATT0> 0 ME is powered by the battery.HP<BATT1> 100.HP<BITERR0> 0.HP<SIG0> 19.RE.PD.PPThe following locks the keys on the mobile phone:.nf.IP "" 3gsmctl -o lock cs.fi.PPThis changes the SIM card PIN from 1234 to 2345:.nf.IP "" 3gsmctl -o setpw sc 1234 2345.fi.PPSwitch off all call forwarding (actually erase the numbers):.nf.IP "" 3gsmctl -o forw erase all.fi.PPSwitch on call forwarding to German D1 voice box:.nf.IP "" 3gsmctl -o forw register notreachable 3313gsmctl -o forw enable notreachable.fi.PP.SH FILES.TP.B /dev/mobilephoneDefault mobile phone device..SH AUTHORPeter Hofmann <software@pxh.de>.SH BUGSReport bugs to software@pxh.de. Include a complete, self-ncontainedexample that will allow the bug to be reproduced, and say whichversion of \fIgsmctl\fP you are using..SH COPYRIGHTCopyright \(co 1999 Peter Hofmann.PP.B gsmctlis free software; you can redistribute it and/or modify it under theterms of the GNU Library General Public License as published by theFree Software Foundation; either version 2, or (at your option) anylater version..PP.B gsmctlis distributed in the hope that it will be useful, but WITHOUT ANYWARRANTY; without even the implied warranty of MERCHANTABILITY orFITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General PublicLicense for more details..PPYou should have received a copy of the GNU Library General PublicLicense along with .BR gsmctl ; see the file COPYING. If not, write to the Free Software Foundation,675 Mass Ave, Cambridge, MA 02139, USA..SH "SEE ALSO".BR gsminfo (7),.BR gsmpb (1),.BR gsmsendsms (1),.BR gsmsmsd (8),.BR gsmsmsstore (1).
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -