Skip to content

Commit 74a91c4

Browse files
authored
Merge pull request #572 from pennam/wifi-fw-version
Ensure wlan firmware fs is mounted before checking if fw is available
2 parents b1aa399 + 7d52bc9 commit 74a91c4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

libraries/WiFi/src/WiFi.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,12 @@ wiced_result_t whd_firmware_check_hook(const char* mounted_name, int mount_err)
280280

281281
#include "whd_version.h"
282282
const char* arduino::WiFiClass::firmwareVersion() {
283-
if (firmware_available) {
284-
return WHD_VERSION;
285-
} else {
286-
return "v0.0.0";
283+
if ((wiced_filesystem_init() != WICED_ERROR) && (wiced_filesystem_mount_default() != WICED_ERROR)) {
284+
if (firmware_available) {
285+
return WHD_VERSION;
286+
}
287287
}
288+
return "v0.0.0";
288289
}
289290

290291
arduino::WiFiClass WiFi(WiFiInterface::get_default_instance());

0 commit comments

Comments
 (0)