Interfacing SIM900a to computer .

 

This GSM modem can accept any GSM network operator SIM card and act just like a mobile phone with its own unique phone number. Advantage of using this modem will be that you can use its RS232 port to communicate and develop embedded applications. Applications like SMS control, data transfer, remote control and logging can be developed easily.IMG_0078 copy

 

The modem can either be connected directly to the PC serial port or to any microcontroller through MAX232. It can be used to send and receive SMS or to make/receive voice calls. It can also be used in GPRS mode to connect to the internet and do many applications for data logging and control. In GPRS mode you can also connect to any remote FTP server and upload files for data logging.gsmmodem

 

Software description

 

To communicate with the network we use ELEMENTZ GSM Modem Test Utility software. It is an executable file which supports serial data transmission and reception similar to HyperTerminal in Windows XP.

How to connect to computer ?

  • Firstly insert the SIM card in the sim holder. Make sure to use a normal SIM card (Micro or nano SIM cards are not supported)

IMG_0081 copy

 

  • Connect the GSM modem to the usb2serial hardware via DB9 connector. Then using a USB A to B cable connect to the computer.IMG_0110 copy

 

  • Connect a 12V/9V 1A adapter to the power jack provided on the GSM modem.  The LM317  voltage regulator regulates the voltage  to 3.6V.
  • Please note when you connect the power, a RED LED will glow.  It shows that the modem has got the power required for its operation.
  •  When you connect the power , a BLUE LED will glow for approximately 1sec.  After that it will blink  with a delay of approximately half sec. That means the SIM card  is searching for  network.  If the SIM card has connected to a network, then the BLUE LED will blink with a delay of approximately 4sec. Depending on the network strength, the time to connect to a network may vary. If there is no SIM card in the modem, the BLUE LED blinks with a delay approximately half sec.

 

The steps required for connecting the modem to the PC is shown below:

 

Right click My Computer → select the Device managerPorts(COM & LPT).

 

Note the COM PORT. Here you can see its COM3.ports

Double click ‘GSM Tester.exe→click on Scan ports

 

The Status box will show “Port Scan complete”.SCAN PORT

 

Click on “Port”  dropdown menu. Select COM Port for your device. Here its COM3.

 

Then click on Open port. The status box will show “Port opened successfully. Message cleared.”Openport

 

Connect the 12V/9V 1A adapter to the power jack of the modem. You can see the following details in the status box.

“+CFUN: 1 ”

“+CPIN: READY”

“CALL READY”  This means that the modem is ready for normal functioning.

 

CPIN READY

 

Please note if SIM is not inserted then it will show “+CPIN: NOT INSERTED”.

Making a CALL

To make a call, enter the phone number and press the Call button.CALL

 

The status box will show “Data received: ATD9037200424; “. This is the AT command for making a call.Ring

 

If a call is coming to the GSM modem, a series of “RING” will appear on ths Status box. If you want to connect to the call ,then type “ATA” in the AT command window and press “Execute“.

Sending message                 

The first thing you have to do before sending a message is to make the modem to text mode. To do that type ” AT+CMGF=1;&W ” in the AT command window and press execute. DO NOT TYPE THE DOUBLE QUOTES. &W is used to write to the SIM900a memory permanently.

To send a message, type the phone number in Phone number window and the message content in the Message window and press the Send button.

Message send

 

 

You can see that after the message has been sent, the modem gives a response”+CMGS: 234″. From this you can confirm that message has been sent successfully.

The number 234 means 234 messages has been sent from the modem.

The AT command for sending message is AT+CMGS=”9036800569″. When you press enter , “>” prompt will appear. Type the content of the message and after that press Ctrl+z to send the message.

  FAQ

Which power adapter should I use?

You can use 9V or higher with ampere rating 1A or more. If you use adapter with ampere rating less than 1A there is a chance of modem getting reset when making a call or sending a message, because even though rated at 1A, it may supply only around 800mA.

My modem is showing ‘yyyy’ recurringly?

This is because the modem is getting reset, most probably a power issue. Check the connection for any loose contact. Also check if the power  supply is working properly. Consider changing the power adapter with more ampere rating.

No ports are shown in the software after scanning ports. Why?

The USB to UART driver has not been installed correctly or the hardware was not correctly connected to the computer. This can be confirmed by checking for the USB to UART port information in the device manager.

My modem is not connecting to a network?

One reason is the network strength in your area is poor. Move the modem to an area with more network strength.

Another reason is when you put a SIM of different service provider in the modem for the first time. In that case take the SIM back from the modem and reinsert it into your phone and connect to the network. Power OFF the GSM modem. After connecting to the network, take the SIM from the phone and then reinsert it into the modem. Power ON the GSM modem. This should work.

I cannot see anything I type in the modem ?

One reason is that the baud rate is different. The computer and the modem should be set at the same baud rate for proper communication. Try opening modem test utility or putty with different baud rates and try any AT command.For example if the modem is set at 115200 baud rate and computer(modem test utility) is set at 9600 baud rate then it will not communicate. Try opening modem test utility with different baud rates . So when the modem test utility is set at 115200 it will communicate.

Another reason is that ECHO is off. You can easily know the echo is off because the modem responds to your AT commands but the only problem is that you cannot see what you are typing. To turn on echo type ATE1&W<press ENTER>.

 

Advertisements

31 thoughts on “Interfacing SIM900a to computer .

  1. I bought this gsm modem from ebay.. It is having all the functionality that I require for my project. This tutorial helped me to get started. Thanks..

  2. Hi,
    I am from a software engineering background, and this is my first hardware project. I primarily run a Ubuntu desktop. What I’m trying to do is have the AT-SIM900A-V15 module read incoming SMSes and then somehow access those from a computer. I have access to a windows pc if that is absolutely necessary. Could you maybe give me some pointers regarding how I should start; coz I am completely uninitiated with this thing.
    Any help at all would be much appreciated.

    Thanks in advance.

      • I am grateful for the prompt reply. The thing is, I have to use JAVA as the programming platform. The bigger issue is I have never even connected any hardware module to the computer . And can’t use a pi. I am sure I’d find a lot of resources for the pi, but I had a hard time finding out even the documentation for at-sim900. So what I am looking for is maybe a tutorial on how to interface the module with the pc and use java to communicate (retrieve SMS) from the module.
        Once again, any help is greatly appreciated. Cheers.

      • Which OS are you using for JAVA progrmming?
        pi is nothing but a linux computer with small foam factor. All tutorials for pi are applicable to desktop linux also, except GPIOs. You can use a USB2Serial to communicate with GSM Modem, if your PC lack a serial port.

      • I think we have a misunderstanding here. I have to use Java with the AT-SIM900 module. A usb2serial cable might be accessible. The targeted OS is windows (though I am a linux user primarily). I am helping out my brother with his project, with the mentioned restrictions on the hardware and programming language (as part of his course).

      • For reading SMS send
        AT+CMGF=1 // read and write SMS in ASCII format
        AT+CMGR=1 //for reading message from first location.

        A small trick is to delete the new sms after reading by
        AT+CMGD=1 // delete SMS from first location
        so that the new arrived SMS will always be stored in first location.

        You will get +CMTI notification when a new SMS arrives, or you can periodically read the SMS.

        For testing purpose download and install putty in either windows or linux– Open Serial port with baudrate 9600, and type your AT command in the black screen of putty to see the response.

        Don’t forget to close putty before running your code.

        Feel free to ask if you are having any doubt.

  3. I am working on sim900a & arduino interfacing & trying to send & receive SMS but i m facing some error, even though call via gsm is working properly.

    voltage & current frm the adapter are fine.

    can you please provide me a working code of that. or email me the same.

    -Abhirup

  4. Hi. The SIM900A returns 00 49 49 49 49 FE FE FE FE at a baudrate of 115600 upon power on. But after that, it doesn’t respond to any AT commands. The tried changing all the baudrates but no use. It was initially working fine, but I am not sure why it stopped working now. Can you please help me in recovering this modem.

  5. I worked through the same procedure, but Unfortunately I could not make it work. It always returns the error that “cpin not inserted”. I tried all the sim cards I had. Looks like it is not recognizing the sim card and connecting to the network. The led continuously blinks.

    • Hi Mahantesh,
      I hope you are inserting the SIM card before powering on the modem. If it is the case, make sure the Modem antenna is properly connected.

      In some cases the SIM card holder may be loose. Try keep pushing your SIM card holder downwards and apply power and check the status without removing the applied force.

      • Hi,
        thanking you for the response.
        Yes I inserted the SIM card before powering the modem and checked modem antenna. I even tried pushing the sim card downwards, but somehow I am not able to make it work. I checked the contact pins, they are properly connecting to the sim card contactors. I tried with about 4 sim cards, for all the error is same. The LED continuously blinking once in half second. Any specific requirements on the sim cards 32 bits, 3G, 4G etc..
        Thanks and regards
        Mahantesh

  6. I tried to Run “GSM_MODEM_Tester.exe” on my Windows XP PC, I am getting error “GSM_MODEM_Tester.exe is not a Valid Win32 Application”

    Is there any OS restriction for this utility?

  7. Data received:
    +CPIN: NOT INSERTED
    Data received:

    Data received:
    +CFUN: 1

    ITS NOT WORKING,PLEASE TELL HOW I CAN FIX IT

    • Hi Amandeep,
      Seems like the SIM is not getting range. Make sure you inserted the SIM before applying power to the GSM modem. Try changing SIM of different service provider having sufficient network coverage in your area.

  8. I am using SIM900A. I am not able to send sms, when i give command AT+CMGS=:+919766****” i amnot getting response from +CMGS response from SIM

  9. Hello, I am using SIM900A, when is type AT+CMGS=”9766******” i am getting response data received:
    I am not getting > this response

  10. Hii…nice module. I am using with arduino with gsmgprs library from openhardware.org. But I want to know about the molule reset. Did you provide that reset pin on pcb or could I have to remove the ‘PWR’ jumper. thank you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s