Skip to content

WiFiClientSecure gets stuck with bad connection #3675

Closed
@aignatiev

Description

@aignatiev

Basic Infos

Hardware

Hardware: ESP-12
Core Version: 2.3.0

Description

The problem is that WiFiClientSecure gets stuck when the WiFi connection is weak. It just gets stuck for a random amount of time, usually it's just less than a minute or two, but at least once it was stuck for 20 minutes. It does not restart, it does not print any debug messages, it's just stuck. The test with 20 minutes was done by using a phone as a hotspot and slowly walking away from the ESP, the ESP continued to be stuck even when the phone was brought closer, the ESP continued to function normally only after the hotspot was switched off. I also tried to apply the fix listed in #3537, but it didn't seem to help.

Additional info: I'm making a sensor that logs data to flash memory whenever there is no internet, and uploads this data to Amazon AWS Lambda function whenever there is internet. The samples should be taken arond every 16 seconds and these random delays are no good. Would also be nice to control the timeouts, because the data can always be resent from memory. Please help me to fix this problem or give any advice how to overcome this.

Sketch

WiFiClientSecure client;
...
char * buffer[1000] = "Long JSON here";
client.write(buffer, strlen(buffer));

Debug Messages

none

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions