Re: Patch for unknown error while sending SMS with smsc_at

Stipe Tolj <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization The Kannel Group
Message-ID <[email protected]>
Ulrich Petri wrote:

> Hi Everybody,
> 
> on the ML i read several reports from users who had problems with unkown 
> erros during sending sms using the AT smsc.
> 
> Usually those messages looked like:
> 2005-09-10 16:35:55 [28941] [6] DEBUG: AT2[/dev/ttyS0]: 
> TP-Validity-Period: 24.0 hours
> 2005-09-10 16:35:55 [28941] [6] DEBUG: AT2[/dev/ttyS0]: --> AT+CMGS=18^M
> 2005-09-10 16:35:55 [28941] [6] DEBUG: AT2[/dev/ttyS0]: <-- >
> 2005-09-10 16:35:55 [28941] [6] DEBUG: AT2[/dev/ttyS0]: send command 
> status: 1
> 2005-09-10 16:35:55 [28941] [6] DEBUG: AT2[/dev/ttyS0]: --> 
> 0011000B811017077731F40000A704F4F29C0E
> 2005-09-10 16:35:55 [28941] [6] DEBUG: AT2[/dev/ttyS0]: --> ^Z
> 2005-09-10 16:36:00 [28941] [6] DEBUG: AT2[/dev/ttyS0]: <-- >
> 2005-09-10 16:56:00 [28941] [6] DEBUG: AT2[/dev/ttyS0]: <-- ERROR
> 
> I tried using kannel for a new project in our company and was facing the 
> same problem. (Using Various Nokia GSM Phones (6210, 6310, 6230, 6100) 
> which all exposed this problem.)
> In manual tests (e.g. using minicom) the problem also occured if i 
> pasted the whole PDU at once into the terminal. But once i entered it 
> manualy everything worked as suppoed. After a lot of try&error i found 
> that all the phones i was using seem to have problems if more than 18 
> bytes of PDU are written at once (in fact if you turn echo on you can 
> see that they simply ignore the remainder).
> 
> So i hacked up a little patch that chops the PDU code into 18 byte 
> chunks and sends them one at a time with a 10 ms sleep in between.
> Now it works like a charm :)
> 
> Perhaps someone more proficient in C would like to polish that patch a 
> bit, but at least it works for me now.

ok, +1 for the patch. I commited this in a variation to endorse only the chunked 
handling for modem id types of 'nokiaphone'.

Ulrich, please update against CVS HEAD and retry to see if this still works for 
your cases. Thanks a lot.

ChangeLog entry:

2005-09-14  Stipe Tolj  <[email protected]>
    * gw/smsc/smsc_at.c: fixing a bug for 'nokiaphone' GSM modem types, where
      PDUs longer then 18 bytes get truncated by the device if passed too fast.
      We pass the PDU now in 18 byte chunks and delay to smoothly allow the
      device to parse this. This is know for the Nokia phone GSM types.
      Thanks to Ulrich Petri <[email protected]> for the fix and patch.
      [Msg-Id: <[email protected]>]


Stipe

mailto:stolj_{at}_wapme-group.de
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
-------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.