Force wifi to specific BBSID. (force 5ghz)

Hello,

I've been trying to find a solution for last two days about a problem I found using Yosemite on my Macbook Air.

I'm sometimes in conferences where there are a lot of people connected to the same router (which is probably the closest determined by every OS) and this router has the same name where ever you go in the building, so anywhere you go you get instant connected to it. Problem is that in conference rooms everyone seems to be connected to the same router which becomes really slow.


There I decided to think: What if I force my mac to connect to another router (others are not that far) maybe I will get a better connection and will not get my VPN disconnected every 5 minutes.


So I did search over the internet and first found the following commands:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport --associate=XXX --bssid=YYY

xxx= SSID/network name yyy= BSSID

The problem is that this command won't work on OS X versions before OS X 10.6, I get an error like (invalid command --associate)... (alright......)


So I found another guy who talked about forcing to connect to a specific canal using this command (let's start some annoying fixing ok..):

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport --channel=num

num= the canal number (ex: 6, 12, 1)

I did try that last one, without any success.


I'm currently at home, my ISP is Orange and we get a router that supports 2.4 and 5ghz at the same time on different canals but both use the same SSID/network name. When I get close to my router and restart wifi my mac will connect to 5ghz, but when I will go farer and get a -70 RSSI (or more) it will automatically connect to 2.4ghz.

Some people said that they contacted Apple support and this one said that there was no way to connect to connect to the BSSID you want, this is like that.

Can someone confirm?





What came in my mind is: Am I safe?

What annoys me on my macbook is that when I open it, it wakes up and immediately connect to Wifi routers I previously logged on, but ONLY using SSID (network name)!!!

(ex: I can connect to McDonalds public wifi hotspot from one place, if I go to another McDonald it will automatically connect to that one!)

So immediately you think: What if a hacker creates a fake wifi hotspot with name "Company XXX Wifi", my macbook will probably get connected to it (my company has no wifi password) and what if that hacker is rooting this hotspot to the real company one which gets internet/intranet, I will open safari and browse personal informations without even knowing I'm on the fake hotspot! and all my data will go clearly through the hacker)


I can understand it is easier to make it work this way, but what about enterprises?

Is there is a way first, to disable that insecure "auto-connect to known SSID" feature but BSSID instead? (even if it is spoof-able but it makes a layer of protection against hackers kiddies)

Or even to have to choose to connect back or not when you open your computer from sleep?


And of course: How the **** do you select a specific network that has the same name?!

MacBook Air, OS X Yosemite (10.10.1)

Posted on Jan 18, 2015 7:12 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 28, 2016 3:41 PM

You could try this open source solution:

https://github.com/qpSHiNqp/airport-bssid


Use google translate to check out.


In Nihongo (also a little propaganda)

Recent Mac airport command can not connect to AP with BSSID specification. qpSHiNqp the Interop Tokyo when had participated as STM in 2013, it has created a tool that can be Assoc in BSSID is specified because this it was troubled by the cause.

Interop Tokyo has a huge huge exhibition network called ShowNet and a huge number of APs used by visitors and exhibitors etc. are installed.These APs are blowing WiFi of several different policies Of course, things of the same policy are offered with the same ESSID (usually called SSID) ESSID is a type of hidden / encapsulation that allows users to use WiFi without being aware of individual AP settings Meanwhile, since the task of conducting the connectivity test at the individual AP level also occurs as in the case of the network construction unit, the Association at the BSSID level is carried out from the relation between the AP and the BSSID obtained beforehand It is desirable that communication checking is possible at the AP level.

From such circumstances, I raised the tools I made in 2013 to github, but for some time over the past few months, issue reports from foreign users got up and finally the network construction period of Interop Tokyo 2016 also started I thought that I will maintain it for a long time, so I think that there are incomplete parts, but if you find a bug, please report Issue, if you like it, Star will be my best pleasure, especially , Issue report from Makuhari group responds as much as possible on the same day. Please do your best this year as well.

24 replies

Feb 1, 2017 1:51 AM in response to rccharles

Hi,


Just tried it and it worked brilliantly with macOS Sierra (10.12.3).


A few tips:

1 - make sure to download the binary file.

2 - grant execution permissions in Terminal (chmod a+x /path/to/airport-bssid)

3 - the interface name to use in the command should be en0, not eth0

4 - if you execute './airport-bssid en0' first, it will scan the network for you, so you can copy-and-paste the BSSID

5 - when executing './airport-bssid en0 BSSID password', make sure to enclose the password in quotation marks.


Hope this helps,

Fabrizio

Sep 23, 2017 9:40 AM in response to pmcdunnough

pmcdunnough wrote:


I did make an Automator app and put it into the login items. That works but the moment the iMac sleeps it seems to revert to channel 11. I then have to run the app again. Not difficult but not ideal.

SleepWatcher

<http://www.bernhard-baehr.de>

can run shell code when your Mac wakes up. I a few weeks ago, I tested it on Sierra for another reply that needed to perform a tasks at sleep or wake

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Force wifi to specific BBSID. (force 5ghz)

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