-
-
Notifications
You must be signed in to change notification settings - Fork 749
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
ESP32: https request no longer works #1613
Comments
yes , I have verified same problem on version 2.01 for ESP32 but ESP8266 still working fine for https, on same version. |
Working:
|
Got this working by reducing jsvars. The current esp-idf build is using more heap. Looking at reducing the dynamic buffers - also set to 16 top buffers when 10 in the past. |
Normal Espruino builds actually allocate space for HTTPS out of JsVars and that was disabled for ESP32 - potentially that could be re-added I guess? |
@wilberforce, did you check minHeap in ESP32.getState ? |
Ah - thanks - that explains it. |
@jumjum123 - I don't think free heap is that large on the current travis build - perhaps 32k. I also recall there was a https buffer size setting in espruino - as the default is something like 15k. A bit more reseach! |
Looking at the available heap in the versions above v2 has much more heap than v3! It looks like the callow used can be changed here: https://github.com/espressif/esp-idf/blob/master/components/mbedtls/Kconfig And the buffer size from 16k to 512 and also turn off suites not used to match the espruino/mdebtls/config.h |
Nice, do you like to share some details using https with ESP8266? |
But let's get back to how we'll fix this. |
I can confirm that this is a FIXED issue on v2.04 for BOTH ESP32 and ESP8266 I suggest this issue is marked "SOLVED" This was the code I used in BOTH devices successfully. Write up with screenshots and details is here: http://forum.espruino.com/conversations/330049/#comment14873565
|
@wilberforce I see this in v2.04 on ESP32. I'm struggling to understand what the solution is from the issue thread, although it's closed. Are there any pointers you can provide? |
With some sdk updates, related to ble, the mbedtls was switched from the esprunio version, for the esp-idf version. This was due to functions that the ble code used that was not in the espruino version( it is behind the esp-idf version). The espruino code was modified to use jsvars as memory buffers, so the current implementation is trying to allocated from the heap and there is not enough free memory for this. |
Appreciated. Thanks. So the standard builds not very useful for http. You do a custom build to get past this? Any tips? Sorry, I’m really late to the ESP32 - my first one landed this weekend. All flashed and connected, just not very useful as is :)
…Sent from my iPhone
On 13 Oct 2019, at 11:15, wilberforce <[email protected]<mailto:[email protected]>> wrote:
@olliephillips<https://github.com/olliephillips>
With some sdk updates, related to ble, the mbedtls was switched from the esprunio version, for the esp-idf version. This was due to functions that the ble code used that was not in the espruino version( it is behind the esp-idf version). The espruino code was modified to use jsvars as memory buffers, so the current implementation is trying to allocated from the heap and there is not enough free memory for this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1613?email_source=notifications&email_token=ABWIVA4KA6BBBLKCO6G76ODQOLYLTA5CNFSM4GUB7TCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBCTBIY#issuecomment-541405347>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABWIVA5KAIP6AVDFI3CV2RLQOLYLTANCNFSM4GUB7TCA>.
|
@olliephillips A work around for a custom build would be to reduce the number of jsvars, so that these is more heap space left. |
1 similar comment
@olliephillips A work around for a custom build would be to reduce the number of jsvars, so that these is more heap space left. |
@olliephillips A work around for a custom build would be to reduce the number of jsvars, so that these is more heap space left. |
Sorry yes https. I’ll look at building with fewer jsvars. Thanks for your help @wilberforce
…Sent from my iPhone
On 13 Oct 2019, at 23:30, wilberforce <[email protected]<mailto:[email protected]>> wrote:
@olliephillips<https://github.com/olliephillips>
You mean https? - it should be fine for http.
A work around for a custom build would be to reduce the number of jsvars, so that these is more heap space left.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1613?email_source=notifications&email_token=ABWIVAYOIDOUSN6RGNQOQSTQOOOPRA5CNFSM4GUB7TCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBDB2YQ#issuecomment-541465954>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABWIVA3BFVCTGDPIALMEF3TQOOOPRANCNFSM4GUB7TCA>.
|
@olliephillips did you get https working? If yes please share your changes - thanks. |
Hey Mark, I didn't, no. I had a go at it, but quickly parked it I recollect, and I've not had much time to spend with Espruino recently. |
@MaBecker I've tried it with three different heapsizes/heapvar configurations. As you have recommended here:
Now that I got HTTPS working, I still can't make use of it due to the handshake error above. Did anyone encounter this issue and solve it? |
Hi @MaBecker , any chance you would find a minute to have a look at my previous comment :) ? |
Hi 23RoMax, sure, please share the url that is causing the Your build is using this: heapVars = (esp_get_free_heap_size() - 70000) / 16; Have you removed some modules ? If you like we can chat over gitter.im. |
Thank you! The first endpoint I tried was Another one I am successfully using with http requests is: Also My latest build that seemed stable was with I noticed that anything higher caused issues and crashes. I don't have a gitter.im account yet, will set one up. Thank you for your help! |
Ok, I also disabled the dynamic var allocation by commenting Line 40 in 808f7af
and set Line 22 in 808f7af
to 1800. this will give you a very large heap space |
It is all about free heap space - best choice is to buy a ESP32 Wrover board because it has PSRAM. |
See:
http://forum.espruino.com/conversations/330049/#comment14604279
The text was updated successfully, but these errors were encountered: