diff --git a/Microchip/ATSAME54-XPRO/readme.md b/Microchip/ATSAME54-XPRO/readme.md index 15fc5443..f7265730 100644 --- a/Microchip/ATSAME54-XPRO/readme.md +++ b/Microchip/ATSAME54-XPRO/readme.md @@ -21,7 +21,7 @@ For guidance on connecting additional devices, see [Getting started with IoT dev ## What you need -* The [Microchip ATSAME54-XPro](https://www.microchip.com/developmenttools/productdetails/atsame54-xpro) +* The [Microchip ATSAME54-XPro](https://www.microchip.com/development-tool/atsame54-xpro) * USB 2.0 A male to Micro USB male cable * Wired Ethernet access * Ethernet cable diff --git a/STMicroelectronics/B-L475E-IOT01A/app/stm_networking.c b/STMicroelectronics/B-L475E-IOT01A/app/stm_networking.c index 69803971..4029d4a9 100644 --- a/STMicroelectronics/B-L475E-IOT01A/app/stm_networking.c +++ b/STMicroelectronics/B-L475E-IOT01A/app/stm_networking.c @@ -32,14 +32,14 @@ NX_PACKET_POOL nx_pool; NX_DNS nx_dns_client; // WiFi firmware version required -static const UINT wifi_required_version[] = {3, 5, 2, 5}; +static const UINT wifi_required_version[] = {3, 5, 2, 7}; static void print_address(CHAR* preable, uint8_t address[4]) { printf("\t%s: %d.%d.%d.%d\r\n", preable, address[0], address[1], address[2], address[3]); } -static void check_firmware_version(CHAR* data) +static bool check_firmware_version(CHAR* data) { UINT status = 0; UINT version[4]; @@ -49,21 +49,23 @@ static void check_firmware_version(CHAR* data) if (status <= 0) { printf("ERROR: Unable to decode WiFi firmware\r\n"); - return; + return false; } for (int i = 0; i < 4; ++i) { if (version[i] > wifi_required_version[i]) { - break; + return true; } else if (version[i] < wifi_required_version[i]) { - printf("ERROR: WiFi firmware is out of date\r\n"); - break; + printf("ERROR: WIFI FIRMWARE IS OUTDATED, PLEASE UPDATE TO AVOID CONNECTION ISSUES\r\n"); + return false; } } + + return true; } static UINT wifi_init() @@ -94,9 +96,10 @@ static UINT wifi_init() WIFI_GetModuleFwRevision(data); printf("\tFirmware revision: %s\r\n", data); - check_firmware_version(data); - - printf("SUCCESS: WiFi initialized\r\n"); + if (check_firmware_version(data)) + { + printf("SUCCESS: WiFi initialized\r\n"); + } return NX_SUCCESS; } diff --git a/STMicroelectronics/B-L4S5I-IOT01A/app/stm_networking.c b/STMicroelectronics/B-L4S5I-IOT01A/app/stm_networking.c index 69803971..4029d4a9 100644 --- a/STMicroelectronics/B-L4S5I-IOT01A/app/stm_networking.c +++ b/STMicroelectronics/B-L4S5I-IOT01A/app/stm_networking.c @@ -32,14 +32,14 @@ NX_PACKET_POOL nx_pool; NX_DNS nx_dns_client; // WiFi firmware version required -static const UINT wifi_required_version[] = {3, 5, 2, 5}; +static const UINT wifi_required_version[] = {3, 5, 2, 7}; static void print_address(CHAR* preable, uint8_t address[4]) { printf("\t%s: %d.%d.%d.%d\r\n", preable, address[0], address[1], address[2], address[3]); } -static void check_firmware_version(CHAR* data) +static bool check_firmware_version(CHAR* data) { UINT status = 0; UINT version[4]; @@ -49,21 +49,23 @@ static void check_firmware_version(CHAR* data) if (status <= 0) { printf("ERROR: Unable to decode WiFi firmware\r\n"); - return; + return false; } for (int i = 0; i < 4; ++i) { if (version[i] > wifi_required_version[i]) { - break; + return true; } else if (version[i] < wifi_required_version[i]) { - printf("ERROR: WiFi firmware is out of date\r\n"); - break; + printf("ERROR: WIFI FIRMWARE IS OUTDATED, PLEASE UPDATE TO AVOID CONNECTION ISSUES\r\n"); + return false; } } + + return true; } static UINT wifi_init() @@ -94,9 +96,10 @@ static UINT wifi_init() WIFI_GetModuleFwRevision(data); printf("\tFirmware revision: %s\r\n", data); - check_firmware_version(data); - - printf("SUCCESS: WiFi initialized\r\n"); + if (check_firmware_version(data)) + { + printf("SUCCESS: WiFi initialized\r\n"); + } return NX_SUCCESS; }