Tutorial: How To Send and Receive SMS Using GSM Modem
Tutorial: How To Send and Receive SMS Using GSM Modem
to any PC or Embedded Controller using Serial Port and any of your favourite programing language (C,C#,Basic,Pascal) Enfora !SM Modem provide a standard "PI set for communicating #it$ Modem and setup for send and receive SMS %o understand and try out t$e varioius "% Command to send and receive SMS so t$at you can incorporate t$ese into your o#n soft#are pro&ect you #ill need a serial port ('I()P $as built in $yperterminal or else for vista you can do#nload t$ird party serial terminal program from #eb) PC t$at does not $ave any serial Commport can buy standard off t$e s$elves *SB to serial converter from any computer perip$eral s$ops (suc$ as "%E( *C+,-,") Equipment Needed " PC #it$ serial comm Port (or a *SB to Serial "daptor) " Serial %erminal Program (in t$is case, #e $ad c$osen to use t$e free .ypterminal t$at is present on 'I(/01'I()P) Setting Up Hypterminal 2) 3un Start +4 "ll Program +4 "ccessories +4 Communication +4 .ypterminal ,) In a dialog Bo0, it as5 for a connection name 6ust type a description (for e0ample %2278) Select a Comport #$ere t$e C9M0 is t$e communication port t$at t$e Enfora !SM Modem is p$yscically conneted to Clic5 98
! (e0t in t$e configure button, clic5 on it to set up t$e comport property Set up t$e C9Mport for 227 ,8bps, : ;atabit, (o Parity, 2 stop bit and (on <lo# Control (or .ard#are <lo# Control) "pply and Save Pls note t$at if you install a *SB to serial ComPort "daptor, typically t$e C9MP93% #ill be in a different C9M0 (umber Ma5e sure t$at you select t$e correct C9M0 (umber, and also ensure t$e *SB to Serial Port "aptor is al#ays connected to t$e same comport t$at you installed t$e driver initially
"! (o# clic5 on t$e icon to connect t$e ComPort by using t$e Connect
$0o%3(4 Sets reply pat, user data $eader, status report reCuest, validity period format, re&ect duplicates and message type $vp%3(64 Sets validity period $pid%3* .ig$er layer protocol indicator $dcs%3* Information encode format &' Modem 3esponse D) "fter initiali>ing t$e module #it$ t$e proper SMS mode, Cuery t$e module for t$e correct service center %$e service center is reCuired fro proper routing of an SMS t$roug$ t$e net#or5 %$e service center is programmed into t$e SIM by t$e net#or5 service provider %$e follo#ing command Cueries t$e service center #T1/S/#7 Euery service center 1/S/#: 81(9*6 ( ***"8 Modem 3esponse (FoiceStream G *S") H) If no service center is entered, t$en contact your service provider for correct service center %o enter t$e correct service center, enter t$e follo#ing command? #T1/S/#381(9*6 ( ***"8 Sets t$e service center (FoiceStream G *S") &' Modem 3esponse :) %$e follo#ing command selects %E)% mode for SMS messages #T1/MG:3( Set message format to %E)% mode &' Modem 3esponse /) %$e follo#ing command sets t$e indicators for receiving an SMS message #T1/NMI3(5(5*5*5* Set t$e ne# message indicators "%@C(MIABmode4,Bmt4,Bbm4,Bds4,Bbfr4 $mode%3( discard unsolicited result codes indication #$en %" G %E lin5 is reserved $mt%3( SMS+;EIIFE3s are delivered to t$e SIM and routed using unsolicited code $-m%3* no CBM indications are routed to t$e %E $ds%3* no SMS+S%"%*S+3EP93%s are routed $-0r%3* %" buffer of unsolicited result codes defined #it$in t$is command is flus$ed to t$e %E &' Modem 3esponse
2J) %$e follo#ing command saves t$e SMS settings 9nce t$e SMS commands $ave been saved, t$e initiali>ation commands do not need to be sent again until t$ey are c$anged #T1/S#S Save SMS settings %$is may ta5e up to 2J seconds &' Modem 3esponse 22) <or more advanced SMS options, see t$e GSM0107AT001 Enfora Enabler IIG AT Command Set for t$e follo#ing "% commands? #T1/S/S C$aracter set #T1/SMS Select message service #T1/2MS Preferred storage #T1/S;H S$o# te0t mode parameters 2,) "fter t$e Enfora Enabler+! module $as been initiali>ed, t$e follo#ing commands demonstrate t$e transmission of an SMS message to a !SM mobile number #T1/MGS38(9*(4+4964 8 Send a message to t$e telep$one number % 3eady to enter a message
T<is is a test message=> Enter
1/MGS: ( Successful transmission %$e number #ill increment #it$ eac$ SMS sent &' Modem 3esponse 2-) <or an incoming SMS #it$ t$e above initiali>ation settings, t$e follo#ing indication #ill be displayed over t$e serial port? 1/MTI: 8SM85( Incoming message indication stored in message location 2 GSM0000AN004 Page 3 2=) %o read t$e above message, enter t$e follo#ing? #T1/MGR3( 3ead SMS message in SIM location 2 1/MGR: (58RE/ RE#;858(9("+++(9(98558*9?*@?*(5(":9":"(1*@85 ("+5"5*5*58(9*6 ( ***"85("+5+
T<is is a test message
&' Modem response See GSM0107AT001 Enfora Enabler IIG AT Command Set for parameter details 27) %o store an SMS message on t$e SIM for later retrieval, enter t$e follo#ing? #T1/MGA38(9*(4+4964 8 Store a message on t$e SIM
1/MGA: 9 Successfully stored in memory location , &' Modem 3esponse 2D) %o send a message previously stored on t$e SIM, enter t$e follo#ing? #T1/MSS39 Send message from memory location , 1/MSS:9 Successful transmission %$e number #ill increment #it$ eac$ SMS sent &' Modem 3esponse 2H) %o list all of t$e messages stored on t$e SIM, enter t$e follo#ing? #T1/MGB38#BB8 Iist messages on t$e SIM 1/MGB: (58RE/ UNRE#;858(9("+++(9(98558*9?*@?*(5(":9":"(1*@85("+5+ T<is is a test message 1/MGB: 958ST& SENT858(4(C9 966*98555(9C599 T<is is a stored message &' Modem response See Enfora Enabler IIG AT Command Set for parameter details 2:) %$e follo#ing command deletes a message from t$e SIM location specified #T1/MG;3( ;elete SMS message in SIM location 2 &' Modem response upon successful delete