diff --git a/workspace/h700/platform/platform.c b/workspace/h700/platform/platform.c index ba98b3e941..d605b838f6 100644 --- a/workspace/h700/platform/platform.c +++ b/workspace/h700/platform/platform.c @@ -636,10 +636,13 @@ static bool bluetoothConnected = false; void PLAT_getNetworkStatus(int* is_online) { + struct WIFI_connection next_connection = {0}; + // Keep the cached signal available while the Wi-Fi commands run. if(WIFI_enabled()) - WIFI_connectionInfo(&connection); + WIFI_connectionInfo(&next_connection); else - connection_reset(&connection); + connection_reset(&next_connection); + connection = next_connection; if(is_online) *is_online = (connection.valid && connection.ssid[0] != '\0'); diff --git a/workspace/tg5040/platform/platform.c b/workspace/tg5040/platform/platform.c index 5990c8706f..fcd8316802 100644 --- a/workspace/tg5040/platform/platform.c +++ b/workspace/tg5040/platform/platform.c @@ -162,10 +162,13 @@ static bool bluetoothConnected = false; void PLAT_getNetworkStatus(int* is_online) { + struct WIFI_connection next_connection = {0}; + // Keep the cached signal available while the Wi-Fi commands run. if(WIFI_enabled()) - WIFI_connectionInfo(&connection); + WIFI_connectionInfo(&next_connection); else - connection_reset(&connection); + connection_reset(&next_connection); + connection = next_connection; if(is_online) *is_online = (connection.valid && connection.ssid[0] != '\0'); diff --git a/workspace/tg5050/platform/platform.c b/workspace/tg5050/platform/platform.c index 4ab899d64f..dfeb4d552f 100644 --- a/workspace/tg5050/platform/platform.c +++ b/workspace/tg5050/platform/platform.c @@ -188,10 +188,13 @@ static bool bluetoothConnected = false; void PLAT_getNetworkStatus(int* is_online) { + struct WIFI_connection next_connection = {0}; + // Keep the cached signal available while the Wi-Fi commands run. if(WIFI_enabled()) - WIFI_connectionInfo(&connection); + WIFI_connectionInfo(&next_connection); else - connection_reset(&connection); + connection_reset(&next_connection); + connection = next_connection; if(is_online) *is_online = (connection.valid && connection.ssid[0] != '\0');