Error on checking balance via USSD

*爱你&永不变心* 提交于 2019-12-01 07:28:59

问题


I've been trying to check my balance from by 3g modem via AT commands and seem to be stuck.

The device infomation is as follows:

Manufacturer: QUALCOMM INCORPORATED
Model: M6281
Revision: SSD_M6281A-0.0.1 1 [Oct 02 2008 07:00:00]

The modem has USSD capability (advertised and also present in the factory installed dashboard).

I am connecting via putty to COM4 serial port which is my modems application port. All AT commands are working fine but I am getting an error on issuing the following via putty:

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

This returns a simple "ERROR". *111# is my carrier's balance check code. I suspect that there is a formatting error somewhere but I can't figure out where.

Note: If I issue a blank ussd command:

AT+CUSD=1,"",15 

then I get an OK (although I later get a response +CME ERROR: retry operation) ... If I write anything within the quotation marks however, it returns an "ERROR".


回答1:


Ok, I finally found the way to fix this. Apparently there was a problem in the encoding. Here is what I did:

AT+CSCS="GSM" // change character set to GSM
AT+CUSD=1,"*111#",15 // Issued balance check ussd code

It now works fine.

The default encoding was UCS2, I'd appreciate if someone can share how to convert ussd codes to UCS2 encoding in putty.




回答2:


Have you tried issuing request by AT+CUSD=1,"*111#" ? (without last parameter) AT cmmands sometimes differ due to manufacturer implementation.



来源:https://stackoverflow.com/questions/29730142/error-on-checking-balance-via-ussd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!