Sie sind auf Seite 1von 5

23/12/2015

SMSTutorial:+CMSERRORFinalResultCodeSpecifictoSMSATCommands

SMSTutorialTableof
Contents

16.2.FinalResultCodeSpecifictoSMSATCommands

SMSTutorialContentsat
aGlance
PreferencesChange
ColorScheme

Diafaan SMS Server

PreferencesDoNot
ShowAds
PreviousPage
NextPage

SMS Gateway Connection?


Test Our SMS API for Free (10 Mssg)
No Hassle, Only 1 Connection.
www.smsgateway.to

Free 30-day trial

PreferencesDonotshowads
ThefinalresultcodesOKandERRORareavailabletoallATcommands.UnlikeOKandERROR,the+CMS
ERRORfinalresultcodeisonlyavailabletoSMSATcommands.Itnotifiesyouabouttheoccurrenceofamessage
servicefailure.

16.2.1.The+CMSERRORFinalResultCodeNotifiestheOccurrencesandCausesofMessage
ServiceFailures
The+CMSERRORfinalresultcodeisreturnedwhenamessageservicefailureoccurs.Anerrorcodeisprovided
forprogrammerstocheckwhatcausesthemessageservicefailure.The+CMSERRORfinalresultcodeisspecific
toSMSATcommands,i.e.the+CMSERRORfinalresultcodewillonlybeoutputtedbyATcommandsthatare
usedtoperformtasksrelatedtoSMSmessaging.BelowaretheSMSATcommandsthatmayoutputthefinalresult
code+CMSERROR:
+CMGC(commandnameintext:SendCommand)
+CMGD(commandnameintext:DeleteMessage)
+CMGL(commandnameintext:ListMessages)
+CMGR(commandnameintext:ReadMessage)

InternationalSMSGateway
Provider

+CMGS(commandnameintext:SendingMessage)
+CMGW(commandnameintext:WriteMessagetoMemory)
+CMSS(commandnameintext:SendMessagefromStorage)
+CNMA(commandnameintext:NewMessageAcknowledgementtoME/TA)
+CNMI(commandnameintext:NewMessageIndicationstoTE)
+CPMS(commandnameintext:PreferredMessageStorage)
+CRES(commandnameintext:RestoreSettings)
+CSAS(commandnameintext:SaveSettings)
+CSMS(commandnameintext:SelectMessageService)
Thesyntaxofthe+CMSERRORfinalresultcodeis:

http://www.developershome.com/sms/resultCodes2.asp#16.2.1.1

1/5

23/12/2015

SMSTutorial:+CMSERRORFinalResultCodeSpecifictoSMSATCommands
<CR><LF>+CMSERROR:error_code<CR><LF>

JustasthefinalresultcodesOKandERROR,the+CMSERRORfinalresultcodealwaysstartsandendswitha
carriagereturncharacterandalinefeedcharacter.error_codeisanintegerthatisassociatedtoacertainerror.Alist
ofsomeerrorcodesandtheirmeaningscanbefoundin"Tableof+CMSErrorCodesandTheirMeanings".
Asmentionedearlier,aftertheexecutionofacommandline,onlyonefinalresultcodeisreturned.Hence,whenan
erroroccurs,youwillnotfindboth+CMSERRORandERRORinthecommandresponse.Forerrorsrelatedto
SMSmessaging,the+CMSERRORfinalresultcodeisreturned.Forothererrorssuchasinvalidcommandsyntax
andunsupportedATcommand,theERRORfinalresultcodeisreturnedasusual.
Belowshowssomecommoncausesof+CMSerrors:
ASIMcardisnotpresentintheGSM/GPRSmodemormobilephone.
TheSIMcardrequiresapassword(e.g.PIN,PIN2,PUKandPUK2)butyouhavenotenteredit.
AninvalidmemoryindexisassignedtoanATcommand.
ThememoryoftheGSM/GPRSmodem,mobilephoneorSIMcardforstoringSMSmessagesisfull.
TheSMSCaddressisunknownorincorrect.
Followingisanexamplethatdemonstratestheusageofthe+CMSERRORresultcode.Let'ssaythereisonlyone
SMStextmessagestoredonourNokia6021anditisstoredinthememorylocationatindex1.Ifweenterthe
commandline"AT+CMGR=11"(itmeans"toreadtheSMSmessageatmemoryindex11"),Nokia6021willreturna
+CMSerror:

AT+CMGR=11<CR>
<CR><LF>+CMSERROR:321<CR><LF>

Asmentionedearlier,whenaterminalprogramsuchasHyperTerminalofMicrosoftWindowsseesacarriagereturn
character,itmovesthecursortothebeginningofthecurrentline.Whenitseesalinefeedcharacter,itmovesthe
cursortothesamepositiononthenextline.Hence,thecommandlineyouentered,togetherwiththeresponse
returned,willbedisplayedlikethisinaterminalprogramsuchasHyperTerminalofMicrosoftWindows:

AT+CMGR=11
+CMSERROR:321

Tofindoutthemeaningofthe+CMSerrorcode321,goto"Tableof+CMSErrorCodesandTheirMeanings".From
there,weknowthatthereadmessageoperationfailedbecauseaninvalidmemoryindexwasassignedtotheAT
command+CMGR.
Notethataftertheoccurrenceofa+CMSerror,theGSM/GPRSmodemormobilephonewillnotprocessthe
remainingATcommandsinthecommandline.Thus,ifthecommandlinesenttoNokia6021is
"AT+CMGR=11+CGMI"(+CGMIistheATcommandforretrievingthemanufacturernameoftheGSM/GPRS
modemormobilephone),youwillgetthefollowingresultinWindows'HyperTerminal:

AT+CMGR=11+CGMI
+CMSERROR:321

ButifthepositionsofthetwoATcommandsinthecommandlineareexchanged,Nokia6021willoutputtheresultof
theexecutionoftheATcommand+CGMIbeforeoutputtingthe+CMSERRORresultcode.Belowistheresult
displayedinWindows'HyperTerminal:

http://www.developershome.com/sms/resultCodes2.asp#16.2.1.1

2/5

23/12/2015

SMSTutorial:+CMSERRORFinalResultCodeSpecifictoSMSATCommands

AT+CGMI+CMGR=11
Nokia
+CMSERROR:321

16.2.1.1.Tableof+CMSErrorCodesandTheirMeanings
Thefollowingtablelistssomeofthe+CMSerrorcodesandtheirmeanings.

+CMSerrorcode

300

Meaning

Mobileequipment(ME)failure.Mobileequipmentrefers
tothemobiledevicethatcommunicateswiththewireless
network.UsuallyitisamobilephoneorGSM/GPRS
modem.TheSIMcardisdefinedasaseparateentity
andisnotpartofmobileequipment.

301

SMSserviceofmobileequipment(ME)isreserved.See
+CMSerrorcode300forthemeaningofmobile
equipment.

302

TheoperationtobedonebytheATcommandisnot
allowed.

303

TheoperationtobedonebytheATcommandisnot
supported.

304

OneormoreparametervaluesassignedtotheAT
commandareinvalid.(ForPDUmode)

305

OneormoreparametervaluesassignedtotheAT
commandareinvalid.(ForTextmode)

310

ThereisnoSIMcard.

311

TheSIMcardrequiresaPINtooperate.TheAT
command+CPIN(commandnameintext:EnterPIN)
canbeusedtosendthePINtotheSIMcard.

312

TheSIMcardrequiresaPHSIMPINtooperate.The
ATcommand+CPIN(commandnameintext:Enter
PIN)canbeusedtosendthePHSIMPINtotheSIM
card.

313

SIMcardfailure.

314

TheSIMcardisbusy.

http://www.developershome.com/sms/resultCodes2.asp#16.2.1.1

3/5

23/12/2015

SMSTutorial:+CMSERRORFinalResultCodeSpecifictoSMSATCommands
315

TheSIMcardiswrong.

316

TheSIMcardrequiresaPUKtooperate.TheAT
command+CPIN(commandnameintext:EnterPIN)
canbeusedtosendthePUKtotheSIMcard.

320

Memory/messagestoragefailure.

321

Thememory/messagestorageindexassignedtotheAT
commandisinvalid.

322

Thememory/messagestorageisoutofspace.

330

TheSMScenter(SMSC)addressisunknown.

331

Nonetworkserviceisavailable.

332

Networktimeoutoccurred.

340

Thereisnoneedtosendmessageacknowledgementby
theATcommand+CNMA(commandnameintext:New
MessageAcknowledgementtoME/TA).

500

Anunknownerroroccurred.

Adsby Google

SendFreeSMS
ReceiveSMS
GSMModemSMS
Adsby Google

FreeUnlockCodes
FreeCMS
SMStoPhone
PreferencesDonotshowads

Page23of65

PreviousPage | NextPage
TableofContents

ContentsataGlance
1.IntroductiontoSMSMessaging
2.WhatMakesSMSMessagingSoSuccessfulWorldwide?
3.ExampleApplicationsofSMSMessaging
4.WhatisanSMSCenter/SMSC?
5.BasicConceptsofSMSTechnology
6.IntraoperatorSMSMessages
7.InteroperatorSMSMessages
8.InternationalSMSMessages
9.WhatisanSMSGateway?
10.HowtoSendSMSMessagesfromaComputer/PC?
11.HowtoReceiveSMSMessagesUsingaComputer/PC?
12.IntroductiontoGSM/GPRSWirelessModems
13.HowtoUseMicrosoftHyperTerminaltoSendATCommandstoaMobilePhoneorGSM/GPRSModem?
14.IntroductiontoATCommands

http://www.developershome.com/sms/resultCodes2.asp#16.2.1.1

4/5

23/12/2015

SMSTutorial:+CMSERRORFinalResultCodeSpecifictoSMSATCommands
15.GeneralSyntaxofExtendedATCommands
16.ResultCodesofATCommands
17.ATCommandOperations:Test,Set,ReadandExecution
18.TestingtheCommunicationbetweenthePCandGSM/GPRSModemorMobilePhone
19.CheckingiftheGSM/GPRSModemorMobilePhoneSupportstheUseofATCommandstoSend,Receive
andReadSMSMessages
20.OperatingMode:SMSTextModeandSMSPDUMode
21.SettingorReadingtheServiceCenterAddress/SMSCAddress(AT+CSCA)
22.PreferredMessageStorage(AT+CPMS)
23.WritingSMSMessagestoMemory/MessageStorage(AT+CMGW)
24.DeletingSMSMessagesfromMessageStorage(AT+CMGD)
25.SendingSMSMessagesfromaComputer/PCUsingATCommands(AT+CMGS,AT+CMSS)
26.ReadingSMSMessagesfromaMessageStorageAreaUsingATCommands(AT+CMGR,AT+CMGL)

PrintthisWebPage|EmailYourFriends|BacktoTop

Tmkim

FeedbackForm(Expand)
Whatdoyouthinkaboutthiswebpage?
Itisveryhelpful.
Itishelpful,butsomeinformationIwantedismissing.
Itisnothelpful.
Ithasbrokenlinks.
Ithastypos/grammaticalmistakes.
Ithasincorrectinformation.
Others

Send Reset

Home|Acknowledgements|Advertise|ContactUs/Feedback|Glossary|Preferences
20042015|CopyrightNotice|PrivacyPolicy|TermsofUse

http://www.developershome.com/sms/resultCodes2.asp#16.2.1.1

5/5

Das könnte Ihnen auch gefallen