-
I'm trying to get This is the log output from the working state (so w/o embedded-tls):
This is the not connecting log:
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 4 replies
-
I can only guess but most probably there are buffers allocated on the stack which makes the stack grow into the data segment You could try reducing the size of buffers and allocate them statically. If you can post the code (or a link to a repo) someone can have a look if there is anything obvious to improve the situation |
Beta Was this translation helpful? Give feedback.
-
I gave your code a try and it works so far. I had to change a few things to get it completely though the whole code:
It depends on how much memory is allocated on the stack - especially if data is copied/moved that might happen. Also, for
Some parts of the code (inside esp-hal and esp-wifi) need to run from RAM and therefore are copied to RAM. All other code runs from flash-memory - flash on ESP32 is XIP (execute-in-place)
Yes - on the original ESP32 esp-wifi currently allocates the wifi-heap in dram-seg2 but the stack starts at the end of the lower dram-segment (where also the data sections is located)
I don't think we explain that in detail in the current documentation. Probably something we should consider Regarding example code for TLS: we plan to have examples using Rustls and most probably also a simple example using embedded-tls. We are just not there yet |
Beta Was this translation helpful? Give feedback.
-
Thanks Only differences I can think of:
At least good to know that the |
Beta Was this translation helpful? Give feedback.
-
BoardI used two different boards
and
both work fine with your code Compiler
Building / Running
NetworkFor me it sometimes takes a bit longer to get an IP from my router - works better using my smartphone or laptop as an access-point but with some patience it also works fine with my router (FRITZ!Box 5590 Fiber) |
Beta Was this translation helpful? Give feedback.
-
I have same compiler version. Upgraded my espflash now to match. I see a few minor differences in the logs, you can see diffs at: https://www.diffchecker.com/mEk4hyPD/
Seems like a dead end 😞 |
Beta Was this translation helpful? Give feedback.
-
Managed to make some progress. I switched to another SSID on the same wifi router (maybe there's some diff in settings, I'll check that later). Add to that that on the previous SSID with minor code changes it switched between connecting to not connecting, I believe there is some sensitivity in the code, at least when using embassy + esp-wifi, maybe some timing issues, that would cause connection to fail. I could blame the network if those issues would be inconsistent, but the consistency of success/failure depending on board+software leads me to believe it is a software issue. Edit: BTW - a few months ago I developed with esp-wifi+embassy quite a lot, a pretty complex application, very network oriented, and I didn't have these issues on the same SSID that now doesn't work, including with one of these boards (also with ESP32-S3). Never had any issues like that. So maybe it's something relatively new. |
Beta Was this translation helpful? Give feedback.
-
I have one board that's working, so tried to connect to the device I need and I can't get it to work. So my only other option is |
Beta Was this translation helpful? Give feedback.
-
Oh yes - embedded-tls can only support TLS 1.3. Out In the end (not yet) our helpers for |
Beta Was this translation helpful? Give feedback.
Oh yes - embedded-tls can only support TLS 1.3.
Out
rusttls
provider is currently more in an experimental phase and would also only support a TLS 1.3 cipher - so currently your option would only be esp-mbedtls.In the end (not yet) our helpers for
rusttls
will also support wrappers for embedded-io-async