**>From: "JML" <[EMAIL PROTECTED]>
**>To: <[email protected]>
**>Subject: Can't send more than 9 sms ! Help !!!
**>Date: Sun, 20 Feb 2005 14:51:37 +0100
**>
**>Hi !
**>Using kannel 1.4.0, with wavecom modems, on mandrake 10.1.
**>We use a http interface for sending sms.
**>Everything is ok with a one by one SMS( sending, receiving, Mysql DLR's,
**>etc.)
**>
**>But as soon as we try more ( as few as 30!) we get errors : Here is the
**>debug : 
**>[...] 

  [ ... lines deleted ... ]

**>What's going wrong ???
**>Please heeeeeellllllp !!

Think about what is going on in the modem.  You are not only asking
the modem to send the SMS, but also to receive any DLRs coming from
the Operator at the same time.

What is most likely happening is that the bearerbox's sending out
of SMS is being interrupted by the unsolicited notifications caused
by reception of the DLR from the operator.

Here is how the bearerbox sends an SMS through the GSM modem:
  - When the bearerbox tries to send out an SMS, it issues an
    AT+CMGS command to the modem.
  - The bearerbox expects an '>' symbol to indicate the modem is ready
    to receive the hexadecimal representation of PDU.
  - The bearerbox sends the hexadecimal representation of the PDU and
    then a ^Z (ASCII character 0x1A) to indicate it is done with
    the PDU.
  - The bearerbox expects the GSM modem to respond back with:
      +CMGS: ##
    where ## is a number representing the current outgoing SMS count.

At any time the above sequence is interrupted (for example by
a reception of a DLR), then the bearerbox assumes the sending of the
SMS failed and will retry to submit the scenario specified about again
(up to 2 addition attempts).

When the DLR is sent by the Operator, the GSM modem will receive it
and interrupt anything currently happening and issue an unsolicited
notification (in this case a +CMT or +CMTI) to indicate it received
something from the operator.  This DLR can and does interfer with the
bearerbox's expected send/response sequence.

The only thing to do would be to:
  - Not request the DLR
  - Not send SMS until you received the DLR from the previous sent SMS
  - Send out the SMS but set the deferred delivery option so that you
    can send out all the SMS first and then get the DLR afterwards.
  - Re-write the AT driver to have a more robust state machine.

See ya...

d.c.

Reply via email to