ArduinoSIM800L icon indicating copy to clipboard operation
ArduinoSIM800L copied to clipboard

readBuffer & readSignalStrength

Open pixelfriese opened this issue 4 years ago • 1 comments

Hi,

can someone verify the following two things:

In the readBuffer function, >= should be used instead of > in the following two places. Without this change I get an error message and the ESP32 reboots: "Stack smashing protect failure!"

https://github.com/carrascoacd/ArduinoSIM800L/blob/f4f40b97b193c57cf27d05aef13677f6e99ce18c/src/Sim800.cpp#L70 https://github.com/carrascoacd/ArduinoSIM800L/blob/f4f40b97b193c57cf27d05aef13677f6e99ce18c/src/Sim800.cpp#L73

Another thing is the readSignalStrength function. Returning AT+CSQ is much shorter. The length of the buffer should be 24 instead of 32. Without this change, the readBuffer function runs into timeout:

https://github.com/carrascoacd/ArduinoSIM800L/blob/f4f40b97b193c57cf27d05aef13677f6e99ce18c/src/Http.cpp#L163

pixelfriese avatar Jan 07 '21 17:01 pixelfriese

Thanks for your issue @pixelfriese. Do you mind creating a PR with the changes that you suggest so I can check them?

carrascoacd avatar Apr 03 '21 15:04 carrascoacd