How to send and receive sms while using GPRS in QUECTEL modem M95? - gsm

I am using QUECTEL M95 modem to connect the server using gprs . And the modem has facility to send and receive test messages .In my project both the situation occurs . By default in programming ip address been set, but there are chances for updating the ip address by sms . Wheather it is possible to send sms during gprs mode? If possible how ? Please suggest me how to do.

Yes, you can do it. If you are using Transparent mode (AT+QIMODE=1) you need to switch to Normal mode (AT+QIMODE=0) and you can send SMS using AT+CMGS regardless of active gprs connection.

You have to use the normal command mode (not to switch to transparent mode).
AT+QINDI=1 - to receive data with poll command
AT+QIRD - poll received data
AT+QISEND - send data
AT+CMGS - send SMS
AT+CMGL="REC UNREAD" - poll new messages

Related

Sending and receiving data from a server using gsm modem using gprs

I am trying to use gprs for remote monitoring using quectel m95 and pic controllers.
I know a little bit of http commands used for this purpose and we can send data and receive data from server using http POST and GET commands.
Now my application is such that my app request some data from the server.
The server has to get this data from the pic controller using gprs.
How can I send a request from the server to the pic controller which is interfaced using quectel modem.
Also I know that the server has to keep track of the IP address assigned to the modem when initialising a gprs context.
Then only it can send request to the modem.
I want to know is this feasible, if yes how can one achieve this.
Please do throw some light upon this.
Regards
Sanket
The Quectel GPRS module (modem) features a TCP/IP stack, and you treat it as the client in the server-client model. Refer to the Quectel reference material for specific AT commands required to achieve a certain task, but here's the general process:
The PIC initiates the GPRS context in the modem (comms between the PIC and the modem is via a UART).
The PIC initiates the opening of a TCP/IP connection to your server on the GPRS context. The public IP address of the server must be known to the PIC, so keep it static.
The server accepts the client connection request and assigns a socket for data transfer.
Data is sent through the open TCP/IP connection from either end. If originating at the PIC, the data must first be sent over the UART to the modem to forward to the server. If originating in your app on the server, the data must be placed in a TCP/IP packet and directed through the socket to the client. Note that once the connection is open, the socket is bound to the client - this is what you need to keep track of (should you have multiple clients).

No new sms message notifications Sim900

I have problems with the sim900. When I'm reading the serial port and the sim900 module receives a sms. It send an alert via serial port and cause problems with the reading.
I have tried using this command "AT+CNMI=0,0,0,0,0", it works fine if I really don't need sms, but I need them. what can i do if i don't want to receive new sms message notifications when I'm reading the serial port???
Thanks!
You may use AT+CNMI command to enable or disable New Message Indication messages on uart. Keep in mind that you wont get any notification for a message that is received when notifications are disabled so you need to implement a check for it.
You may either delete all existing messages using the AT+CMGD=1,4 command before disabling the notifications and check for all messages after after resuming notifications or implement any other check.
TO ENABLE NOTIFICATIONS "AT+CNMI=1,2,0,0,0"
TO DISABLE NOTIFICATIONS "AT+CNMI=0,0,0,0,0"

Directly read SMS when it arrives via GSM modem in PC over Serial Communication

I am using SIM9000A GSM Modem and have it connected it to my PC.
The issue is that whenever SMS is received by my SIM I receive below data in PC:
+CMTI: "SM",8
I want that all incoming SMS should be directly be read in PC and need not send any further command. Something like when SMS comes - GSM modem should actually send SMS content to serial port.
Below is the output received for CPMS enq.
AT+CPMS=?
+CPMS: ("SM"),("SM"),("SM")
You can use the AT+CNMI command to tell the GSM modem to direct incoming messages directly to the serial port. The full command, with parameters, is: AT+CNMI=2,2,0,0,0
AT+CNMI=2,1,0,0,0 sets the modem back to indication only mode and AT+CNMI=2,0,0,0,0 does not send any indication when a new message is received.

Using GSM and GPRS at the same time

I am sending data continuously to a remote server using the SIM300 GSM/GPRS modem connected to an Arduino Uno. At the same time I want to check if I have received an SMS on the SIM card.
In the setup function I have configured the modem to GPRS mode and executing the AT+CIPSEND continuously to send data in the main loop program. In my interrupt routine I want to check for the SMS notification using the AT+CNMI command. So is it OK to check for SMS notifications while the modem is operating in GPRS mode or is there a clash of SMS and GPRS mode because the interrupt modem is running asynchronously along with the main program?
While I shall not guarantee that this SIM300 modem is without any errors, there should be no problem checking SMS while GPRS traffic is ongoing.
The AT+CNMI command is just a command for reporting new SMS messages arrived on a serial interface, which is a local TE-TA1 issue and independent of network activity (which by the way fully handles sending/receiving SMS messages even when there is ongoing voice or data calls (circuit switched or packet switched)). You have to receive the +CNMI UR codes on a different serial interface than the one which is sending data though.
For more details about AT+CNMI I recommend that you look into the 27.005 specification.
1
TE: Terminal Equipment, e.g. PC/microprocessor.
TA: Terminal Adapter, e.g. modem.

Transferring call from GSM modem to PC

I have the following scenario.
I have a LAN and more than one GSM modems are connected to a server. I want to receive incoming call on GSM modem and transfer this call to other PC on the network. Is it possible? Can anyone give me an idea to achieve this?
You cannot 'transfer the call'.
You will have to receive the calls from each modem on the server only, then you can implement something like a VOIP/sound streaming system by which you can simply send and receive the audio between server and client(s).

Resources