SMS with CMS ERROR 38

10 thoughts on “SMS with CMS ERROR 38

  1. Hello,

    i use the HE 910 to send an email from our device with a log file. That works fine. Just our customer want send SMS.

    I see the documentation and include some AT commands in my code. The following code was implementeded after CREG. In all situations the module is successfully registrated in the network.

    Code:

               
            if (GSMSetSomething((uint8_t*)”AT#SMSMODE=1rn”,tempfield,500)!=GSMOk) return GSMFail;
    Answer –> OK        
                 
            if (GSMSetSomething((uint8_t*)”AT+CSMP=17,167,0,0rn”,tempfield,500)!=GSMOk) return GSMFail;
    Answer –> OK        
             
            if (GSMSetSomething((uint8_t*)”AT+CSCA?rn”,tempfield,500)!=GSMOk) return GSMFail;
    Answer –> OK  “+34609092815”,145       
             
            if (GSMSetSomething((uint8_t*)”AT+CMGF=1rn”,tempfield,500)!=GSMOk) return GSMFail;
    Answer –> OK        
         
            if (GSMSetSomething((uint8_t*)”AT+CNMI=1,1,0,0,0rn”,tempfield,500)!=GSMOk) return GSMFail;
    Answer –> OK
                  
            if (GSMSetSomething((uint8_t*)”AT+CSASrn”,tempfield,500)!=GSMOk) return GSMFail;

    Answer –> OK
            

            sprintf((char*)tempfield,”AT+CMGS=”+491738227381″rn”);
             if (FlowControlSendString(tempfield,25)!=GSMOk) return GSMFail;   

    After AT+CMGS i wait for the char  “>”  (I get the char). Then, after I get “>”, I send with 2 milliseconds delay my message text (“Hallo Welt”). I get the Error: CMS ERROR 38.

    What is wrong?

    Thanks you for your answer.

    Eric

    1. You should wait for <greater_than><space> sequence not <greater_than>, also maybe a longer delay after will help (but the error code is indeed weird). Also AT commands must be terminated with a single termination character which is ‘r’ by default (<CR>).

      Try these and let me know.

      1. Hello,

        sorry the text interpreter has some error.  All “” are erased.

        I closed the AT Commands with rn. I have correct this into r. Now I wait for “> “. I get the same error.

        I have have changed my m2mAir SIM into a SIM from Vodafone. Its the same problem (Email works fine with both SIMs).

                if (GSMSetSomething((uint8_t*)”AT#SMSMODE=1r”,tempfield,500)!=GSMOk) return GSMFail;
        Answer –> OK        
                     
                if (GSMSetSomething((uint8_t*)”AT+CSMP=17,167,0,0r”,tempfield,500)!=GSMOk) return GSMFail;
        Answer –> OK        
                 
                if (GSMSetSomething((uint8_t*)”AT+CSCA?r”,tempfield,500)!=GSMOk) return GSMFail;
        Answer –> OK  “+34609092815”,145       
                 
                if (GSMSetSomething((uint8_t*)”AT+CMGF=1r”,tempfield,500)!=GSMOk) return GSMFail;
        Answer –> OK        
             
                if (GSMSetSomething((uint8_t*)”AT+CNMI=1,1,0,0,0r”,tempfield,500)!=GSMOk) return GSMFail;
        Answer –> OK
                      
                if (GSMSetSomething((uint8_t*)”AT+CSASr”,tempfield,500)!=GSMOk) return GSMFail;

        Answer –> OK
                

                sprintf((char*)tempfield,”AT+CMGS=”+491738227381″r”);
                 if (FlowControlSendString(tempfield,25)!=GSMOk) return GSMFail;   

        Wait for “> “, after that I send the Text –> CMS ERROR 38 (after 10 second timeout)

        I hope you have a further answer.

        Eric

          1. No it isnt the same number (I have forgot to change the answer), but the m2mAir and the vodafone SIM are only for data transmission ;-). It cant work. I placed my private SIM into the device and it works fine.

            Thank you for your help.

          2. So indeed the error message is legitimated.

            38 – “Network out of order”
            This cause indicates that the network is not functioning correctly and that the condition is likely to last a relatively long period of time; e.g., immediately reattempting the short message transfer is not likely to be successful.

  2. CSCA problem,

    i send AT command AT+CSCA with incorrect number and i need to delete this number to keep automatic mode.

    how to do this ?

    thx

    1. If you didn’t save it in SIM profile with AT+CSAS you can restore it with AT+CRES. Or simply find the mobile network operator SCA number and use it.

  3. Dear

    while sending SMS from 2G modem , I’m always getting CMS error 69 (Requested facility not implemented)

    Kindly tell mwe how to fix this issue .

    when I tried with other sim card , all things are working fine.

    Thanks in advance