Skip to content

Commit d1717e9

Browse files
committed
added firmware version check to WiFi shield examples
1 parent fd7e9c6 commit d1717e9

File tree

13 files changed

+53
-1
lines changed

13 files changed

+53
-1
lines changed

libraries/WiFi/examples/ConnectNoEncryption/ConnectNoEncryption.ino

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ void setup() {
3030
// don't continue:
3131
while(true);
3232
}
33+
34+
String fv = WiFi.firmwareVersion();
35+
if( fv != "1.1.0" )
36+
Serial.println("Please upgrade the firmware");
3337

3438
// attempt to connect to Wifi network:
3539
while ( status != WL_CONNECTED) {

libraries/WiFi/examples/ConnectWithWEP/ConnectWithWEP.ino

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ void setup() {
4343
while(true);
4444
}
4545

46+
String fv = WiFi.firmwareVersion();
47+
if( fv != "1.1.0" )
48+
Serial.println("Please upgrade the firmware");
49+
4650
// attempt to connect to Wifi network:
4751
while ( status != WL_CONNECTED) {
4852
Serial.print("Attempting to connect to WEP network, SSID: ");
@@ -52,7 +56,7 @@ void setup() {
5256
// wait 10 seconds for connection:
5357
delay(10000);
5458
}
55-
59+
5660
// once you are connected :
5761
Serial.print("You're connected to the network");
5862
printCurrentNet();

libraries/WiFi/examples/ConnectWithWPA/ConnectWithWPA.ino

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ void setup() {
3131
// don't continue:
3232
while(true);
3333
}
34+
35+
String fv = WiFi.firmwareVersion();
36+
if( fv != "1.1.0" )
37+
Serial.println("Please upgrade the firmware");
3438

3539
// attempt to connect to Wifi network:
3640
while ( status != WL_CONNECTED) {

libraries/WiFi/examples/ScanNetworks/ScanNetworks.ino

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ void setup() {
3232
while(true);
3333
}
3434

35+
String fv = WiFi.firmwareVersion();
36+
if( fv != "1.1.0" )
37+
Serial.println("Please upgrade the firmware");
38+
3539
// Print WiFi MAC address:
3640
printMacAddress();
3741

libraries/WiFi/examples/SimpleWebServerWiFi/SimpleWebServerWiFi.ino

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ void setup() {
4040
while(true); // don't continue
4141
}
4242

43+
String fv = WiFi.firmwareVersion();
44+
if( fv != "1.1.0" )
45+
Serial.println("Please upgrade the firmware");
46+
4347
// attempt to connect to Wifi network:
4448
while ( status != WL_CONNECTED) {
4549
Serial.print("Attempting to connect to Network named: ");

libraries/WiFi/examples/WiFiChatServer/WiFiChatServer.ino

+5
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ void setup() {
4646
// don't continue:
4747
while(true);
4848
}
49+
50+
String fv = WiFi.firmwareVersion();
51+
if( fv != "1.1.0" )
52+
Serial.println("Please upgrade the firmware");
4953

5054
// attempt to connect to Wifi network:
5155
while ( status != WL_CONNECTED) {
@@ -57,6 +61,7 @@ void setup() {
5761
// wait 10 seconds for connection:
5862
delay(10000);
5963
}
64+
6065
// start the server:
6166
server.begin();
6267
// you're connected now, so print out the status:

libraries/WiFi/examples/WiFiPachubeClient/WiFiPachubeClient.ino

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ void setup() {
6060
// don't continue:
6161
while(true);
6262
}
63+
64+
String fv = WiFi.firmwareVersion();
65+
if( fv != "1.1.0" )
66+
Serial.println("Please upgrade the firmware");
6367

6468
// attempt to connect to Wifi network:
6569
while ( status != WL_CONNECTED) {

libraries/WiFi/examples/WiFiPachubeClientString/WiFiPachubeClientString.ino

+4
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ void setup() {
6565
// don't continue:
6666
while(true);
6767
}
68+
69+
String fv = WiFi.firmwareVersion();
70+
if( fv != "1.1.0" )
71+
Serial.println("Please upgrade the firmware");
6872

6973
// attempt to connect to Wifi network:
7074
while ( status != WL_CONNECTED) {

libraries/WiFi/examples/WiFiUdpNtpClient/WiFiUdpNtpClient.ino

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ void setup()
5151
while(true);
5252
}
5353

54+
String fv = WiFi.firmwareVersion();
55+
if( fv != "1.1.0" )
56+
Serial.println("Please upgrade the firmware");
5457

5558
// attempt to connect to Wifi network:
5659
while ( status != WL_CONNECTED) {

libraries/WiFi/examples/WiFiUdpSendReceiveString/WiFiUdpSendReceiveString.ino

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ void setup() {
4343
// don't continue:
4444
while(true);
4545
}
46+
47+
String fv = WiFi.firmwareVersion();
48+
if( fv != "1.1.0" )
49+
Serial.println("Please upgrade the firmware");
4650

4751
// attempt to connect to Wifi network:
4852
while ( status != WL_CONNECTED) {

libraries/WiFi/examples/WiFiWebClient/WiFiWebClient.ino

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ void setup() {
5252
// don't continue:
5353
while(true);
5454
}
55+
56+
String fv = WiFi.firmwareVersion();
57+
if( fv != "1.1.0" )
58+
Serial.println("Please upgrade the firmware");
5559

5660
// attempt to connect to Wifi network:
5761
while (status != WL_CONNECTED) {

libraries/WiFi/examples/WiFiWebClientRepeating/WiFiWebClientRepeating.ino

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ void setup() {
4848
// don't continue:
4949
while(true);
5050
}
51+
52+
String fv = WiFi.firmwareVersion();
53+
if( fv != "1.1.0" )
54+
Serial.println("Please upgrade the firmware");
5155

5256
// attempt to connect to Wifi network:
5357
while ( status != WL_CONNECTED) {

libraries/WiFi/examples/WiFiWebServer/WiFiWebServer.ino

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ void setup() {
4343
// don't continue:
4444
while(true);
4545
}
46+
47+
String fv = WiFi.firmwareVersion();
48+
if( fv != "1.1.0" )
49+
Serial.println("Please upgrade the firmware");
4650

4751
// attempt to connect to Wifi network:
4852
while ( status != WL_CONNECTED) {

0 commit comments

Comments
 (0)