wdoekes / asterisk-chan-dongle

chan_dongle channel driver for Huawei UMTS cards, works with Asterisk 14+
Other
301 stars 105 forks source link

Reception problem for certain sms #8

Closed pjmichel closed 8 years ago

pjmichel commented 8 years ago

Hi, i use a E180 Huawei, and have this kind of problem

if i send a sms to the dongle like : essai

no prob, but essai with a smiley or a accent,

[Sep 19 15:06:20] ERROR[17076]: at_response.c:1259 at_response_cmgr: [dongle1] Error decode SMS text 'D83DDE03D83DDE0E0020' from encoding 2, message is '+CMGR: 0,,29 07913306092041F0040B913306991364F60008619091516061800AD83DDE03D83DDE0E0020'

Any idea ?

fadasi commented 8 years ago

Use https://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/online-sms-pdu-decoder/ to analyze the response -> "Data coding: Unicode".

In char_conv.c replace "UCS-2BE" with "UTF-16BE", iit seems to work for all sms.

pjmichel commented 8 years ago

On Thu, 29 Sep 2016 14:52:36 -0700 fadasi notifications@github.com wrote:

Use https://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/online-sms-pdu-decoder/ to analyze the response -> "Data coding: Unicode".

In char_conv.c replace "UCS-2BE" with "UTF-16BE", iit seems to work for all sms.

Very good, that solve the problem, i change ucs-2BE in 2 function ( one from utf-8 one to utf8 ) perfect .

wdoekes commented 8 years ago
>>> print b16decode('07913306092041F0040B913306991364F60008619091516061800AD83DDE03D83DDE0E0020'[22:]).decode('utf-16be')
㌆餓 憐酑恡耊😃😎