Skip to content

Commit 7e6602f

Browse files
authored
Update simpleWebServer.ino
1 parent 6b210cb commit 7e6602f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/Portenta H7 as a WiFi Access Point/simpleWebServer/simpleWebServer.ino

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ void setup() {
2727
// you can override it with the following:
2828
// WiFi.config(IPAddress(10, 0, 0, 1));
2929

30+
// The AP needs the password be at least 8 characters long
31+
if(strlen(pass) < 8){
32+
Serial.println("Creating access point failed");
33+
Serial.println("The WiFi password must be at least 8 characters long");
34+
// don't continue
35+
while(true);
36+
}
37+
3038
// print the network name (SSID);
3139
Serial.print("Creating access point named: ");
3240
Serial.println(ssid);

0 commit comments

Comments
 (0)