httparduinosim900sim800l

Arduino UNO - SoftwareSerial limit too low


I am using arduino UNO board, with modem sim800l. I want use it to send data to server, but the problem is that my url gets truncated. I tried to overwrite the default limit of this library before and after I include it but I get the same problem.

#define _SS_MAX_RX_BUFF 256
#include <SoftwareSerial.h>
#define _SS_MAX_RX_BUFF 256

My url looks like this:

 mySerial.println("AT+HTTPPARA=\"URL\",\"http://two-words-domain.ro?data1=1&data2=2&data3=3...\""); 

And in the serial I see that the url get truncated somewhere 60-64 characters. Is there any solution for this?


Solution

  • You can't change the buffer like that: the software serial library is already compiled when the compilator reaches your sketch so it won't be compiled using your #define.

    In order to change the buffer size, you have to do it in the library. You can find an example of that here (as an extra they are using the same modem).

    Hope it helps,