cubicap / Jaculus-esp32

Jaculus device port for ESP32 platform
https://www.jaculus.org
GNU General Public License v3.0
4 stars 6 forks source link

Wifi STA cannot configure SSID with more than 15 characters: ESP_ERR_NVS_KEY_TOO_LONG error #9

Open marek-rychly opened 1 month ago

marek-rychly commented 1 month ago

For SSID in wifi STA mode in esp32, Jaculus is using nvs_flash key-value to save a configured SSID. NVS keys are limited to 15 characters (see below), so Jaculus esp32 cannot be configured and connected to wifi with a longer SSID (the configuration reports ESP_ERR_NVS_KEY_TOO_LONG error). Proposed fix: modify EspNvsKeyValue to split longer keys, or (which is better) to use their hashed values that will fit into 15 chars; or to modify EspWifiController to save (longer) SSIDs differently.

https://github.com/espressif/esp-idf/blob/5ca9f2a49aaabbfaf726da1cc3597c0edb3c4d37/components/nvs_flash/host_test/nvs_host_test/main/test_nvs.cpp#L240

cubicap commented 1 month ago

It should work with the newest version of Jaculus-tools, which only uses a 15-character SSID prefix.