-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic .../Library/Arduino15/packages/esp8266/hardware/esp8266/2.0.0/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp:404 ax_port_realloc #1159
Comments
you run out of ram. we have also a http client library ready to use: |
I try to build a String before and then perform just one client.print but I got the same result. |
currently there is no example. HTTPClient http;
http.begin("https://domain/post.php");
http.addHeader("Content-Type", "application/x-www-form-urlencoded");
http.POST("from=user%40mail.com&to=user%40mail.com&text=Test+message+post&subject=Alarm%21%21%21");
http.writeToStream(&Serial);
http.end(); |
I got the same Panic .....Arduino15/packages/esp8266/hardware/esp8266/2.0.0/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp:404 ax_port_realloc trying https://github.com/Lstt2005/ESP8266_I.O.Broker/tree/master/Arduino/Telegram/TelegramBot-master with release 2.0.0 of https://github.com/esp8266/Arduino and Arduino IDE 1.6.5. How can I fix it? |
according to links2004 it all works fine, it's some memory issues related to your/mine program, even if I measured I I had 3304 free... I'm still haven't seen a solution |
SSL / https needs ~22KB ram so 3.3KB is fare away from it. |
The ESP8266 has got 45KB RAM. Is it a good idea to use SSL on the ESP8266, because SSL needs half of its Memory? |
based on the application it i working just fine, |
ESP has 64 KB instruction RAM and 96 KB data RAM. The 45KB what you are talking about is heap. @Links2004 Please correct me if I am wrong. |
I learned that RAM fragmentation causes this ax_port_realloc issue. (#1084) |
@itsjustvenky yes we are taking about the heap, 96KiB "data RAM" are splittet:
64KiB "instruction RAM" are splittet:
@MarcusF2015 yes heap / ram fragmentation can causes this. since SSL needs a the space in heap in one piece. |
@Links2004 Thanks for the information. |
@Links2004 thanks for your all info Do you have any tip to solve it? |
fragmentation can not by solved that easily but using a static buffer for SSL will help. |
This worked for me (at last....), POST to Ubidot. What I was missing was the "writeToStream", I had assumed that the POST function would do that automatically.
of course you'd have to change the JSON payload to fit whatever you try to send. |
While we don't have a solution for fragmentation now, we do have a workaround. axTLS will attempt to handle realloc failure by shutting down the connection. Hopefully user code can handle this in a similar way connection failure is handled, i.e. by attempting to connect again. |
Trying to execute a simple post but always get this exception...
anyone knows how to fix it?
Panic .....Arduino15/packages/esp8266/hardware/esp8266/2.0.0/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp:404 ax_port_realloc
ctx: cont
sp: 3fff24f0 end: 3fff28c0 offset: 01b0
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld
waiting sensor calibration...
init...Joining Wifi Network
Connected to VM298111-2G
Exception (28):
epc1=0x4021b8c0 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000011 depc=0x00000000
the code
client.print("POST WHATEVER URL HTTP/1.1\n\n");
client.print("Host: mailgun.net\n");
client.print("Connection: keep-alive\n");
client.print("Content-Length: 91\n");
client.print("Cache-Control: max-age=0\n");
client.print("Authorization: Basic 64EncodedKey \n");
client.print("User-Agent: ESP8266 \n");
client.print("Content-Type: application/x-www-form-urlencoded\n");
client.print("Accept-Encoding: gzip, deflate\n");
client.print("Accept-Language: en\n\n");
client.print("from=user%40mail.com&to=user%40mail.com&text=Test+message+post&subject=Alarm%21%21%21")
The text was updated successfully, but these errors were encountered: