SoftwareSerial Library RX Buffer Size

Hi there:

I have changed the size of RX buffer in SoftwareSerial library (working in Arduino 1.0) from 64 to 256.

#define _SS_MAX_RX_BUFF 256 // RX buffer size //BEFORE WAS 64

If not, my program does not work.

I am just asking in there is any possible problem for doing that. If not, why is this value so small?
With this new value I am using, which memory is reduced? from where is taking the memory?

Thanks.

It's using RAM. RAM is a scarce commodity on the ATmega which is why the buffer size was set so low.

Perhaps your protocol needs some kind of flow control.

Thanks for the info.

I need little RAM for this project.. so at the moment i will leave that value for buffer size.

Why do you need such a large buffer? You might compact the strings before sending.

e.g. if a string is "analogread A0" to send the command to read from an analog port . Such command could also be "AR0" which is 4x as short. with 2 chars for command you can have 36x36 commands > 1000, so that should work for most systems. Another advantage is that parsing the commands is easier and faster for short commands. Only drawback is human readability but by using "meaningful"acronyms like AR and DR and DW etc this is no big problem.

2 cents,

Thanks for the ideas. However in my case I am reading SMS from a modem and that size is not enough.

Understand it now better why you did

Hi Profpacco,

I'm facing the same problem as you, I've tried to read PDU (SMS) from mobile, but the string read is limited to 63 chars, did you find a workround to this limitation, Thanks

HI

I also have the same problem and i tried changing the buffer size but still serial monitor does not show the message. Is the command for version 1.0.6 different?

Hi,

Working with an Arduino UNO in 1.6.2, how can I check the size of the RX buffer in my SoftwareSerial library? (And modify it if necessary?) I'm not a total newbie but am new at dealing with libraries, and RX buffers. Thanks in advance.

Never mind. Figured it out.

What was it? :o

Err yes please ... what was the answer? :zipper_mouth_face: