machtudong / asterisk-chan-dongle

Automatically exported from code.google.com/p/asterisk-chan-dongle
Other
0 stars 0 forks source link

Error parsing incoming message #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Get error 
[Jul  2 16:46:48] WARNING[470]: at_response.c:1204 at_response_cmgr: [dongle0] 
Error parsing incoming message '+CMGR: 0,,149
07919730071111F10414D0D9B09B5CC637DFEE721E0008117020616444617E041A043E0434002004
3F043E04340442043204350440043604340435043D0438044F003A00200036003900320037002E00
20041D0438043A043E043C04430020043D043500200441043E043E04310449043004390442043500
2C002004320432043504340438044204350020043D0430002004410430043904420435002E' at 
possition 49: Can't parse OA

But can parse  using this site 
http://twit88.com/home/utility/sms-pdu-encode-decode
You can find java script code in attachements

> dongle show version
chan_dongle: Huawei 3G Dongle Channel Driver, Version 1.1, Revision 7
Project Home: http://code.google.com/p/asterisk-chan-dongle
Bug Reporting: http://code.google.com/p/asterisk-chan-dongle/issues/list

PS I already use code in sms :))

Original issue reported on code.google.com by asmys...@gmail.com on 2 Jul 2011 at 1:07

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by bg_...@mail.ru on 6 Jul 2011 at 3:03

GoogleCodeExporter commented 9 years ago
message has OA TOA field = 0xD0 

error in pdu_parse_number() 

Original comment by bg_...@mail.ru on 6 Jul 2011 at 3:19

GoogleCodeExporter commented 9 years ago

Original comment by bg_...@mail.ru on 9 Jul 2011 at 10:29

GoogleCodeExporter commented 9 years ago
Hi!

Any update on this bug?

Thank you!

Original comment by adyd...@gmail.com on 15 Sep 2011 at 11:28

GoogleCodeExporter commented 9 years ago
Issue 42 has been merged into this issue.

Original comment by pag...@gmail.com on 4 Nov 2011 at 5:03

GoogleCodeExporter commented 9 years ago

Original comment by pag...@gmail.com on 4 Nov 2011 at 5:06

GoogleCodeExporter commented 9 years ago
TYPE OF NR. :   Alpha (acc. to TS 03.38)

Original comment by foundans...@gmail.com on 14 Nov 2011 at 1:58

GoogleCodeExporter commented 9 years ago
Anything new here. I also have this bug.

Original comment by goo...@mail.ericdorr.de on 13 Oct 2012 at 11:42

GoogleCodeExporter commented 9 years ago
I am also getting same error. Any news about this bug?

Original comment by dejan.kr...@gmail.com on 23 Mar 2013 at 9:38

GoogleCodeExporter commented 9 years ago
[May 15 16:17:06] WARNING[8201]: at_response.c:1204 at_response_cmgr: [dongle0] 
Error parsing incoming message '+CMGR: 0,,... ' at possition 36: Can't parse OA
[May 15 16:18:28] WARNING[6596]: at_response.c:1204 at_response_cmgr: [dongle0] 
Error parsing incoming message '+CMGR: 0,,...' at possition 38: Can't parse OA
[May 15 16:18:40] WARNING[6591]: at_response.c:1204 at_response_cmgr: [dongle0] 
Error parsing incoming message '+CMGR: 0,,...' at possition 48: Can't parse OA
....
please some one , little help, point direction

Original comment by hu8...@gmail.com on 16 May 2013 at 6:46

GoogleCodeExporter commented 9 years ago
Hi, this happens because Chan dongle doesn't have support dor alphabetical 
addresses (eg TS 03.38), and the type of address descriptor in the pdu is 
probably D0 .
if you still want to get the rest of the message   just modify pdu.c
from this:
                   digit = pdu_code2digit(pdu[0][1]);
                                if(digit <= 0)
                                        return -1;
                                *number++ = digit;
                                digit = pdu_code2digit(pdu[0][0]);
                                if(digit < 0 || (digit == 0 && (syms != 2 || (digits & 0x1) == 0)) || (digit!=16))
                                        return -1;
                                *number++ = digit;
to this:
 digit = pdu_code2digit(pdu[0][1]);
                             /*   if(digit <= 0)
                                        return -1;*/
                                *number++ = digit;
                                digit = pdu_code2digit(pdu[0][0]);
                               /* if(digit < 0 || (digit == 0 && (syms != 2 || (digits & 0x1) == 0)) || (digit!=16))
                                        return -1;*/
                                *number++ = digit;

This is just commenting those if and increasing the pointer to force the 
parsing of the rest of the message.
compile, unload->load chan dongle in asterisk and try it.
This is not really a solution but at least it is a workaround.

p.d i'm attaching my chan_dongle.so (compiled for debian lenny and tested with 
asterisk 1.8.3.3)  to save you the trouble, it also contains a fix to be able 
to send messages to short codes (eg message to 2266 to subscribe by sms to a 
service // https://code.google.com/p/asterisk-chan-dongle/issues/detail?id=21 ) 
and also additional dongle models in pdiscovery.c that i have tested

pdiscovery.c:   { 0x12d1, 0x1001, { 2, 1, /* 0 */ } },      /* E1550 and generic */
pdiscovery.c:   { 0x12d1, 0x1465, { 2, 1, /* 0 */ } },      /* K3520 */
pdiscovery.c:   { 0x12d1, 0x140c, { 3, 2, /* 0 */ } },      /* E17xx */
pdiscovery.c:   { 0x12d1, 0x1436, { 4, 3, /* 0 */ } },      /* E1750 */
pdiscovery.c:   { 0x12d1, 0x1506, { 1, 2, /* 0 */ } },      /* E171  */

Regards.

Original comment by murodefu...@gmail.com on 6 Jul 2013 at 6:30

Attachments:

GoogleCodeExporter commented 9 years ago
Hi everybody.
I propose attached patch as a solution to this problem. With it, chan_dongle 
can decode alphanumeric TP-OA and some other types of TP-PID.
I also attached some cases, which I used for testing.

Original comment by oioki.ta...@gmail.com on 24 Jul 2013 at 3:59

Attachments:

GoogleCodeExporter commented 9 years ago
good work, patch works for me. Can you add this patch in the main version of 
chan-dongle?

Original comment by petr.no...@gmail.com on 5 Aug 2013 at 12:57

GoogleCodeExporter commented 9 years ago
Hi, I also applyed this patch, but still don't work.

here is my error:

[Aug  7 15:12:42] WARNING[13044] at_response.c: [dongle0] Error parsing 
incoming message '+CMGR: 0,,86
069183950805F1040691839577340031807051210280505479D95DA7BBDF207718240F8FEBEE3A28
DD0ECF41B51BCB0603ADDD2E9035CC5687DDEF391D44B7BFCF20F1DB2D7EBB4162F95B1D06A5E7F4
F4B80C92DD5CB09C4B068BCD5C' at possition 42: Unhandled PID value, only SMS 
supported

is this related to this bug?

Best regards, 
Franjo

Original comment by ffr...@gmail.com on 7 Aug 2013 at 1:25

GoogleCodeExporter commented 9 years ago
Is possible to view original PDU message in dialpaln, so I can use custom 
(external) PDU decoder?

Original comment by ffr...@gmail.com on 13 Aug 2013 at 7:40

GoogleCodeExporter commented 9 years ago
THANKS   this is good patch also working for me
i have applied patch to this version
chan_dongle: Huawei 3G Dongle Channel Driver, Version 1.1, Revision 14

very good  thanks for patch

is it possible to send sms message   with special characters  like  (,) or (@) 
or others  can anyone help  me  ????????????????????

Original comment by shabbira...@gmail.com on 14 Dec 2013 at 4:31

GoogleCodeExporter commented 9 years ago
Glad I found this forum, I have same problem.

My Problem is also that the from address contains alfabetical characters: like 
this
#Mabcda>14:11 UITGESCH 01 Rick

[2013-12-16 08:50:00] WARNING[3002]: at_response.c:1207 at_response_cmgr: 
[dongle0] Error parsing incoming message '+CMGR: 0,,41
07911356131313F60400803900312161809475401FA3E6DB4D9FB7C33E184E57B38188C522139474
8240B018485A769701' at possition 34: Can't parse length of OA

So I think you found a solution/patch, please can you let me know how to apply 
it.
Which commands to make the patch work, please ?

Can it also deal with # and > ?

thanks a lot!

Original comment by r...@montsma.com on 16 Dec 2013 at 3:15

GoogleCodeExporter commented 9 years ago
i have applied this patch this way 
1.    download patch 
2.go to source off patch  for example i have source chan_dongle  in 
  /usr/src/chan_dongle-1.1.r14

cd /usr/src/chan_dongle-1.1.r14

i have downloaded this patch in Downloads folder
patch  <  /root/Downloads/chan-dongle-alphanumeric-pdu.patch

3. make
4. make install
5.  asterisk  -r
6.  core restart now 
   and u have done

Original comment by shabbira...@gmail.com on 16 Dec 2013 at 4:09

GoogleCodeExporter commented 9 years ago
Thanks so much.
It was precompiled, so I could not so it, but now I get help from here:

https://sourceforge.net/p/raspbx/discussion/bugreports/thread/e721a550/

Original comment by r...@montsma.com on 17 Dec 2013 at 10:49

GoogleCodeExporter commented 9 years ago
hi sorry to bother but this patch chan-dongle-alphanumeric-pdu.patch still not 
working on Number that didnot in International Format. Something like 99999

but on Sender As Letters, itw worked. such as "INDOSAT".

Original comment by assegaf....@gmail.com on 22 Mar 2014 at 7:03

GoogleCodeExporter commented 9 years ago
I think because the OA field is empty, I have same problem :
WARNING[4425]: at_response.c:1207 at_response_cmgr: [dongle1] Error parsing 
incoming message '+CMGR: 0,,43
07911356131313F6040080390041400280641180222358CC56C3C960B219CC07C3E968345035493D
16A7432408160349CBEE32' at possition 34: Can't parse length of OA

Can someone smart adjust the code and let us know, please?

Original comment by r...@montsma.com on 20 Apr 2014 at 7:06

GoogleCodeExporter commented 9 years ago
It's been a while. Any progress with this kind of issue? My error is:

WARNING[3592]: at_response.c:1207 at_response_cmgr: [dongle0] Error parsing 
incoming message '+CMGR: 0,,43
07915389080003F124068171002600F1511050127063801ED9775D0E8287E7F3FB5B4E0681463119
4E064ACF41301CAC269B01' at possition 44: Unsupported DCS value

Original comment by ivant...@gmail.com on 5 Jan 2015 at 7:09

GoogleCodeExporter commented 9 years ago
I was bitten by this same bug as well. Too bad it is taking so long to merge 
this patch.

Original comment by bert.hav...@gmail.com on 15 Mar 2015 at 6:49