Engineering and technology notes

Expanding Arduino Serial Port Buffer Size

Software Serial Buffer Expansion

The change for software serial ports require a simple modification of the file:

<base Arduino folder>\hardware\arduino\avr\libraries\SoftwareSerial\SoftwareSerial.h

Change:

__#define _SS_MAX_RX_BUFF 64 // RX buffer size

To:

__#define _SS_MAX_RX_BUFF 256 // RX buffer size

Hardware Serial Buffer Expansion

The change for hardware serial ports require a simple modification of the file:

<base Arduino folder>\hardware\arduino\avr\cores\arduino\HardwareSerial.h

Change:

__#define SERIAL_TX_BUFFER_SIZE 64
__#define SERIAL_RX_BUFFER_SIZE 64

To:

__#define SERIAL_TX_BUFFER_SIZE 256
__#define SERIAL_RX_BUFFER_SIZE 256

Btw, you can copy the SoftwareSerial.cpp and h files from the Arduino directory in to your project directory and then include it with “(quotation marks) instead of the < (pointy brackets). If you do this, make sure to also change the #include <SoftwareSerial.h> in your copy of SoftwareSerial.cpp to “SoftwareSerial.h”.
~you use <pointy brackets> to include files from arduino libraries and
“quotes” to include from project directory.

Source: Internet of Home Things » Expanding Arduino Serial Port Buffer Size

Free Modbus Master Simulator and Test Tool

Download archive into a folder. Then unpack the tarball:

tar xzf modpoll.tgz

The tarball contains multiple binaries for different CPU architectures. Add the version matching your system architecture to the path. Example for ARM platforms like Raspberry Pi:

export PATH=$PWD/modpoll/linux_arm-eabihf:$PATH

Then run modpoll:

modpoll -h

Source: Free Modbus Master Simulator and Test Tool