Hi,
I have been testing the following sim900 module but suddenly it started generating strage character to any AT command: %Ôש ÿÿÑ ”í÷Žÿ£JKÿí÷Žÿ£JKÿí÷ný£JKÿí÷Žÿ£JKÿí÷Žk5©©í÷Žÿ£JKÿí÷Žÿ£JKÿí÷Žÿ£JKÿí÷ÿ£JKÿÿÿyÜ«fŸíy\«æŸíy\«æŸíyÄ«æÏíy
This is the module I'm using:
It seems suddendly it is not recognizing the AT commands.
I have connected the pin 0 and pin1 of this shield with pin 7 and pin 8 of Arduino.
I fear I have modified something whic is not guarantee the comunicatio.
Is there any way to reset the factory parameters?
How can I set the serial speed not being able to send AT command?
Here is the code I put onArduino for testing the communication:
#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);
Serial.println("Ci sono"); // 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*
}