You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
I have searched the issue tracker for a similar issue and not found a similar issue.
General issue report
I would like to generate a nvs partition containing wifi credentials and upload it to my ESP32.
I am generating the nvs partition from a CSV using the NVS Partition Generator
I want to set the wifi credentials in the CSV in a format compatible with the esp wifi component.
The esp wifi saves wifi credentials in NVS by default. If we read the partition after saving a credential I get the following
# Read the NVS parititon on ESP32
esptool.py --port /dev/ttyUSB0 read_flash 0x9000 0x5000 nvs.img
# Read the key values pairs for wifi sta
python3 /home/daigo/src/espressif/esp-idf/components/nvs_flash/nvs_partition_tool/nvs_tool.py nvs.img -d minimal -f text | grep sta
nvs.net80211:sta.rrm_e = 0
nvs.net80211:sta.btm_e = 0
nvs.net80211:sta.mbo_e = 0
nvs.net80211:sta.bss_retry = 0
nvs.net80211:sta.trans_d = 0
nvs.net80211:sta.sae_h2e = 2
nvs.net80211:sta.scan_method = 0
nvs.net80211:sta.minauth = 3
nvs.net80211:sta.ssid[0] = b'\x05\x00\x00\x00REDACTED_SSID\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
nvs.net80211:sta.pswd[0] = b'REDACTED_PASSWORD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
nvs.net80211:sta.apsw[0] = b'\x05\x01'
nvs.net80211:sta.chan = 6
I want to set the ssid and password using the following format
github-actionsbot
changed the title
How to upload nvs partition with wifi credentials
How to upload nvs partition with wifi credentials (IDFGH-13678)
Sep 12, 2024
I am trying to help with this issue, but i see some other "problem", which is not actually an issue, just inconsistency.
I have NVS partition generated with espressif tools, it is working great, but decoding it shows that 4 pages are marked as full which according to docs means we cant add new keys to that page (why?):
Full
Flash storage is in a consistent state and is filled with key-value pairs. Writing new key-value pairs into this page is not possible. It is still possible to mark some key-value pairs as erased.
Page no. 0, Status: Full
hardware:productCode = b'CC0407WB\x00'
...
more configs here
Page no. 1, Status: Full
// no data here
Page no. 2, Status: Full
// no data here
Page no. 3, Status: Full
// no data here
Page Empty
Another question, to help solving OP issue is
is it possible to select page we want to write to? because i found that some espressif settings, like wifi and mqtt creds or phy data are stored on page 4
@ConDai@yujonglee
Is there any reason you cant prepare NVS partition the way its described in OP
Answers checklist.
General issue report
I would like to generate a nvs partition containing wifi credentials and upload it to my ESP32.
I am generating the nvs partition from a CSV using the NVS Partition Generator
I want to set the wifi credentials in the CSV in a format compatible with the esp wifi component.
The esp wifi saves wifi credentials in NVS by default. If we read the partition after saving a credential I get the following
I want to set the ssid and password using the following format
However, the SSID is stored as a blob type instead of a string type and is prefixed by \x05\x00\x00\x00
Is there a way I can set the wifi credentials in NVS that is compatible with esp_wifi and is human-friendly?
I originally raised the question on the esp32 forum here but didn't get resolved.
The text was updated successfully, but these errors were encountered: