RASPBERRY PI SIM900 GSM/GPRS MODULE ADAPTER KIT

Previously we released a Raspberry PI LCD Adapter Kit, which allows you to connect the LCD module of ITDB02-2.4E and ITDB02-2.8 directly to the Raspberry PI development board and provides a library example which is modified based on Henning's UTFT library. After the release, we received a lot of positive feedback which makes us very happy. Although this is only a quite small thing, not even to speak of technical difficulty, yet this gadget can actually bring convenience to many people.

According to the feedback received, many guys hope to add GSM / GPRS functions on the raspberry pie, which can be achieved with our SIM900 GSM / GPRM module. Therefore, now we would like to introduce a "Raspberry PI SIM900 GSM / GPRS Module Adapter Kit", with which you can connect SIM900 GSM / GPRS module directly to the Raspberry PI and break out pin headers from the pins, allowing you to continue to use other unoccupied pins on the Raspberry PI – SIM900 GSM / GPRS module only uses TX and RX pins on Raspberry PI.

As there is a free operation library for SIM900 GSM / GPRM module in Arduino, it is quite convenient to use, we only need just a few simple functions to let Arduino make calls or send SMS alerts. Now, in order to match the newly released adapter kit, our engineers migrated the  library from Arduino to Raspberry PI and deleted some. For specific functions and function prototypes, please refer to our library function manual.

Here we will briefly introduce Raspberry PI SIM900 GSM / GPRS Module Adapter Kit and how to use the library.

First is about hardware connection, link one end of cable directly to pin of Raspberry PI according to the following figure and another end to the adapter board, insert the adapter board directly into the pins of SIM900 GSM / GPRS module, thus connection is done.

Next, we need to make some modifications to the system configuration, because the UART that we will need to use in Raspberry PI is occupied then by the system as default, and we need to release it.

Browse to the file location:

/boot/cmdline.txt

Open and edit the file with administrator privileges:

$ sudo vi /boot/cmdline.txt

After opening, change the following contents:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

to:

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

The same way to modify / etc / inittab:

$ sudo vi /etc/inittab

Comment out or delete the following line (usually the last line):

# T0: 23: respawn :/ sbin / getty-L ttyAMA0 115200 vt100

Then save and exit, the modification is done. Next, download and unzip the SIM900 GSM / GRPS module operation library that we can provided. If the zipped folder is placed on desktop, enter into the folder:

cd /home/pi/Desktop/ITEADGSM

Install the library:

make install

Thus the library is installed. If you want to use the library later on, you only need to include GSM.h file in your project files and to add lITEADGSM parameters when compiling.
For example, to compile a sample file in the library folder on the desktop:

gcc GSMDemo.c -o GSMDemo -lITEADGSM

After compilation, you can run the program:

sudo./ GSMDemo

We will release this library to google code to facilitate updating to the latest version. If you encounter any problems during use, you can post questions on our forum, and we will try to help you fix them. If you have good suggestions, you can also send us feedback on the forum.

  ITEAD RPI SIM900 GSM Library (44.0 KiB, 2,324 hits)

Related article:

Responses to “RASPBERRY PI SIM900 GSM/GPRS MODULE ADAPTER KIT

  1. gcc GSMDemo.c -o GSMDemo -IITEADGSM
    This code is not working in raspberry pi.
    is there any alternate solution for this.
    Please any body help me.

  2. Demo code compiled ok but when trying to run it all I got was a call number: 9 and kept going like that. Any ideeas on how to solve it?

    • Did you turn the module ON by pressing the power button 1 second ?
      I think there’s a problem with the interface board, It doesn’t turn the module on by Raspberry’s GPIO output as expected.

      I managed to get my board working by pressing the pwr button. I have done some test with AT command and let my board asside. Few weeks later, I wanted to continue my tests but my board refused to boot. Do someone know how to debug the board or flash the firmware ?

  3. One question, when you install and configure the gsm module in linux, you can access to the Internet since linux SO (navigator, apt-get and other applications) or only can connect through applications using the gsm library?

  4. Pingback: Raspberry and the remote controlled relay: a low-level approach (a.k.a. “AT modem commands: the usual suspects”). | ML's Garret Labs

  5. Hi,
    i solder pin4 (RI) of sim900 module out, to one of GPIO of RPi, then i find sim900 can NOT power on anymore.it is strange, any hints?
    i am sure there is no short cirsuit, because i measure arounding pins with meter. and i measure VCC 4.7v, pin1 (PERKEY) of sim900 is 2.98v, looks ok. and when pressing pwr button, pin 1 is poll down.

    thanks in advance, Leo

  6. Hi there, I got the unit working i.e. “./GSMDemo” returns:
    call number: 0
    no call
    call number: 1
    incoming voice call

    However, I have two questions:

    1) When I try to send an sms I get an error:
    error=SendSMS(“0027#########”, “test”)
    Any way to debug this?

    2) How can I connect to the internet via GPRS – I cannot find the code anywhere?

    Thanks!

  7. I too would be very interested in some help finding out how to get this to connect to the internet. Any help with this would be greatly appreciated!

  8. Hey, Im trying to make my own c script thats dedicated to making outgoing calls. Ive tried passing a number directly to the function CallS, (ex. CallS (“+39123456789″).

    But no call is made as far as I know. Any suggestions on how to make a script dedicated to outgoing calls?

  9. Ok, so I got the code running. The Raspberry Pi is talking with the module, but it’s not recognizing whether or not the module is turned on. With Debug mode turned on, it reports that the module is on, regardless of whether it’s on or off.

  10. I have done the above steps till

    # T0: 23: respawn :/ sbin / getty-L ttyAMA0 115200 vt100

    Then save and exit, the modification is done.

    When I start to restart the raspberry pi model B, it can only bootup halfway. Can i know why is it so? Should I overwrite the 2 amended files?
    Am I able to surf net after doing all the steps as I need to use the GPS module (Adafruit Ultimate GPS Breakout (66 channel w/10 Hz updates) ) which is to link to the raspberry pi to get the GPS coordinates?
    From there, the raspberry pi will send an SMS to my mobile phone through SIM900 and let me check on google map.
    I am stuck now. Please help… Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>