my application is using a GSM module to answer phone calls, to read/write SMS and to send data as a Webclient to a server.
The GSM module sometimes needs waiting times to wait for a response. During this waiting times phone calls and SMSs may come in which generate long strings on the serial RX, longer than 64 bytes.
I see as possible solutions:
1) slow down baud rate to 1200 or less --> everything will be slow and the question remains how slow shall be the baud rate for a reliable application, not to loose any SMS or phone call
2) write the GSM control software as a state machine avoiding waiting times with delay(..) --> it will be a very complicated software (I know that the GSM library for Arduino is a state machine. But it uses SoftwareSerial which is not suitable in my application. I tried it and had severe problems. I need an UART. In the forum you can find a lot of questions when the GSM library will be available for hardware serial. The response is: because the software is a state machine the change takes months of rework...)
3) Use an UART instead of SoftwareSerial. It seems to me the easiest way. And that is the reason for my question.
Meantimes I got an idea:
If my application contains
define SERIAL_RX_BUFFER_SIZE 256
at the very beginning then this might overwrite the #define in HardwareSerial.h, and the change is valid only in the specific application, not generally.