Skip to content

Fix missing WiFi quality/rssi for ln882h #1090

@MaxineMuster

Description

@MaxineMuster

Describe the bug
At the moment, rssi is not implemented for LN882H, so GUI for LN882H always shows
Wifi RSSI: Excellent (0dBm)
No_rssi

Patch
I suggest this patch to show the rssi:
with_rssi


diff --git a/src/hal/ln882h/hal_wifi_ln882h.c b/src/hal/ln882h/hal_wifi_ln882h.c
index 0bee18f0..d44d32f6 100644
--- a/src/hal/ln882h/hal_wifi_ln882h.c
+++ b/src/hal/ln882h/hal_wifi_ln882h.c
@@ -131,7 +131,9 @@ void HAL_PrintNetworkInfo()
 int HAL_GetWifiStrength()
 {
     alert_log("HAL_GetWifiStrength");
-       return 0;
+    int8_t val;
+    wifi_sta_get_rssi(&val);
+    return val;
 }
 
 void HAL_WiFi_SetupStatusCallback(void (*cb)(int code))

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions