esp8266 / Arduino

ESP8266 core for Arduino
GNU Lesser General Public License v2.1
16.05k stars 13.33k forks source link

WiFiClientSecure doesn't work together with ESP8266WebServer #1773

Closed PiDiBi closed 8 years ago

PiDiBi commented 8 years ago

Basic Infos

Hardware

Hardware: ESP-8266 - Wemos D1 mini Core Version: 2.1.0?

Description

Hi, I'm sending data over WiFiClientSecure - everything works fine, but after adding only this line

ESP8266WebServer server(80);

WiFiClientSecure stops to send data. Probably some problem with non reentrant IP Stack? any idea how to solve it?

bytesWritten = tlsClient.print(buildHttpRequest(serializeData(data))); returns some bytes if it works and zero after adding (declaring) ESP8266WebServer

igrr commented 8 years ago

I think there is not enough RAM for WiFiClientSecure to work along with the web server. WiFiClientSecure RAM usage peaks at 22kb-25kb, so I can imagine that adding a WebServer will make it run out of RAM, hence it will be unable to send or receive anything.

PiDiBi commented 8 years ago

version with server (not working) before sending - Memory 33576 after sending Memory 33640 version without server (working) - before sending - Memory 39184 after sending Memory 20080

PiDiBi commented 8 years ago

you are right, it works in new sketch with server and client only I will investigate more about it ...

jindrichsirucek commented 7 years ago

Hi, igrr can You explain why the WiFiClientSecure takes so much of RAM? Its happening to me, whe I connect to Google servers it takes 20kB.. but when I connect to my website it consumes only 10kB.. What is the reason, is it possible to change it somehow? another library or infulenci it in any ways please?