obsy / sms_tool

SMS Tool for 3G/4G modem
46 stars 12 forks source link

USSD reply not decoding? #13

Closed kylex2 closed 2 months ago

kylex2 commented 2 months ago

Hi, I have issues decoding USSD replies. Device is ZTE MF286D (using Qualcomm MDM9250 according to OpenWRT wiki).

root@OpenWrt:/# sms_tool -D -d /dev/ttyUSB2 -R ussd *101#
debug: AT+CUSD=1,"*101#",15

debug: +CUSD: 0,"002000440075002000680061007200200030002C003000300020006B00720020006F0063006800200030002C00390039002000470042002000730075007200660020006B007600610072002E002000440075002000720069006E0067006500720020006600F6007200200032006B0072002F00730061006D00740061006C002C00200073006B00690063006B0061007200200053004D0053002F004D004D00530020006600F6007200200035003000F600720065002F00730074002E0020004B00F60070002000730075007200660020007000E5002000680061006C00650062006F0070002E00730065002F006500780074007200610073",7

The message should decode into something like this

Du har 0,00 kr och 0,99 GB surf kvar. Du ringer för 2kr/samtal, skickar SMS/MMS för 50öre/st. Köp surf på halebop.se/extras

Also, the message seems cut off and incomplete, however that is maybe not an issue with this tool?

Thanks

obsy commented 2 months ago

Seem to be some kind of character charset decoding problem. I'll take a look.

obsy commented 2 months ago

Recompile new version and try this:

sms_tool -D -d /dev/ttyUSB2 -c 2 -R ussd *101#
kylex2 commented 2 months ago

That works, thanks for quick solution. Is my modem firmware buggy since it couldn't auto detect the encoding (upper dcs = 0)?

obsy commented 2 months ago

In Poland we use a lot of MF286D, most of them with Telia/Nordic software. There has been no problem with USSD so far.