Closed DavidRochaHenrique closed 3 years ago
Hi,
I didn't read all the code in details but I have 3 comments.
First, the library is not designed to send and receive SMS :-). This is why the library name is SIM800L HTTP connector
(I admit that the repository name is confusing ;-).
Second, you mentioned the HTTPS routine doesn't work with the line:
if (false) {uint16_t rc = sim800l-> doGet (URL, 10000); }
It is normal because the if statement is always false. The snippet between {} is indeed never executed.
Third, regarding the few lines you wrote:
void configGSM() {
Sim800l.print("AT+CMGF=1\n;AT+CNMI=2,2,0,0,0\n;ATX4\n;AT+COLP=1\n");
}
I personally avoid to send all the command at once and let the MCU of the module manage the commands one by one. It is safer in embedded systems ;-)
KR, Olivier
I am using the example "HTTPS_GET_SoftSerial" to read data from a server and it works fine. But when I try to read the SMS message, sending the following configuration beforehand, the SMS bytes come in with problems.
If I use only the SMS reading code, it will also work well.
The curious thing is that the HTTPS routine does not run in my code. I put the following line:
if (false) {uint16_t rc = sim800l-> doGet (URL, 10000); }
That is, the interference between functions occurs only because the code is compiled.