@@ -282,6 +282,8 @@ unsigned long arduino::WiFiClass::getTime() {
282
282
#include " MBRBlockDevice.h"
283
283
#include " FATFileSystem.h"
284
284
285
+ #define WIFI_FIRMWARE_PATH " /wlan/4343WA1.BIN"
286
+
285
287
QSPIFBlockDevice root (PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000 );
286
288
mbed::MBRBlockDevice wifi_data (&root, 1 );
287
289
mbed::FATFileSystem wifi_data_fs (" wlan" );
@@ -292,7 +294,9 @@ extern "C" bool wiced_filesystem_mount() {
292
294
mbed::MBRBlockDevice::partition (&root, 1 , 0x0B , 0 , 1024 * 1024 );
293
295
int err = wifi_data_fs.mount (&wifi_data);
294
296
if (err) {
295
- Serial.println (" Failed to mount filesystem" );
297
+ Serial.println (" Failed to mount the filesystem containing the WiFi firmware." );
298
+ Serial.println (" Usually that means that the WiFi firmware has not been installed yet"
299
+ " or was overwritten with another firmware." );
296
300
goto error;
297
301
}
298
302
@@ -302,7 +306,7 @@ extern "C" bool wiced_filesystem_mount() {
302
306
/* print all the files and directories within directory */
303
307
while ((ent = readdir (dir)) != NULL ) {
304
308
String fullname = " /wlan/" + String (ent->d_name );
305
- if (fullname == " /wlan/4343WA1.BIN " ) {
309
+ if (fullname == WIFI_FIRMWARE_PATH ) {
306
310
closedir (dir);
307
311
firmware_available = true ;
308
312
return true ;
@@ -312,7 +316,7 @@ extern "C" bool wiced_filesystem_mount() {
312
316
closedir (dir);
313
317
}
314
318
error:
315
- Serial.println (" Please run \" PortentaWiFiFirmwareUpdater\" sketch once" );
319
+ Serial.println (" Please run the \" PortentaWiFiFirmwareUpdater\" sketch once to install the WiFi firmware. " );
316
320
whd_print_logbuffer ();
317
321
while (1 ) {}
318
322
return false ;
0 commit comments