0
votes

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?

1
SoftwareSerial is compiled separately from your sketch, it is quite sure that your #define do not have any effect. You would have to do that in the library.Tom
Instead of trying to change the hardcoded _SS_MAX_RX_BUFF, try to shorten your params, for example instead of data1=1 to d1=1, that will allow you to pack in a few extra params with your url. If that's still not enough, you may want to consider to send the data as part of HTTP body instead of HTTP params.hcheung

1 Answers

0
votes

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,