i use a baud rate of 9600 between gsm modul and arduino.
i have reused some of the code from
http://tinkerlog.com/2009/05/15/interfacing-arduino-with-a-telit-gm862/ and updated some parts of it to work with arduino 1.0.
the receive loop looks like this at the moment. its was not modified by me, but i think it is not the reason for the currupt data, which is returned.
the function looks like at the moment
byte GM862::getsTimeout(char *buf, uint16_t timeout) {
byte count = 0;
long timeIsOut = 0;
char c;
bool found = false;
memset(buf, 0, BUF_LENGTH);
timeIsOut = millis() + timeout;
while (timeIsOut > millis() && count < (BUF_LENGTH - 1)) {
if (modem->available() && !modem->overflow()) {
c = modem->read();
count++;
*buf++ = c;
timeIsOut = millis() + timeout;
}
}
if (count != 0) {
*buf = 0;
count++;
}
return count;
}
then the normal parts to initialize the soft serial port and set baud rate of 9200.
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
modem = modemPort;
modem->begin(9600);
after this some AT commands are transmitted, but it is irrelevant, because the transmit data is ever called by the modul, which is visible on the returned data. one thing, would be possible is, that this are binary debug information, but i cant find something about this in the docs.