File tree 1 file changed +10
-3
lines changed
libraries/Update/examples/AWS_S3_OTA_Update
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ bool isValidContentType = false;
31
31
32
32
// Your SSID and PSWD that the chip needs
33
33
// to connect to
34
- char * SSID = " YOUR-SSID" ;
35
- char * PSWD = " YOUR-SSID-PSWD" ;
34
+ const char * SSID = " YOUR-SSID" ;
35
+ const char * PSWD = " YOUR-SSID-PSWD" ;
36
36
37
37
// S3 Bucket Config
38
38
String host = " bucket-name.s3.ap-south-1.amazonaws.com" ; // Host => bucket-name.s3.region.amazonaws.com
@@ -65,7 +65,14 @@ void execOTA() {
65
65
// "Cache-Control: no-cache\r\n" +
66
66
// "Connection: close\r\n\r\n");
67
67
68
- delay (100 );
68
+ unsigned long timeout = millis ();
69
+ while (client.available () == 0 ) {
70
+ if (millis () - timeout > 5000 ) {
71
+ Serial.println (" Client Timeout !" );
72
+ client.stop ();
73
+ return ;
74
+ }
75
+ }
69
76
// Once the response is available,
70
77
// check stuff
71
78
You can’t perform that action at this time.
0 commit comments