Increasing the length of Serial Buffer in Arduino

While communicating with serial devices via Arduino, sometimes Arduino do not receive or send complete messages, especially when we communicate with LCDs or with GSM. While reading SMS via GSM Module, Arduino does not retrieve complete message because Serial buffer is full as the buffer length of Arduino is limited to 64 bytes only.

To increase buffer size or length of Arduino, there is a simple solution:
Follow these steps:
1. Go to “arduino\hardware\arduino\avr\cores\arduino”
2. Edit “HardwareSerial.cpp” in Notepad
3. Search for “#define SERIAL_BUFFER_SIZE 64”
4. Change it to “#define SERIAL_BUFFER_SIZE 256”
5. Save and enjoy!!

View of File:

Arduino Serial Buffer

How to change Serial Buffer Size of Arduino:

3 Comments on “Increasing the length of Serial Buffer in Arduino”

  1. I like the valuable information you provide in your articles. I’ll bookmark your weblog and check again here frequently. I am quite certain I’ll learn lots of new stuff right here! Good luck for the next!

  2. We’re a group of volunteers and opening a new scheme in our
    community. Your site offered us with helpful information to work on. You’ve performed a
    formidable process and our whole community will probably be thankful to you.

Leave a Reply

Your email address will not be published.