@@ -282,6 +282,8 @@ unsigned long arduino::WiFiClass::getTime() {
282282#include " MBRBlockDevice.h"
283283#include " FATFileSystem.h"
284284
285+ #define WIFI_FIRMWARE_PATH " /wlan/4343WA1.BIN"
286+
285287QSPIFBlockDevice root (PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000 );
286288mbed::MBRBlockDevice wifi_data (&root, 1 );
287289mbed::FATFileSystem wifi_data_fs (" wlan" );
@@ -292,7 +294,9 @@ extern "C" bool wiced_filesystem_mount() {
292294 mbed::MBRBlockDevice::partition (&root, 1 , 0x0B , 0 , 1024 * 1024 );
293295 int err = wifi_data_fs.mount (&wifi_data);
294296 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." );
296300 goto error;
297301 }
298302
@@ -302,7 +306,7 @@ extern "C" bool wiced_filesystem_mount() {
302306 /* print all the files and directories within directory */
303307 while ((ent = readdir (dir)) != NULL ) {
304308 String fullname = " /wlan/" + String (ent->d_name );
305- if (fullname == " /wlan/4343WA1.BIN " ) {
309+ if (fullname == WIFI_FIRMWARE_PATH ) {
306310 closedir (dir);
307311 firmware_available = true ;
308312 return true ;
@@ -312,7 +316,7 @@ extern "C" bool wiced_filesystem_mount() {
312316 closedir (dir);
313317 }
314318error:
315- Serial.println (" Please run \" PortentaWiFiFirmwareUpdater\" sketch once" );
319+ Serial.println (" Please run the \" PortentaWiFiFirmwareUpdater\" sketch once to install the WiFi firmware. " );
316320 whd_print_logbuffer ();
317321 while (1 ) {}
318322 return false ;
0 commit comments