UCS2格式的GSM调制解调器发送消息错误 [英] GSM Modem Send Message in UCS2 format error

查看:144
本文介绍了UCS2格式的GSM调制解调器发送消息错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Java通过AT命令与gsm调制解调器(西门子)进行通信.
我将调制解调器的编码设置为"UCS2".
发送电话号码后立即发送消息时,我从设备收到错误消息:

AT + CSCS = UCS2
好的

AT + CSMP = 17,167,0,8
好的

AT + CMGF = 1
好的

AT + CMGS ="0919xxxxxxx"
错误

救我,加油! :(

I'm using java to communicate with a gsm modem (Siemens) using AT commands.
I set the encoding of modem to "UCS2".
When sending messages as soon as I send the phone number I get ERROR from the device:

AT+CSCS=UCS2
OK

AT+CSMP=17,167,0,8
OK

AT+CMGF=1
OK

AT+CMGS="0919xxxxxxx"
ERROR

HELP ME, PLEEEEEEASE! :(

推荐答案

我认为您将<da>地址参数编码为AT+CMGS错误.

I think you are encoding the <da> address argument to AT+CMGS incorrectly.

您所指的是91和92样式,但实际上是您所指的是'81'/'82'格式,如 3GPP TS 11.11 ?

You refer to 91 and 92 style, but are you actually referring to the '81'/'82' format as explained in the Coding of Alpha fields in the SIM for UCS2 blog post about encoding as specified in 3GPP TS 11.11?

运行AT+CSCS="UCS2"后,必须以这种方式对每个字符串进行编码,例如,将从UCS2切换为UTF-8即可.

After you run AT+CSCS="UCS2" every single string must be encoded that way, so for instance to switch from UCS2 to UTF-8 would be AT+CSCS="005500540046002D0038".

具有80/81/82编码的Alpha字段仅适用于某些情况,通常不适用于UCS2编码的字符串.特别要注意的是,上述AT+CSCS命令中字符串"UTF-8"的编码与此无关.这也适用于AT+CMGS<da>参数.

Alpha fields with 80/81/82 encoding only applies to some cases, and not UCS2 encoded strings in general. In particular notice that the encoding of the string "UTF-8" in the above AT+CSCS command has nothing to do with this. That also applies to the <da> argument to AT+CMGS.

这篇关于UCS2格式的GSM调制解调器发送消息错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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