SIM900 Problem running arduino UNO examples

Post Reply
perikles
Posts: 5
Joined: Wed Mar 25, 2015 3:24 am

SIM900 Problem running arduino UNO examples

Post by perikles » Wed Mar 25, 2015 3:32 am

Yesterday I bought a SIM900 shield and tried to run arduino examples on it. I load sketches from the GSM examples and all of them are failed to pass the SETUP function

while (notConnected)
{
if (gsmAccess.begin(PINNUMBER) == GSM_READY)
notConnected = false;
else
{
Serial.println("Not connected");
delay(1000);
}
}

It seems that it loops inside the function gsmAccess.begin(PINNUMBER) for ever. My SIM card does not have any PINNUMBER so I left it as "" which is the default value for the selected example loaded. Is there any suggestion how to solve this problem.

Thanks in advance for any help

perikles
Posts: 5
Joined: Wed Mar 25, 2015 3:24 am

Re: SIM900 Problem running arduino UNO examples

Post by perikles » Wed Mar 25, 2015 3:50 pm

Additional information:
1) the SIM900 lights every 3 seconds (seems that recognizes the VODAFONE network)
2) when I call this SIM number with my mobile it is called OK (I heard the related sound OK)
3) the SIM900 shild it set to work with software settings (default value)

but ..... the arduino example codes does not work !!!!!!

Help ................

zhangxueyou
Posts: 1405
Joined: Fri Feb 06, 2015 1:33 pm

Re: SIM900 Problem running arduino UNO examples

Post by zhangxueyou » Wed Mar 25, 2015 4:12 pm

Sorry, we have never used Arduino GSM examples. You can refer to users manual to operate, or refer to the codes on wiki.

perikles
Posts: 5
Joined: Wed Mar 25, 2015 3:24 am

Re: SIM900 Problem running arduino UNO examples

Post by perikles » Wed Mar 25, 2015 6:14 pm

Is it possible to send me any code that you have tested in order to SEND a simple SMS using the SIM900 board because I open the wiki page and the code is to complicated and according to the documentation does a lot of things at once. The hardware installation that I have done is the following (plug the SIM900 board just upper the arduino UNO board). Ths SIM900 has the default hardware settings (software settings as default).

Please send me any tested code to periklesk@yahoo.com
Thank you in advance for your responce

zhangxueyou
Posts: 1405
Joined: Fri Feb 06, 2015 1:33 pm

Re: SIM900 Problem running arduino UNO examples

Post by zhangxueyou » Thu Mar 26, 2015 5:14 pm

The codes we use to test are from wiki.
You can refer to user manual to connect hardware.
Connect pin 1,pin 2 of UNO to pin 8, pin7 of GPRS module.

perikles
Posts: 5
Joined: Wed Mar 25, 2015 3:24 am

Re: SIM900 Problem running arduino UNO examples

Post by perikles » Fri Mar 27, 2015 12:34 am

As you can see from the attachment I follow your instructions, load the following sketch to arduino:

//Serial Relay - Arduino will patch a
//serial link between the computer and the GPRS Shield
//at 19200 bps 8-N-1
//Computer is connected to Hardware UART
//GPRS Shield is connected to the Software UART
#include <SoftwareSerial.h>
SoftwareSerial GPRS(7, 8);
unsigned char buffer[64]; // buffer array for data recieve over serial port
int count=0; // counter for buffer array
void setup()
{
GPRS.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the Serial port of Arduino baud rate.
}
void loop()
{
if (GPRS.available()) // if date is comming from softwareserial port ==> data is comming from gprs shield
{
while(GPRS.available()) // reading data into char array
{
buffer[count++]=GPRS.read(); // writing data into array
if(count == 64)break;
}
Serial.write(buffer,count); // if no data transmission ends, write buffer to hardware serial port
clearBufferArray(); // call clearBufferArray function to clear the storaged data from the array
count = 0; // set counter of while loop to zero
}
if (Serial.available()) // if data is available on hardwareserial port ==> data is comming from PC or notebook
GPRS.write(Serial.read()); // write it to the GPRS shield
}
void clearBufferArray() // function to clear buffer array
{
for (int i=0; i<count;i++)
{ buffer=NULL;} // clear all index of array with command NULL
}

.Upload the sketch to the Arduino board.
.Download and fire up serial tool if you don't have one. Choose the correct COM port for Arduino, and set it to operate at 19200 8-N-1 and then click "Open Com".
.You can power on or off the the SIM900 by pressing the button about 2 second. After power on, the red LED will be on, and the green one beside it will blink and the shield has found the net if it blinks every 3 seconds.

Also, in the serial monitor you should see messages from the shield such as RDY

+CFUN: 1

+CPIN: READY

Call Ready

but nothing comes to my arduino serial monitor !!!!!!!
Please tell me your suggestions about ....
Thanks in advance
Attachments
rsz_20150326_165655(1).jpg
hardware connections
rsz_20150326_165655(1).jpg (145.41 KiB) Viewed 18764 times

freealpha
Posts: 2
Joined: Sun Apr 05, 2015 12:04 pm

Re: SIM900 Problem running arduino UNO examples

Post by freealpha » Sun Apr 05, 2015 12:51 pm

Same problem using the same sketch.

I also tried to use the Hardware Serial settings .. still nothing from the serial monitor with the same wiki example.

Any updates please???

freealpha
Posts: 2
Joined: Sun Apr 05, 2015 12:04 pm

Re: SIM900 Problem running arduino UNO examples

Post by freealpha » Sun Apr 05, 2015 12:55 pm

Same problem with same sketch. Even tried using the Hardware Serial option.

Did you get it working Perikles?

perikles
Posts: 5
Joined: Wed Mar 25, 2015 3:24 am

Re: SIM900 Problem running arduino UNO examples

Post by perikles » Tue Apr 07, 2015 2:09 pm

I am still reading the manual carefully.

zhangxueyou
Posts: 1405
Joined: Fri Feb 06, 2015 1:33 pm

Re: SIM900 Problem running arduino UNO examples

Post by zhangxueyou » Wed Apr 08, 2015 10:55 am

1. Use serial port of hardware+ AT command:
1) Find an UNO board that is not burnt with firmware (If there has been firmware exists in UNO, please burn with an empty file).
2) Plug the GPRS module on UNO board. Connect RX(pin 0)of UNO and TX (D8) of GPRS with Dupont. Connect TX(pin 1) of UNO and RX(D7) of GPRS. Dupont can extend pin 0 and pin1 of GPRS and UNO.(UNO is mainly use to firming and providing power. Not folding UNO and GPRS is also a choice, with using Dupont alone to connect).
3) Open "ScomAssistant", choose correct serial port (Please set COM port from COM1-COM4, others cannot be recognized). Baud rate is 9600.
4) Keep pressing "PWRKEY" button to start GPRS module.
5) Input commands refering to users manual's steps.

2. Codes
You can also burn the codes into UNO without connecting Dupont and AT commands.
1) Plug GPRS module on UNO board.
2) Copy the codes of appendix of user manual to Arduino IDE (You can also copy the codes in wiki , wiki link: http://www.geeetech.com/wiki/index.php/ ... PRS_Shield)
3) Turn "{mySerial.println("ATD+ +86138xxxxx615;")}" of "void DialVoiceCall()" function into the number of people you are calling.
4) Compile and upload the codes.
5) Keep pressing "PWRKEY" button to start GPRS module.
6) Open serial port monitor of Arduino IDE, set Baud rate to 19200. Input "d", the called party's phone will display incoming calling.
7) As for other funcitons, you can refer to users manual.

Post Reply