Wireless support

This commit is contained in:
bergware
2025-02-03 17:16:40 +01:00
parent 0cbf4d519d
commit bc3d1eaeb2
3 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ function update_wifi() {
$('#other_networks').html(wifi.other);
}
});
timers.wifi = setTimeout(update_wifi,5000);
timers.wifi = setTimeout(update_wifi,10000);
}
function manage_wifi(ssid,task) {
+1 -1
View File
@@ -82,7 +82,7 @@ case 'list':
$index = 0;
if (count(array_column($wlan,'ssid'))) {
$up = file_exists($carrier) && file_get_contents($carrier)==1;
$alive = $up ? exec("iw ".escapeshellarg($port)." link | grep -Pom1 'SSID: \K.+'") : '';
$alive = $up ? exec("iw ".escapeshellarg($port)." link 2>/dev/null | grep -Pom1 'SSID: \K.+'") : '';
$state = $up ? _('Connected') : _('Disconnected');
$color = $up ? 'blue' : 'red';