AT+CUSD 命令:响应编码 [英] AT+CUSD command: Response encoding

查看:44
本文介绍了AT+CUSD 命令:响应编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在向 gsm 调制解调器发送 AT+CUSD 命令(拨打 ussd 代码).它工作正常.手机上的响应也是正确的.但响应是我认为的十六进制格式或一些我不知道的编码:

I am sending AT+CUSD command (to dial a ussd code) to a gsm modem. It is working fine. The response is also correct on the handset. But the response is in I think hex format or some encoding unknown to me:

GSM 调制解调器硬件:

诺基亚 C6-01

使用 USB 数据线连接到笔记本电脑.USB 模式:诺基亚套件

Connected to laptop using USB cable. Usb mode: Nokia Suite

用于初始化编码的命令:

AT+CSCS=?

+CSCS: ("UCS2","GSM","PCCP437","PCDN","IRA","8859-1","HEX","UTF-8")

AT+CSCS="IRA"

AT+CSCS?

+CSCS: "IRA"

也试过了:

AT+CSCS="GSM"
AT+CSCS="UTF-8"

实际的 Ussd 命令:

AT+CUSD=1,"*123#",15

实际回复:

+CUSD: 1,"c47258e1ad7e7f477bb2c6781e0ec72785e691d36136481593cd54f6777d8c2ecb23e1313d6dfd3d36f7764fc26974720fa1b242f8fd161f9b9cc",1

OK

预期响应:

AT+CUSD=1,"*123#",15

+CUSD: 1,"Dear Customer.... some response in english",1

推荐答案

看起来像是调制解调器解码问题.应该通过使用大多数调制解调器的标准 IRA 编码来修复.

Looks like an modem decoding issue. Should be fixed by making use of the standard IRA encoding of most modems.

尝试使用:

AT+CSCS="IRA"

AT+CSCS="IRA"

然后尝试使用 USSD 命令再次获得响应.

And then try out the USSD command to get a response again.

附带说明,您可以通过以下方式输出调制解调器的可用编码功能:

As a side note you can output available encoding capabilities of your modem via:

AT+CSCS=?

USSD 被编码为 7 位 GSM 或 UC2.要使用 7 位解码,请查看 3GPP ETSI 03.38.要解码 UC2,这基本上是 UTF-16,因此 2 个字节定义了一个字符.

USSD's are encoded either as 7-Bit GSM or UC2. To decode using 7-Bit take a look at 3GPP ETSI 03.38. To decode UC2 this is basically UTF-16 so 2 bytes defines a character.

尝试使用 7 位:

C4    1 1000100     100 0100     D
72    01 110010     110 0101     e
58    010 11000     110 0001     a
E1    1110 0001     000 1010     <LF>
AD    10101 101     101 1110     ü
7E    011111 10     101 0101     U
7F    0111111 1     101 1111     §
47    0 1000111     011 1111     ?
7B    01 111011     100 0111     G

Dea<LF>üU§?G

用 7-Bit 开始很好,但在 3 个字符之后就很垃圾了.

Starts off good with 7-Bit but after 3 characters its just junk.

尝试使用 UC2 只会产生垃圾.

Trying with UC2 just produces junk.

结论:可能是正在使用的调制解调器的特定问题(了解它是哪个制造商型号仍然很有用).或者您如何连接到调制解调器(考虑到 USSD 字符串不是有效的十六进制字符串,因为它的长度不均匀).

Conclusion: Perhaps an specific issue with the modem being used (still would be useful to know which manufacturer model it is). Or how you are connected to the modem (considering the USSD string is not a valid hex string as it's of uneven length).

这篇关于AT+CUSD 命令:响应编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆