最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

gsm - Design the USSD response handling - Stack Overflow

programmeradmin3浏览0评论

I am designing the USSD handling algorithms, and unable to decide how to proceed with converter - I need to convert received message into the UTF-8, therefore must more or less reliably decode the message returned in CUSD response.

I know that mobile operators may not follow the rules, it adds another layer of complexity, and the goal is to protect the code/algorithm from malfunction if operator response is invalid.

I am using this document Digital cellular telecommunications system (Phase 2+); Alphabets and language-specific information (GSM 03.38)

First. while modem datasheets state about "DCS" regarding USSD commands, it seems that I need another section of the document, called "Cell Broadcast Data Coding Scheme" which is different from DCS.

Next, my experiments show that operator responds with:

  • UCS2 and DCS=72 (0x48), which is correct
  • plain 8-bit text with DCS=-12 (0xF4), which is also correct

But I also see responses in UCS2 with code 17 (0x11), as well as 8-bit text with code 15 (0x0F)

+CUSD: 0,"USSD error",15

I have never seen 7-bit compressed coding. I fail trying putting compressed coding into the USSD request (*205#):

AT+CUSD=1,"2A19AC3602",15
OK

+CUSD: 0,"USSD error",15

For DCS 15 document says 'Language using the default alphabet', but changing AT+CSCS seems has no effect.

I've read here in SO that modem will be able to detect coding itself if I just put "*205#", but my test putting 7-bit GSM coding fails.

Question 1: are my assumptions above correct, and if not what's wrong and where to look at?

Question 2: is it worth designing algorithm for trying automatically detecting what had been received - if +CUSD string returned UCS2, 7-bit (hex?) or just plain text?

Maybe there's a good tutorial to follow out there on the subject?

发布评论

评论列表(0)

  1. 暂无评论