micropython / micropython

MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems
https://micropython.org
Other
19.4k stars 7.76k forks source link

SSL [Errno -1] ERR_MEM #6065

Closed CassioCioniCarmo closed 4 years ago

CassioCioniCarmo commented 4 years ago

I'm trying to make a secure connection between esp32 and a website. during the ssl module the memory error is displayed. the generated certificate has the following settings (x509 sha256 rsa: 2048) the error is [Errno -1] ERR_MEM

tve commented 4 years ago

You're running out of memory... Each TLS connection requires ~20KB of buffers in the esp-idf heap (not the MP heap). If you are not maxing out the MP heap you could make it smaller, leaving more memory to esp-idf. To do so, you have to change the heap allocation done in main.c

dpgeorge commented 4 years ago

I see this issue was also posted at https://github.com/pycom/pycom-micropython-sigfox/issues/451 . What board and version of MicroPython where you running when you got the error?

CassioCioniCarmo commented 4 years ago

(sysname='LoPy4', nodename='LoPy4', release='1.20.2.rc7', version='v1.11-6d01270 on 2020-05-04', machine='LoPy4 with ESP32', lorawan='1.0.2', sigfox='1.0.1', pybytes='1.4.0')

it is a Pycom board (board L04, 1.20.2.rc7), it is the last release I cannot say the version of the micropyton.

dpgeorge commented 4 years ago

The firmware you are running is not built from this repository, it is Pycom specific firmware. So you'll need to ask them for support.