Tried to use various ESP32 diagnostics functions. Most of them work as expected, but:
ESP.getChipModel() return pointer to an unterminated string. Or the rest of the string is model-specific? In my case, it is "ESP32-D0WDQ6"
The same is about esp_get_idf_version(). It returns: v5.5.1-710-g8410210c9a
Function ESP.getSdkVersion() returns mess: 1061169513
Looks like I cannot detect which WiFI version is supported...
How to properly use these functions?
Issues with ESP32 diagnostics
-
MicroController
- Posts: 2672
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Issues with ESP32 diagnostics
That's the full name/variant of the SOC.In my case, it is "ESP32-D0WDQ6"
Version string including the ID of the git commit from which it was built, see https://docs.espressif.com/projects/esp ... nt-versionThe same is about esp_get_idf_version(). It returns: v5.5.1-710-g8410210c9a
Unlikely, as it just calls esp_get_idf_version() - and also returns a const char* ("string"), not an integer. You can use macros to evaluate the IDF version: https://docs.espressif.com/projects/esp ... dk-versionFunction ESP.getSdkVersion() returns mess: 1061169513
I guess you'll want to use esp_chip_info(), and possibly esp_app_get_description().Looks like I cannot detect which WiFI version is supported...
Btw, the features of your specific target chip are known at compile/build time, so you can check the IDF-defined macros in your code and don't have to call a function at runtime for that.
Re: Issues with ESP32 diagnostics
Thks, it explains. And you are right about ESP.getSdkVersion(), it was my fault
Re: Issues with ESP32 diagnostics
>>I guess you'll want to use esp_chip_info(), and possibly esp_app_get_description().
Thanks for pointing me to this; however, the meaning of
chip_info fields is more or less clear, while the structure returned by the esp_app_get_description() function contains fields whose descriptions are unclear (like "Magic word" or "sha256 of elf file"). Can I clarify it somewhere?
Thanks for pointing me to this; however, the meaning of
chip_info fields is more or less clear, while the structure returned by the esp_app_get_description() function contains fields whose descriptions are unclear (like "Magic word" or "sha256 of elf file"). Can I clarify it somewhere?
-
lbernstone
- Posts: 1133
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Issues with ESP32 diagnostics
Don't worry about magic word; if it isn't right, you will never boot.
SHA256 is a checksum that the OTA & bootloader use to verify the firmware blob.
The rest of the values are pretty self explanatory, or else constants that will not be very useful to you.
SHA256 is a checksum that the OTA & bootloader use to verify the firmware blob.
The rest of the values are pretty self explanatory, or else constants that will not be very useful to you.
Who is online
Users browsing this forum: No registered users and 2 guests