Sie sind auf Seite 1von 12

Introduction to SMS using a PC

By William Sengdara

Prerequisites
YoumusthaveamobilemodeminstalledonthecomputeroraCellularphonethatallowsitbe connectedtoaPC.Installtheappropriatedevicesbeforeproceeding.Mostmobilemodemsaresold inordertoallowonetoaccesstheinternet.Suchdevicesareeasytouseinthistest,unlikecellular phones. ExamplesofmobilemodemsthatareeasiesttouseareHuaweiE220etc Alwaysexitwhateverapplicationiscurrentlyusingthemobilemodemorcellularphonebefore proceeding.Thismayincludenetworkconnection,onboardnetworkmanagementsoftware.

Notes
PleasenotethatthisdocumentwaswrittenundertheMicrosoftWindowsXPenvironment.

1. OpentheHyperterminalprogrambylocatingitontheStartMenuasshownabove

2. Theprogramwillstartandpromptyoutospecifyaconnection.

3. ItypedTestingfortheconnectionname 4. Leavethisdialogalonefornow.WeneedtolocatethedevicewewillbeusingintheDevice Manager. 5. OpentheDeviceManagerbyrightclickingMyComputerontheStartMenu>Properties

6. ClickDeviceManager

7. LocatethedeviceyouwillbeusingundertheModemscategory

8. RightclickthemodemandopenthePropertiesdialoginordertofindouttheCOMportthe deviceisconnectedon. 9. NowthatweknowtheCOMport,letusgobacktotheHyperterminalwindow.

10. WeselecttheCOMportapplicabletoourdevice.Wedontneedtofillinanythingfurther.

11. TheCOMpropertiesdialogwillopen,justclickOKtoapplythedefaults.

I2.Ifsuccessfullyconnectedtothedevice,thedialogwindowwillbereadyforustoenterAT commands.

13. ThefirstcommandtoenterisATEfollowedbyENTER. 14. YouwillnormallyreceiveanOKtoindicatethatthecommandhassucceeded. 15. Thenextcommandwillindicatetothedevicethatwewillbeusingtextcommands(Text Mode),asopposedtonumericcommands(PDUMode).Enterthiscommand: AT+CMGF=1followedbyENTER. 16. YouwillnormallyreceiveanOKtoindicatethatthecommandhassucceeded. WecancomposeanSMSbyusingthetheAT+CMGScommand.Addthenumbertosendthe messageto,insidethedoublequotes,e.g.: AT+CMGS==2648121087882followedbyENTER. ThiscommanddoesnotgiveOKback,instead,itgivesa>signtoindicatethatyoumustnowenter sometext.Enteramessagewhichisnotgreaterthan160charactersinlength,followedbyCTRLZ.

TheresponsewillbethemessageIDandOKasshownbelow.

Inthisexample,IwouldliketoviewthenormalSMSPDUthathasbeenreceived.SoIputthemode intoPDU. AT+CMGF=0followedbyENTER ThenIviewedalistofallthemessagesreceivedbytypingthelistcommandforPDUMode: AT+CMGL=4followedbyENTER

Ascanbeseen,wecannotreadthemessageasitisinrawPDUmode.Wefirstneedtodecodeitby usingthestandardalgorithm. 079162841109207004038131F100001170311145324091D9775D0E1287D961F7B80C4ACF41B3982B 7663C96020B3BC5C064D9B5316CC058381CCF27219D47EBBCB791608E682C1406679B90C2287E96 116080632CBCB65D0BC3C7EBBC97317336D2ED3D3ED32283C1E97E773D0BC2E5697C77450183446 87E5E77258CC2E83C66136FB356D4E41E2B2F92D2F8362B1560CD692C16231

SothePDUaboveiseasilydecodedtothemessagebelow: SMSC#:264811900207 Mobile:131 Datetime:07/13/201111:54:23 Message:Yourbalanceis31.17,20freeSMS,0.00freemoney,0.00freedata,0freeseconds.Lifetime accesssubjectachargeablecall/SMSbefore11102011

FurtherReading
PleasenotethatallalotmoreneedstobeunderstoodinorderforonetoreliablyworkwithSMS. SomeofthethingstobenotedisSIMPINsecurity,NetworkinformationandregistrationoftheSIM card,thelocationtoread/writemessagestoandfromandmoreimportantlytheATCommandset. Youcanfindmoreinformationinmanualsontheinternetandevenbylookingatthesourcecodeof OpenSourcesoftwarepackageslikeKannelandMbuni.

Das könnte Ihnen auch gefallen