how to get balance by USSD commands?

ε祈祈猫儿з 提交于 2019-12-04 10:24:23
Onsongo Moseti

You need to set the Message format to AT+CMGF=0, before sending your USSD Command. This is PDU Mode (http://www.smartposition.nl/resources/sms_pdu.html). I was stumped using AT+CMGF=1, which is Text mode, before I decided to try AT+CMGF=0.

Worked like Magic.

So:

  1. Set Message Format to PDU (AT+CMGF=0)
  2. Execute Your USSD Command (AT+CUSD=1,*544*2*3#,15) - example message
  3. Read response from the Port.

I am assuming that you know already how to form your AT Commands and Read the response from the Port.

I found that my modem use more than one port and i should connect at the first port to send my command and listen to another port to get the USSD command's result

i just use this "AT+CUSD=1,'*120#',15" in my country the USSD code is *120# but remember if you are using it withing a code you must add crlf character to the end hope this help

lordbora

Try This using Hyperterm Serial Monitor Application ( https://www.hilgraeve.com/hyperterminal-trial/ )

First Convert Modem to PDU Mode :

AT+CMGF=0

Second USSD Code Send :

AT+CUSD=1,"#132#",15 

( Use your Country Carrier Codes )

Finally Read Output from Terminal :)

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