Hello community ! I'm new at this forum, so i don't know the correct syntax of an post. In the future i will do it better
my question :
I bought a sim900 module on ebay. After i connected it with my arduino via TX,RX i wrote a script to communicate with this module. First i setup the serial monitor for looking whats going on. After i started the communication with the module, i get strange characters at the monitor. The characters looks like an question mark ? The communication between the devices is possible, but everytime when the mystery characters appears, my next command doesn't work. The module interacts by the second command.... what confuse my hole script in future. Why are there question marks and how can i correct it ?
The time between the signs is not allways the same. Sometimes they even didnt come, just one time...
I hope someone have had the same problem and found a solution.
By the way, sorry for my english :-X
#include <SoftwareSerial.h>
SoftwareSerial GPRS(7,8);unsigned char buffer[64];
int count=0;void setup()
{
GPRS.begin(9600);
Serial.begin(9600);
}void clearBufferArray()
{
for (int i=0; i<count;i++)
{
buffer*= NULL;*
- }*
}
void loop()
{- while(GPRS.available() > 0)*
- {*
- buffer[count++]=GPRS.read();*
- if(count == 64) break;*
- }*
- Serial.write(buffer,count);*
- clearBufferArray();*
- count = 0;*
- if (Serial.available()) {*
- byte b = Serial.read();*
_ if ( b == '*')_- GPRS.write( 0x1a );*
- else*
- GPRS.write(b);*
- }*
/quote]