You are here

USSD with AT commands on Huawei E220 USB modem

4 posts / 0 new
Last post
aco.s
USSD with AT commands on Huawei E220 USB modem

Hi there,

I am new here and hope on right place to ask for help.
At the moment I am trying to send USSD request to mobile operator and cannot get response from operator.

When I use standard GSM phone I send *122# as USSD message and in a second I have answer with balance on my prepaid account.

Now, trying the same with AT commands...

I had two scenarios:

1) Using AT commands and Hyperterminal
AT+CUSD=1,"*122#",15 (my request)
OK (response from modem)
In futher, nothing happen. Not as response in HyperTerminal nor as an SMS message which I can check using AT+CMGL="all"

2) Using AT commands in "ActiveXperts Mobile Messaging Toolkit" software
As a response from this software I have "30115: No more data available in receive buffer"
But, here is a log file from this software:
[13:37:13] Mobile Messaging Toolkit: [AxMmCtl.dll 6.0.4.20119 (x86)]
[13:37:13] Open [HUAWEI Mobile Connect - 3G Modem #3] as TAPI
[13:37:13] Sending command: [ATV1]
[13:37:13] Read response: [OK]
[13:37:13] Sending command: [AT+CPIN?]
[13:37:13] Read response: [+CPIN: READY]
[13:37:13] Read response: [OK]
[13:37:13] Sending command: [ATE0]
[13:37:13] Read response: [OK]
[13:37:13] Waiting for the device to register on the GSM network
[13:37:13] Sending command: [AT+CREG?]
[13:37:13] Read response: [+CREG: 0,1]
[13:37:13] Read response: [OK]
[13:37:13] Device is registered
[13:37:13] Sending command: [AT+CGMI]
[13:37:13] Read response: [huawei]
[13:37:13] Read response: [OK]
[13:37:13] Sending command: [AT+CGMM]
[13:37:14] Read response: [E220]
[13:37:14] Read response: [OK]
[13:37:14] Sending command: [AT+CGMR]
[13:37:14] Read response: [11.117.10.03.99]
[13:37:14] Read response: [OK]
[13:37:14] Sending command: [AT+CGSN]
[13:37:14] Read response: [356635025784417]
[13:37:14] Read response: [OK]
[13:37:14] Sending command: [AT+CMEE=1]
[13:37:14] Read response: [OK]
[13:37:14] Sending command: [AT+CSMS?]
[13:37:14] Read response: [+CSMS: 0,1,1,1]
[13:37:14] Read response: [OK]
[13:37:14] Can send: [YES]; Can receive [YES]
[13:37:14] Sending command: [AT+CNMI=?]
[13:37:14] Read response: [+CNMI: (0,1,2),(0,1,2,3),(0,2),(0,1,2),(0,1)]
[13:37:14] Read response: [OK]
[13:37:14] Sending command: [AT+CNMI=0,0,0,2,0]
[13:37:14] Read response: [OK]
[13:37:14] Supports receiving status reports: [YES]
[13:37:14] Sending command: [AT+CMGF=?]
[13:37:14] Read response: [+CMGF: (0-1)]
[13:37:14] Read response: [OK]
[13:37:14] Sending command: [AT+CMGF=0]
[13:37:14] Read response: [OK]
[13:37:14] Message format set to: [GSM_MESSAGEFORMAT_PDU]
[13:37:14] Prefix SMSC info set to: [GSM_PREFIXSMSC_ENABLED]
[13:37:14] Sending command: [AT+CUSD=1,"AT+CUSD=1,"*122#",15",15]
[13:37:15] Read response: [OK]
[13:37:25] Connection closed

As it can be seen here "CONNECTION CLOSED". Why ? Is it reason why I don't get response with balance from mobile operator.

Is there any other reason for not having response (on modem) as on mobile phone?

As far as I have understood response on USSD can be USSD response or SMS message. If I understood it well, I should have in Hyper Terminal this USSD response ???

willemmcd
Did you get this sorted out?

Did you get this sorted out? I'm sitting with the same issue at the moment..

aco.s
Hi there,When I resolve a

Hi there,

When I resolve a problem I put comment in notepad - solution. At the moment, I am not able to test it on my modem if this syntax is OK, but according to my "notepad" files I have this as "solved". The syntax was:

CHECK CREDITS ON SIM CARD
AT+CUSD=1,"*122#", 15 <<<<< query

+CUSD: 2,"Your current balance is $ 22.10", 0 <<<<< answer

Check again if it works. I don't remember but I think that you should not type text but copy-paste it from some text-editor to Hyperterminal. If you type something wrong and try to delete it with backspace ... it will not work (Hyperterminal) - so command should be "clean".

Ok, check it using this command and post result. If it is not working I will dig my modem out from somewhere and try again and post it here.

aco.s
Correct syntax

Ok,

First of all I would like to apologize since my last post is some syntax I have from internet and put it by mistake in my "solution" notepad files.
Now, few minutes ago, I have connected my Huawei E220 to my notebook and try using HyperTerminal to check the balance and have received.

Correct syntax for my GSM provider is as it was in my first post:
AT+CUSD=1,"*122#",15

after few seconds I have reply through same channel in this format:
+CUSD: 0,"Your current balance is 4.66 EUR. Your account is active till 22.02.2013.",15

The correct syntax for balance query using AT commands depends on your GSM provider. I am not sure if all GSM providers has same USSD command for balance query ("*122#"). Additionally, any incorrect typing can give you "silence" or "error message", so be carefull what you type. As you can see, in this post there is no spaces in query command ! You can copy/"paste to host" above command to HyperTerminal if you are under Windows, not sure about MiniCom under Linux, and try to see what if you get any response. First response should be "OK" and shortly after that "+CUSD: ............"