Diverting sms messages


#1

I’m programming a small software for Wavecom fastrack M1306B GSM-modem and i’m trying to make the modem forward text messages to a specific number, no matter how many messages the modem receives or when it receives them.

The main problem is that the modem sends error messages (+CMS ERROR: 515 or +CMS ERROR: 512) when sending more than two messages simultaneously or with short intervals. For example, if i send 5 messages to the modem one after the other or simultaneosly, only 4 or less messages are forwarded. The forwarding-function has been programmed like this:

  • When a message arrives, GSM-modem sends a result code to PC
  • The software notifys it, and sends an AT-command to the modem to send the message from previously stored location to a specific number
  • The modem sends the message, and gives a result code to the PC if the sending fails or succees.
  • The result code is error if the modem receives a new message and sends an old message at the same time, or if the modem sends a result code to PC and is received AT-command from PC at the same time.

So is it possible at all to make the modem divert messages? How can i do it properly?


#2

If you want to send several SMS messages in a short time, then you have to keep the radio link opened using the AT+CMMS command.
If you don’t use the AT+CMMS command (“MMS” here stands for More Messages to Send), then the radio link is closed after each SMS message. This is why you have a +CMS ERROR: 515 (or 512) when trying to send a SMS message while the radio link is closing.

See the AT Commands Interface Guide for more details about AT+CMMS command.