diff --git a/self-diagnostics/files/usr/share/self-diagnostics/helper/wifi_sta.sh b/self-diagnostics/files/usr/share/self-diagnostics/helper/wifi_sta.sh new file mode 100644 index 000000000..8db00ecad --- /dev/null +++ b/self-diagnostics/files/usr/share/self-diagnostics/helper/wifi_sta.sh @@ -0,0 +1,24 @@ +. /lib/functions.sh + +handle_interface() { + local config="${1}" + config_get ifname "${config}" ifname + config_get mode ${config} mode + + [ "$mode" != "sta" ] && continue + + echo "Get wpa_cli status" + wpa_cli -i "${ifname}" status + + echo "Get scan results" + wpa_cli -i "${ifname}" scan_res + + echo "Get current networks" + wpa_cli -i "${ifname}" list_n + + echo "Get supplicant file" + cat /var/run/wpa_supplicant-"${ifname}".conf +} + +config_load wireless +config_foreach handle_interface wifi-iface diff --git a/self-diagnostics/files/usr/share/self-diagnostics/spec/wifi.json b/self-diagnostics/files/usr/share/self-diagnostics/spec/wifi.json index c57c1afe8..2e4050bd0 100644 --- a/self-diagnostics/files/usr/share/self-diagnostics/spec/wifi.json +++ b/self-diagnostics/files/usr/share/self-diagnostics/spec/wifi.json @@ -30,6 +30,15 @@ "cmd": "sh /usr/share/self-diagnostics/helper/wifi_assoclist.sh", "timeout": 10 }, + { + "description": "Get Scan results and status", + "cmd": "sh /usr/share/self-diagnostics/helper/wifi_sta.sh", + "timeout": 10 + }, + { + "description": "Get backhaul Info", + "cmd": "cat /var/run/multiap/multiap.backhaul" + }, { "description": "List Wireless Devices", "cmd": "iw dev"