BG95M3 error sending SMS


I am having an issue with modem BG95M3 to send SMS. Problem is I get a +CMS ERROR:500.

TxGsm: AT+CPIN? 

RxGsm: OK

RxGsm: +CEREG: 0,4

RxGsm: OK

TxGsm: AT+CREG? 
RxGsm: +CREG: 0,1

RxGsm: OK

RxGsm: +CGREG: 0,1

RxGsm: OK

TxGsm: AT+COPS? 
RxGsm: +COPS: 0,2,"21407",0

RxGsm: OK

TxGsm: AT+CSQ 
RxGsm: +CSQ: 24,99

TxGsm: AT+CMGS=111 
RxGsm: >
TxGsm: 00110405812328F60000AA725079799E7EBB4165375D1E26877B307158DE5040E5E579FAED06CDC3EC3439DC8389C3F286022A2FCFD36F37A8E8A683A4E530BB071387E50D05545E9EA7DF6ED034CC0649CB61760F260ECB1B8AE693F8041193C11EACA1683514C434BC4E0F8FD36FF7
RxGsm: +CMS ERROR: 500

I have tried several things like changing AT+CGSMS to 2 wich improved the situation, but still in some cases I am getting the +CMS ERROR: 500.

Carrier is Movistar from Spain.

Any idea?



I would really appreciate help from Quectel support.



Your PDU begins 001104 where “04” is the message reference number.

Normally, you’d always set this field to “00”, and this would allow the last sent reference number to be read from the SIM and incremented by 1 automatically.

Might this be causing a problem?

Is the modem verified as being in PDU mode prior to the sending attempt?


1 Like

Hi snowgum, thank you very much for for help. I will try setting the reference number to 0.

Yes, the modem is set in PDU mode.

Hi again, just to confirm that the suggestion from snowgun apparently have solved the problem.



Hello, unfortunatelly the problem appeared again.

I did change the pdu frame to set the message reference at “00”. Modem is registered in 2G, carrier is movistar Spain, and the command sequence is the same as shown in my firts post.

It seems quite random, some times the command returns OK, and in other ocasion it fails with +CMS ERROR: 500. Interestingly even when the command returns error 500 the SMS is sent.


Are you able to test the PDU itself, by trying to send exactly the same PDU again?

If it’s not the submitted PDU causing the error, it’s some interaction between the modem and the network.

Thanks snowgum. Yes I can confirm the same PDU works with other modems and even with this same modem, carrier and SIM CARD when registered on LTE-M.


Well, I did some more tests and it also fails when registered on LTE-M. Although the PDU I am sure is correct.

There is some intriguing note on the manual that says:
After the execution of Read Command, a delay of 5-10 s is required before issuing the Write Command.
Otherwise +CMS ERROR: 500 may appear.
I have tried a 10s delay just before issuing the AT+CMGS command and it makes no change.


I’ve found that note about the delay in other Quectel manuals also, including for devices like the EM06-E, EM12-G and RM500Q-AE that I use regularly.

But I’ve always got the message reference number returned rather than an “ERROR: 500”. My sent SMSs are always in PDU-mode.

I rely on that message reference number to indicate successful sending. If this was happening to others, I would know about it, as I developed and maintain SMS software which is in use on a great many modems internationally (the ROOter project).

I’ve only found that quote made in relation to the +CMMS command, implying the delay needs to happen between AT+CMMS? and AT+CMMS=n (for some value of n).

Is it only a BG95 modem that’s having this issue?

Thanks again snowgan. Yes, this +CMS ERROR: 500 only happens with the BG95. This same PDU works perfectly with modems from Cinterion, uBlox, and even the EG91 from Quectel.

I think it’s almost certain you’ve discovered a BG95 firmware bug. In the early days of the EM12-G there was a bug that I reported and was soon fixed.

That one resulted in lost incoming SMSs.