I am trying to scan all available wifi devices using python. I wrote below code to get SSID,BSSID and device information
results = subprocess.check_output(["sudo", "nmcli", "-f", "SSID", "BSSID", "DEVICE", "dev", "wifi"])
But it is giving me error- "bssid not understood"
when I run the below command in terminal it is working fine.
sudo nmcli -f SSID,BSSID,DEVICE dev wifi
If I remove BSSID and DEVICE then it is working fine. And I am getting all the ssids
results = subprocess.check_output(["sudo", "nmcli", "-f", "SSID", "dev", "wifi"])
I could not understand what is going wrong.
I am using
Python-3.6.8
Ubuntu-18.04.2 LTS
