Pages: [1]   Go Down
Author Topic: SIM900 Shield SoftwareSerial Problem  (Read 156 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am pretty new to Arduino and here's my case.

I've got a SIM 900 shield (http://www.lankatronics.com/modules-and-sensors/gsm-gprs/sim900-gsm-gprs-shield-development-board.html) and I have stacked it on to a Arduino UNO board. The jumpers on the SIM900 shield is for softwareserial communication. I have used the code that is mentioned in the link, but when I open up the serial monitor nothin is shown. I tried sening AT commands using SScom, but nothing happens.

From the little I know i assumeit is not communicating using pin 7,8.

Any help is highly appreciated.
Logged

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 89
Posts: 3464
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please post the program that you are using. 
Is SoftwareSerial actually using pins 7 and 8 ?
Do you need to do anything, set a jumper maybe, to tell the board to use SoftwareSerial instead of hardware serial ?
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The documentation says it is using 7, 8. Jumpers are set to use softwareserial.

Here's the program:

Code:
//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[i]=NULL;}                  // clear all index of array with command NULL
}

Logged

Italy
Offline Offline
Newbie
*
Karma: 0
Posts: 40
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Isn't to high the baud rate? Never seen it over 11000 (circa)
Logged

Italy
Offline Offline
Newbie
*
Karma: 0
Posts: 40
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Isn't to high the baud rate? Never seen it over 11000 (circa)

I read something, and maybe not!

Try a completely different sketch and compare problems, check if led on the SIM900 are ok!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried a couple of other codes I found on the internet as well, but nothing is happening.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It seems like the communication is not taking place between the arduino board and the SIM900 shield. Any ideas why this might be and any suggestions to resolve this?
Logged

Pages: [1]   Go Up
Jump to: