You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How can we get the BSSID value for a wifi network without sudo

We are looking to get BSSID value for a wifi network from terminal as this needs to be used in automation script.Currently when running /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I ,it gives BSSID value as blank and only if we run with sudo, it provides the value.


Can we get this value without sudo?

Posted on Sep 18, 2023 4:10 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 19, 2023 6:01 PM

Do you always want the BSSID for the current wireless network in use? If so, you can get it without sudo using the following syntax.


ioreg -l -n AirPortDriver | perl -lne 'print $1 if $_ =~ /IO80211BSSID.*<(.*)>/;' | fold -w2 | paste -sd: -

The result will be in the format: xx:xx:xx:xx:xx

Similar questions

3 replies

How can we get the BSSID value for a wifi network without sudo

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.