Skip to content

Instantly share code, notes, and snippets.

@millsoft
Created August 25, 2019 16:15
Show Gist options
  • Save millsoft/56599e25640edf5528ef9a6d51aecfec to your computer and use it in GitHub Desktop.
Save millsoft/56599e25640edf5528ef9a6d51aecfec to your computer and use it in GitHub Desktop.
Get Access Point Channel by BSSID
#!/bin/bash
#you need first the name of your wifi device, enter iwlist to see.
# in the bottom example wlx12345 = wifi device name and the mac address is the bssid of the access point
iwlist wlx12345 scanning | awk '/AA:BB:CC:DD:11:22/,/Frequency/' | awk '/Channel:/ { print substr($1, 9) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment