I’m using a HTTPS connection to Firebase that works fine for about eight connections then it freezes up and I get this message:
HttpRequest failed (error code -3011)
----- HTTPS POST response -----
Status: -299947181 - Þp&2*¦&Ö×`°
Headers:SIGABRT: Abnormal termination
This can be at 1 minute or 1 hour intervals, so not so much about time but frequency of posting.
Here’s the code part that trips up:
post_req->set_header("Content-Type", "application/json");
HttpResponse* post_res = post_req->send(data, strlen(data));
if (!post_res) {
printf("HttpRequest failed (error code %d)\n", post_req->get_error());
}
printf("\n----- HTTPS POST response -----\n");
dump_response(post_res);
delete post_req;
Firstly why? and secondly how can I recover and resend? the system freezes.
Would it be advisable to disconnect the ESP8266 from the AP at the end of the post and reconnect at the next update?
I’ve used the ESP8266 in an application before connected to the AP for several months without issues.
Hardware:
STM32F767ZI using ESP8266 Wi-Fi @ 230400 baud
MbedOS rev.7063
On-line compiler