Store Wifi Credentials After OTA Update?

Hello all!

I was wondering if there were any examples or best practices to follow to store the wifi credentials before and after a golioth OTA update? Our golioth fleet contains devices that connect to many different wifi access points, so we don’t want to include all of those credentials as part of the device firmware. They will be configured by the device end user once using an experience like the CLI experience provided by the Golioth examples. However, these credentials would be erased during the first OTA update.

Oh and we are using the ESP-IDF with an esp32-s3 dev board.

Any advice or examples on the best way to solve this would be appreciated.

Hi @keenanribbit! One of the features of the SDK is that it persists credentials in Non-Volatile Storage (NVS) instead of baking it into firmware. It’s a much better security practice as well as more convenient, like you say.

If you follow the golioth_basics example it should be using NVS in that way.

Let us know if that’s not the case!