-
• #2
Disable BLE and try again
-
• #3
and try this simple snippet
https://github.com/espruino/Espruino/blob/master/targets/esp32/tests/get_web_page_https.js
-
• #4
When detect command - BLE is disable in sketch then all other commands after that is break...
-
• #5
Of course first of all I try to use simple request https w/o options ca,key and cert. But result is @No enough memory" when call setup_ssl.
-
• #6
Not fix and Heap less then before BLE was enable.
1 Attachment
-
• #7
can you build the firmware?
If yes, remove some modules like 'FILESYSTEM' and 'FLASHFS' and try again.
https://github.com/espruino/Espruino/blob/master/boards/ESP32.py
-
• #8
Sorry,I cant build, but any way in my final sketch I use file system for upload PEM certificate using HTML5 on web page for user.
-
• #9
There is no need to use filesystem, because storage library is much more efficient in resource consumption
-
• #10
Ok, but now I use simple JS sketch that not call 'fs' or 'flash' .
var pem='MIIDbzCCAlegAwIBAgIJQgAAEjteoAbPMA0GCSqGSIb3DQEBCwUAMFQxGTAXBgNV'+
'BAoMEEFPIEthc3BlcnNreSBMYWIxNzA1BgNVBAMMLkthc3BlcnNreSBBbnRpLVZp'+
'cnVzIFBlcnNvbmFsIFJvb3QgQ2VydGlmaWNhdGUwHhcNMTkwNDIzMDg1NjQ3WhcN'+
'MjEwNDIyMDg1NjQ3WjBoMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5p'+
'YTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzETMBEGA1UEChMKR29vZ2xlIExMQzEX'+
'MBUGA1UEAxMOd3d3Lmdvb2dsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw'+
'ggEKAoIBAQCkFcSa7T6ZGdyKtisfgGxAI4ZpcHYK4pw/NMWBqEzGvc4IHkw5S4cv'+
'8UBHM3T77VmpCPJab6BZ2mJs9d6mc3VhZ6zKn0Wf8UlfpHE+zOeW1/Es7OegXAsa'+
'13xrwpQ6oFu+EaOQBJpMtN0wRk8fzpAv3UZzq0iQKrgfq5wPCk+1B22GkTU5sBjV'+
'GTFjgT2l3iIs1C/K7zNgQfMoXlLULm3W7fn91yeLF/kqwZhqx2G7KThmqn1iSLd6'+
'ilu6WW0qLhEHOnPsB7DK1tmuSQv6/eahpKE6sL2HRSZC2DdUla4I5jOfOiCwMTLB'+
'b9bfSYDWNUN4DOfWZatMVp3yRfpWikGZAgMBAAGjMDAuMAsGA1UdDwQEAwIFoDAf'+
'BgNVHREEGDAWhwSs2RlEgg53d3cuZ29vZ2xlLmNvbTANBgkqhkiG9w0BAQsFAAOC'+
'AQEAFLxHgjDQhc7kOGMV/Zhy6ZBPdTY4o7nIQz/WTVhN4Yq6cwZbDN7DD0GPMt0Q'+
'BuQE+nAudU7pzQ9PnwBeaPgswpuETxK5dswsanwPyU7g6v5+jIvwI9/LHqTojlCl'+
'CeJxxDe3XQYUR0CN6/e+VdnWw1jYXCZ0QglvPsN8I1Y+toXokLgIsMsZAGYVWZDm'+
'QGV/V99wqZYCP17lIdt4ZjGvdX6ae6DoqwM/xoHJVZc+eIsKYY9zULwS1ZEuOoG1'+
'04vuFYfO8k+7lOt1nxFqPZHlEXNvenwLgP/DENnBhY7jGxTJ5ANJpbpy4bOPVSNx'+
'Vi00nQHpR7Dd30VPLcUpBHuagQ==';//+
//'-----END CERTIFICATE-----';
////////////////////////////////////////////////////////////////////////////
setTimeout(function() {
console.log(wifi.getDetails(),ESP32.getState());
var options=url.parse("https://www.google.com", true);
options.cert=atob(pem);
require("http").get(options, function(res) {res.on('data', function(data) { console.log(data); });
});
console.log(ESP32.getState());
}, 5000); -
• #11
I use file system
ok, so this is not Espruino filesystem.
-
• #12
HTTP can work again on ESP32, see
https://github.com/espruino/Espruino/issues/1777#issuecomment-618197976
-
• #13
Yea, but it is need install SDK for build firmware with this option. Actually I looking for easy way to fix it. Because if deploy SW what reason to use JS ?, native C or C++ and ASM is not problem for me. Now, JS sketch is finished just I was forget to test for TLS, because using free MQTT and HTTP servers. Could you share/send ,If you has bin file with extended heap settings?
Dears, I know about troubles with HTTPS on ESP32 - that get error with SSL out of memory at v.2.0 and higher. I tested on v2.04 and try latest v2.05, unfortunately JS again need memory for code to catch certificate , deploy ssl and connect by https.
But why is it not working when I manual plug PEM certificate, Because same approach is working on ESP32 for Arduino ?
Error: mbedtls_ssl_setup: No enough memory!
1 Attachment