Close

Get up and running with the GPRS Shield

A project log for Open Source Cell Phone

A completely open hardware and open source software cell phone

hugh-darrowHugh Darrow 08/16/2014 at 22:460 Comments

So I took me a couple days to really narrow down what to do and how to do it. I wanted to just check basic functionality and confirm everything is working, SMS, Calling, etc. First you need to load the library into the arduino ide then upload the gprs_test sketch. I am using an Arduino Mega so don't forget to change the pins for software serial to 7,8 for other arduinos. In this scenario it just sets up a basic tunnel between the SIM900 module and the computer using the arduino to act as a go between. Next it issue commands to the arduino that will get passed to the SIM900 module, which then talks to the SIM card. In this case I use a program(SSCO32E.exe) provided by seedstudio, but you can use any uart terminal, just a little trickier.

Downloads the files needed from my server, everything is archived

I've blacked out any personal numbers.

Make sure your settings are as follows, if you get jumbled characters it may be because your arduino is talking to the shield at the incorrect baud rate, or visa versa. Try the 

AT+IPR=

command to set the baud rate, otherwise change the software serial rate in the arduino sketch to 19200 and work backwards from there. I use 4800 because it seems to be the most reliable. Later I will connect by hardware serial, but right now we are looking for, "does the thing work" no frills idea. Start off with the 

AT+CCLK?

command to ask the SIM what time is it. If it answers anything back that's not the truth, correct it with the 

AT+CCLK="yy/mm/dd,hh:mm:ss+00

with a second delay between the command and the actual time, then recheck the SIM card time, repeat as necessary. 

Next is to send a sms, so send the command 

AT+CMGS="number to send to here"

including the country prefix and area code, so it'll look like this for the US 

AT+CMGS="19995551234"

Then click send, it'll prompt with a 

>

Type the message you want to send after the >, then click send, then click SendHEX and type 1A, then click send, this tells the SIM900 you finished the text and want to send. To which then you should receive the response,

+CMGS: 31

OK

meaning the text successfully sent, with the number 31 being the number of how many successful texts you've sent from the SIM card, so it should show 1 for everyone's first time. If you receive a response from the person you just texted it should look like this

+CMTI: "SM",26

with the number being the amount of received texts, same idea as explained above. To read a sms use the command 

AT+CMGR=26

Where the number 26 is the number of the received sms, or you can list all messages received with the command

AT+CMGL="ALL"

One problem I did run into is you can hit a limit of sms received when the SIM card's storage is full, at which point you must delete one or all to receive more. Trust me, I plan on fixing this in the future by adding some type of external storage, but right now just delete them. To delete a single sms use 

AT+CMGD=numbered text

and to delete all use 

AT+CMGL=1,4

more details on this command is found in the AT reference.

Next if you'd like to pace a call, its really quite easy but took me hours to figure out, make sure your headphone/microphone is plugged in, then use the command 

ATDnumber to dial;

that last semi-colon is what took me hours to figure out, so don't forget it, if you get No Carrier response you probably forgot it. To hang up the call just sent the command

ATH

To answer an incomming call use the command

ATA

You now have basic phone functionality, I will update will any new features or additions I make

Discussions