Link to home
Start Free TrialLog in
Avatar of StingRaY
StingRaYFlag for Thailand

asked on

AT Command problem

I have a problem about using AT command. I am trying to send AT+CUSD command using C#. The problem is when I submit AT+CUSD command, the GSM returns OK with NO +CUSD reply. This is for both in my C# app and Terminal.

For example, I submit the first line and GSM returns the second line:

AT+CUSD=1,"*456*11111111111111#",15
OK

Open in new window


In the starting, I send these commands to initialize GSM.

AT+CMGF=1
AT+CMEE=2

Open in new window


Do I miss something? Please help.
Avatar of StingRaY
StingRaY
Flag of Thailand image

ASKER

FYI, I have also tried a recommend from https://www.experts-exchange.com/questions/23017550/AT-COMMAND-GSM-Modem-using-USSD-Vbscript.html, but it does not work.
Avatar of footswitch
footswitch

Different models can have different behavior.
What does the manual say about AT+CUSD?

Also, did you try this?
ATD*456*11111111111111#
[ENTER]
Yes, I have tried this. It returned only OK as well.
You still didn't comment on what the manual says for your product. Or what make / model is in debate here.

I will make another suggestion.
Input this whenever you power or reset the GSM:
AT+CNMI=3,1,1,1
[ENTER]
And only from then on, try the commands ATD and/or AT+CUSD.

AT+CNMI, as is probably described in your product's manual, enables or disables the reporting of a series of notifications, like SMS, broadcast messages and so on.

I know that by now I have mentioned the manual 3 or 4 times. If you don't read it, you can't know for sure if your model supports these commands or even broadcast responses at all.
I am using GSM Module SIM900B purchased from my local store. Actually, the AT+CUSD is used to be working very well. I am not sure if I do something wrong to my module. I will try your advice very soon and I will tell you what I get.

Thanks!
FYI, there is no special mention about CUSD command in the manual.
This is what I got.

AT+CNMI=3,1,1,1
+CMS ERROR: operation not supported

Open in new window

Did you change your carrier or SIM? Are you positive that you're not confusing * with # and vice-versa?
Try it in your cell, if it's the same carrier.
Can you try a different one? Consider that different carriers have different codes.

The syntax is different for your module. The manual isn't very clear, as usual (it looks like english isn't the writer's native language).

try this
AT+CNMI=3,3,2,1,0

And these are the commands with which I initialize my module (SM5100B):
// set the memory storage for messages:
AT+CPMS="SM","SM"
// enable message text mode:
AT+CMGF=1
// and the command AT+CNMI above

Open in new window


Give it a try and, when the manual isn't clear enough, try the different parameters and make notes for future reference. It's what I had to do with my module. Good luck!
Forgot to mention: when it comes to messages, there are some parameters that are written to NON-volatile memory. You can find them in the manual around the parameters that I wrote above. Usually they specify they are non-volatile. If you used them in the past, that may be the cause.
Hi,

I haven't change my SIM, but it's working on my mobile. The +CUSD response is replied just in a second. I have also tried your advice, but nothing changes. I also reset the module to factory default setting by AT&F and repeat everything, no change.

Is there any way else to reset the NON-volatile memory? Actually, I think doing AT&F should reset everything, isn't it?
AT&F0 (zero) resets to factory values.
The module should reply OK after this.
Then you power-cycle the module (leave it off for at least 4 or 5 few seconds).

And everything should be just as it was the day you unpacked it.

Beyond that, I'm afraid I won't be of much help.
I've tried reset the module using AT&F0. It responded OK.
But, nothing is better. No +CUSD response from both of ATD*456*11111111111111# and AT+CUSD=1,"*456*11111111111111#",15.

:(
ASKER CERTIFIED SOLUTION
Avatar of footswitch
footswitch

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks!
What happens if you dial this
*456*11111111111111#
In a handset's dialer against same SIM?

Maybe a wrong USSD code?
It's working correctly through mobile, not GSM module.