Change wifi password between esp server and client automatic

I made project contain esp8266(server) and multi esp(stations) and connect theme with "wifi.h" and "syncwebserver" libraries. now i want change network password between esps. How say to station that changed password? I change password in server but station dont know new password to connect esp(server)

I have idea that save new password in server and until all modules doesnt update password(check periodic with asyncwebServer) dont change network password But in this case if one of theme dont reachable network never will not update at all.

What you are trying to do would really only work if all clients when they connect, get sent the new credentials, and some future date/time when those credentials should be used.

The cut-over to the new credentials all has to happen at the same time... both server and clients.

So with that in mind if you publish the new credentials with some advance warning (say 7 days), then provided a client connected within 7 days they would get the new credentials... any that didn't would need to be updated by some other mechanism.

Why do you want to change the password?

Has it been compromised? If so, pushing a new password out to connected devices will not help.

Dear red_car
Password not cracked but
change password will help
1.increase network security
2.prevent some network attack types

depending on what amount of data you want to exchange ESP-NOW might be an option
maybe in case a station has missed updating the password looses WiFi-connection and then is sending a request over ESP-NOW for the new password.
Sending over ESP-NOW would only happen if a station has missed the regular password-update.
ESP-NOW can be encrypted too. And as it happends only so rarely there is almost no chance to sniff the ESP-NOW-traffic

best regards Stefan

I'm not particularly familiar with the ESP-NOW protocol, but assuming it can be made secure, which this seems to indicate it can...

and in can run in parallel on the server with WiFi, which this seems to indicate it can...

Then yes, that could be an option. :slight_smile:

I guess you would need to consider whether you then have a similar problem with static passwords, but worth investigating.

1 Like

i think ,this is a good solution
thank you

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.