Go Down

Topic: Problem with reading string from GSM (Read 3163 times) previous topic - next topic


AWOL.  The unit I'm running as mentioned before is not a 16Mhz processor.  It is an 8Mhz processor.  Processor speed has nothing to do with the software buffer either.  Looking at the TinyGPS library support forms they also recommend increasing the software buffer from the NewSoftSerial Library to 256 byte from 64 bytes.  The Hardware Serial buffer is a different item all together.  If you look at the data stream i posted above you will see that including terminators I was receiving 84 bytes of data at 9600bps from the GSM module(including 2 byte terminators).  This means that 20bytes of data were being truncated and not stored in the software buffered in the NewSoftSerial library.  For small information being sent this is not a problem but for large strings of data such as in my case and in the case of NMEA data from a GPS module using a "virtual Software Serial port" needs extra space and needs to be adjusted accordingly.     The hardware serial buffer is 128bytes.  As you can see if I were to reverse the pin out and make the Software Serial hooked up to the computer and the Hardware serial hooked to the GSM the problem goes away because of the buffer size difference.  No i didn't need to make the buffer 256bytes, 128bytes would have been fine but I'd rather have overkill when there is room in the code to do it. 

Thanks again for your input.


You're quite right, I did miss the fact that your processor has only 8 300 instruction cycles per received character period to process the incoming data, and not 16 600.
I apologise.

I did, however notice that you'd provided a one hundred character buffer for the received data in your sketch.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

Go Up