Notifications
Clear all

Storing WiFi credentials and SSID on your microcontroller?

5 Posts
4 Users
1 Likes
1,703 Views
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
Topic starter  

Apologies if this is the wrong forum.

The ESP32, among others, has WiFi capabilities. The ESP32 WiFi related videos I've watched all hard code the WiFi network SSID and password in the software. This is fine for development purposes but obviously isn't ideal as the network name or password may change over time.

What are the typical or recommended alternatives? Store the WiFi network name and credentials on a microsd card and load it when your s/w loads? It would have to be encrypted in case anyone pulled the card and looked at its contents. I'm sure that's not an issue in most cases, but security does come to mind. Requiring a microsd reader would add cost and size to the project.

What other options are there?


   
Quote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1053
 

It's actually the subject for the video I'm recording today LOL, so stay tuned!

BTW, I moved this into the ESP32 section.

😎

Bill

 

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote
(@yurkshirelad)
Member
Joined: 3 years ago
Posts: 493
Topic starter  

Isn't that a coincidence! I look forwarding to watching it.

Oops, I thought I posted it there!


   
ReplyQuote
vieuxgeek
(@vieuxgeek)
Member
Joined: 3 years ago
Posts: 12
 

@dronebot-workshop Very timely.  I am currently looking at this for a project I am doing.  I have been testing the ConfigManager library.  It seems to do the job of setting and storing the wifi credentials but security of the password while inflight and at rest is not done.  The Web Server used does not support htttps so inflight data can not be protected.  Data is stored in flash memory unencrypted.

Looking foreword to the video!

When you're retired, every day is Saturday.


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@yurkshirelad

Posted by: @yurkshirelad

What are the typical or recommended alternatives? Store the WiFi network name and credentials on a microsd card and load it when your s/w loads? It would have to be encrypted in case anyone pulled the card and looked at its contents. I'm sure that's not an issue in most cases, but security does come to mind. Requiring a microsd reader would add cost and size to the project.

What other options are there?

One way could be to use an encryption library (or write your own), enter the password via serial and encrypt it, writing the encrypted credentials straight to eeprom... you just create a couple of functions to read and write to and from the eeprom chip... of course you would also set an encrypted password to allow dynamic changes via serial communication as well.

As for https... I have seen some people in the past working on some libraries and even ideas of using a proxy server to do the real work, but then raises the complexity of the setup.

Keen to see what Bill has install for us 🙂


   
ReplyQuote