+CMS ERROR: 304, sending message using at command

20,573

Solution 1

Try by chaning PDU mode. Use the following command:

AT + CMGF = 1 

If you are trying to Send SMS try AT + CMGF = 1 first and then again AT+CMGS="NUMBER" and hope after typing the message on > prompt, you are using CTRL+Z key combination to send SMS.

Solution 2

Instead of hitting ENTER after placing the PDU, use CTRL-Z to send message.

credits to @user2543882

Share:
20,573
kudarap
Author by

kudarap

Updated on July 09, 2022

Comments

  • kudarap
    kudarap almost 2 years

    Im new to GSM and AT command sets,

    based on the error +CMS ERROR: 304 its a Invalid PDU mode parameter according to activexperts

    Im trying to send message using AT command to GSM modem in PDU mode

    AT+CMGF=0
    OK
    
    AT+CMGS=31
    > 079136190700203911000C913639350768260000AA13C834A89D07B9C3ED32283D0751C3F3F41B
    
    +CMS ERROR: 304        
    

    Can you help me guys what did I missed or mistake? I used this to encode the PDU

    Thanks guys.

  • kudarap
    kudarap almost 9 years
    Thanks mate for giving me a clue that I didn't <CTRL+Z>