nanoframework / Home

:house: The landing page for .NET nanoFramework repositories.
https://www.nanoframework.net
MIT License
844 stars 75 forks source link

Add generic display to target ESP32_S3_BLE #1487

Closed romankiss closed 1 month ago

romankiss commented 1 month ago

Target name(s)

ESP32_S3_ALL

Firmware version

1.9.1.151

Was working before? On which version?

no

Device capabilities

No response

Description

I have an IoT Application connected to the Azure IoT Central with all up-to-date nuget assemblies runs on the following targets:

++++ Exception System.Net.Sockets.SocketException - CLR_E_FAIL (1) ++++ ++++ Message: ++++ System.Net.Security.SslNative::SecureClientInit [IP: 0000] ++++ ++++ System.Net.Security.SslStream::Authenticate [IP: 0045] ++++ ++++ System.Net.Security.SslStream::AuthenticateAsClient [IP: 000a] ++++ ++++ nanoFramework.M2Mqtt.MqttNetworkChannel::Connect [IP: 0063] ++++ ++++ nanoFramework.Azure.Devices.Client.DeviceClient::Open [IP: 00b6] ++++

Note, there is no graphics and BLE usage in the application, so it should be all three targets worked the same without this exception.  

How to reproduce

No response

Expected behaviour

No response

Screenshots

No response

Aditional information

No response

josesimoes commented 1 month ago

Most likely not enough memory to deal with the TLS stuff. @AdrianSoundy is to look into improving the memory allocation in ESP32, so this should be working again after that.

AdrianSoundy commented 1 month ago

What ESP32 board are you running this on? The ESP32_S3_ALL firmware is really for S3 with 8Mb spiram running in octal mode. If not capatible spiram then all allocation would be in ESP32 ram which is limited. The ESP2_S3 and ESP32_S3_BLE support quad mode spiram. Its not possible to have firmware with quad & octal mod spiram support.

romankiss commented 1 month ago

@AdrianSoundy I have the following products built-in a screen with running a factory demo program (Arduino/MicroPython/ESP-IDF):

AdrianSoundy commented 1 month ago

Yes all your devices use quad mode spiram so that's why they don't have enough memory when running ESP32_S3_ALL. Is the issue that you want to use display as we can add the generic display driver to the other S3 firmware?

romankiss commented 1 month ago

@AdrianSoundy thanks for explanation. Yes, we need a new firmware for QUAD mode ESP32_S3_All for these kinds of products, where are usage of screen (using a generic display driver) and BLE.

Btw1. for non-confusing naming of the firmware is better to keep names as following: for QUAD mode: ESP32_S3, ESP32_S3_BLE, ESP32_S3_ALL and for OCTAL mode: ESP32_S3_ALL_OCTAL

Btw2. I have also a product Unit-CamS3, so based on your info, the current firmware ESP32_S3_ALL should be work. I am going to test it soon.

Thank you so much.

romankiss commented 1 month ago

@AdrianSoundy I have just successfully finished my test with an IoT App connected to the Azure IoT Central using a target ESP32_S3_ALL (1.9.1.151) on the following products (8MB PSRAM):

Based on that, there is missing a S3 firmware image (included the AtomS3) for QUAD mode with a generic display driver, so I would like to ask, if we can have it either a new image like we have for BLE or adding the generic display driver to the current one such as ESP32_S3.

Thank you so much for your help and support.

AdrianSoundy commented 1 month ago

I'll shortly add the generic display driver to the ESP32_S3 and ESP32_S3_BLE firmware. Probably need to review and optimize the naming of all firmware. But we can do that later.

romankiss commented 1 month ago

@AdrianSoundy Thanks and I am looking forward for testing those ones with my IoT App.

AdrianSoundy commented 1 month ago

Decided to add generic driver to just ESP32_S3_BLE and leave ESP32_S3 as minimum firmware

romankiss commented 1 month ago

@AdrianSoundy The following is a result of my testing on the S3:

So, it looks like the target ESP32_S3 (1.9.1.166) has an issue with a firmware flasher and some board like M5StampS3 doesn't have enough an IDF configured memory when there is no additional PSRAM.