From 9c487c917346d771aca47eb292a7fe198e641226 Mon Sep 17 00:00:00 2001 From: Sebastian Hunkeler Date: Thu, 22 Oct 2020 12:28:36 +0200 Subject: [PATCH] Improved status messages and prompts --- .../PortentaWiFiFirmwareUpdater.ino | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libraries/WiFi/examples/PortentaWiFiFirmwareUpdater/PortentaWiFiFirmwareUpdater.ino b/libraries/WiFi/examples/PortentaWiFiFirmwareUpdater/PortentaWiFiFirmwareUpdater.ino index 9af831daf..eff34b850 100644 --- a/libraries/WiFi/examples/PortentaWiFiFirmwareUpdater/PortentaWiFiFirmwareUpdater.ino +++ b/libraries/WiFi/examples/PortentaWiFiFirmwareUpdater/PortentaWiFiFirmwareUpdater.ino @@ -33,7 +33,10 @@ void setup() { if (err) { // Reformat if we can't mount the filesystem // this should only happen on the first boot - Serial.println("No filesystem found, formatting..."); + Serial.println("No filesystem containing the WiFi firmware was found."); + Serial.println("Usually that means that the WiFi firmware has not been installed yet" + " or was overwritten with another firmware.\n"); + Serial.println("Formatting the filsystem to install the firmware and certificates...\n"); err = wifi_data_fs.reformat(&wifi_data); } @@ -43,10 +46,11 @@ void setup() { if ((dir = opendir("/wlan")) != NULL) { /* print all the files and directories within directory */ while ((ent = readdir (dir)) != NULL) { - Serial.println(ent->d_name); + Serial.println("Searching for WiFi firmware file " + String(ent->d_name) + " ..."); String fullname = "/wlan/" + String(ent->d_name); if (fullname == "/wlan/4343WA1.BIN") { - Serial.println("Firmware found! Force update? [Y/n]"); + Serial.println("A WiFi firmware is already installed. " + "Do you want to install the firmware anyway? Y/[n]"); while (1) { if (Serial.available()) { int c = Serial.read(); @@ -86,7 +90,7 @@ void setup() { } fclose(fp); - Serial.println("Firmware and certificates updated!"); + Serial.println("\nFirmware and certificates updated!"); } void loop() {