3 ms·
Is iwlist not the thing anymore?
by foobarbecue 7y ago
Is iwlist not the thing anymore?
- nurettin 7y agoboth iw and iwlist are still a thing. There is probably some convoluted proc path that gives a listing as well.
- majewsky 7y agoprocfs is unlikely. Scanning is not something that the kernel does by itself, a userspace application (usually wpa_supplicant) needs to perform it actively. You can see this by running e.g. sudo iw dev $IFACE scan on a system running wpa_supplicant (e.g. through NetworkManager). Every so often you'll get a "Device busy" error because wpa_supplicant is scanning already.
- kevinoid 7y agoIt is. Personally, I find the format far too verbose for casual use and have to process the output to make it concise enough: iwlist wlan0 scan | awk -F: ' BEGIN { printf "%-40s | %3s | %5s | %4s\n", "SSID", "Enc", "Qual", "Chan" } function print_network() { printf "%-40s | %3s | %5s | %4s\n", essid, key, quality, channel } /^[[:space:]]*Cell [0-9]+/ { if (key) { print_network() } } /^[[:space:]]*Channel:/ { channel=$2 } /^[[:space:]]*Encryption key:/ { key=$2 } /^[[:space:]]*ESSID:/ { essid=$2 } /^[[:space:]]*Quality=/ { match($0, /[0-9]+\/[0-9]+/) quality=substr($0, RSTART, RLENGTH) } END { print_network() }'