AT COMMANDS - USSD returns only OK - gsm

I have bought ZTE MF667 GSM Modem and i am using Hyper Terminal to send AT COMMANDS, i have a problem with USSD e.g :
AT+CUSD=1,"*111#",15 (to check balance) but it returns only OK
AT+CUSD=1,"*111#" returns only OK
I have tested another AT COMMADS which work fine like
AT+CMGL="ALL" to read SMS (WORKS)
How could i resolve the problem please ?

First of all USSD messages are fairly similar to SMS in that a message is sent from the mobile device to the operator network. This means when you execute a USSD command on your mobile device you will not receive an immediate response as the operator network's USSD service must answer your message. This explains why you receive only a "OK" answer to your USSD command. The "OK" is basically telling you the USSD command syntax was valid and a USSD command was sent from your mobile device to the operator network, nothing more.
Secondly as USSD command responses will be returned as an unsolicited response and therefore will not be stored alongside your SMS's.
Quote from wikipedia regarding this:
USSD is generally associated with real-time or instant messaging services. There is no store-and-forward capability, as is typical of other short-message protocols like SMS.
Addressing concretely your problem I would either assume that the operator network is being incredibly slow in responding. Or alternatively the "get balance" command you are sending is incorrect for your operator network. I would recommend checking your operator networks website to check the "get balance" USSD command code.

for past 20 days i try to solve this issues on my GSM Modem. finally i solved by follow below steps
here its a solution :
STEP 01 : AT+CSCS="GSM" Enter, it will return ok
STEP 02 : AT+QURCCFG="urcport","uart1" Enter, it will return ok
Now test your USSD like : AT+CUSD=1,"USSD CODE",15
My GSM modem Details - 4G Quectel (4G) EC20 Revision: EC20EQAR02A11E2G

Just send the command "AT" and you'll receive your ussd response.

Related

how to send inter-operator sms via GSM/LTE module

I am using a GSM/LTE module (EC21 Quectel) to send and recieve sms with HyperTerminal application on computer by at-commands.
I can send sms to devices with the same operator (intra-operator), but not to any other operator (inter-operator).
I can even recieve sms from other operators on my module, but when i try sending to them i get error:
the first number has the same operator as my module's simcard and the second one has a different operator
So does anybody know how to send an inter-operator sms?
I would really appreciate it if anyone could help.
Turns out the problem was because of my simcard monetary charge. for sending sms to diffrent operator, the network would charge me and my sim balance was zero. so i would get this "unknown error". so i charged my sim balance and the problem solved.

How to disable GSM Modem unsolicited SMS arrival message?

I would like to process sms messages from my GSM modem (SIM900, but have few others also) but without +CMTI notification.
Code would run in a look and execute various commands, and one of them would be to check if message arrived and then act upon that.
Currently if modem received sms it outpus +CMTI message which get somewhere in the buffer.
Would disabling of that be better approach or should I parse the structure?
Please run
AT+CNMI=0,0,0,0,0
This command silences all SMS URC notifications.
There are pro's and con's with both ways of dealing with receiving and handling SMS messages.
1) Storing on SIM card
There are a couple of downsides with this option. You have to extract the SMS messages from the SIM card which costs time on the one hand. On the other hand it degrades the SIM card itself. Depending on how many SMS's you are receiving this could cause the SIM card to stop working aka no longer able to do read and writes.
2) Handling unsolicited
Here the downside is that you have to be permanently connected to the modem and collect the messages as they come. So if there are USB connection issues it could occur that you lose messages. There are ways of coping with this, for example by configuring the modem so that you manually acknowledge SMS messages received (AT+NACK). This means that the mobile operator network will resend the messages at a later point in time.
When you have modems from different manufacturers then configuration is sometimes a little tricky regarding unsolicited messages. Watch out there if you choose this route. Via AT+CNMI (parameters are different depending on manufacturer/model) you can configure how the modem deals with unsolicited messages. This also involves how the modem handles messages when no "host" is connected to the modem etc... I really recommend finding the AT Command manuals for your modems and seeing what is possible there.
To summarise I personally recommend the unsolicited approach as it's a lot more comfortable handling messages rather than accessing the SIM card to grab and delete received messages.

Get error when try read sms with at command

I'm trying to use AT command for send/read the sms with nokia 5530 serial port on com6
I can connect and send sms correctly without any error and recipient get the message.
But the problem: I can't read any message and get "Error" nothing more !!!! check the below image for more info:
What is the problem and how can I read the sms?
Try using the AT+CNMI command before the AT+CMGL. It tells the device what to do with incoming messages.
try: AT+CNMI=1,2,0,0,0
Also, try this: AT+CMGL=? to see if the command is supported by your device. It should respond "OK" if it is. If not, it isn't supported.

GSM DATA INTERCHANGE

I was wondering if it is possible to send via GSM protocol and appropriate AT commands, few data through a simple GSM call (witout using data traffic).
For example my system is a PIC + GSM Module and it monitors and processes a string of data.
When the user wishes, he makes a voice call in order to interacts with the GSM module via DTMF commands for example via an APP.
My dubt is if the GSM module is able to send the data to thesmartphone in order to monitor the status of the system. The module is a Quectel M95.
During some investigation, I saw that the module can send USSD codes but I don't know if it's possible to customize the USSD and read it from the smartphone as I wish.
Or maybe is it possible to use the FAX for data exchange?
Thanks everybody in advance
Marco
There are a couple of alternatives if you want to avoid using data traffic. But they all require either a connection to a service that is capable of receiving SMS's for example Twilio. Or you can of course have a GSM Module connected to your server which could do the receiving.
You could then send your data and requests for data within an standard SMS body. Or alternatively you could send binary SMS's where you are not limited to the 7 bit character set.
USSD would only work if you have a USSD service provider (I think Twilio has this now). Because the USSD service must initiate a USSD session for your target GSM Module to respond to. USSD code sending for GSM Modules is operator specific and therefore you are limited to what they have implemented (usually for prepaid users and the topping up of accounts).

Submitting "operator commands" (e.g. remaining cash SIM credits) via AT commands to GSM phone/modem

I'm a bit stuck investigating the how-to's of sending operator commands (dont know the correct technical term) using my GSM modem, in order to get an "alert" type message response from my network operator. Response characteristics are of course operator+command specific, but I figure they're used in similar ways regardless of country/network op.
For example, dialling *123# on my cellphone, in order to get a prompt text response telling me my credit balance left on my "Cash type" SIM. That's what I need to do, but through AT cmds (and not on my phone :)
Currently I'm using a Huawei E1550 3G modem for my dev. All modem comm is done through the GSMCommLib library, if relevant. Also C#/.NET 2.0. I guess I'm primarily after some keywords/hints that can aid in googl'ing, but anything helpful is really appreciated!
This *123# command is sent via USSD, the answer as well. Your 3G modem may support the AT+CUSD
AT command for sending USSD messages.

Resources