Help needed connecting to a specific router in a wifi network

Discussion in 'macOS' started by lukataylo, Mar 10, 2013.

  1. lukataylo macrumors newbie

    Joined:
    Sep 9, 2012
    #1
    Ok so i am in a student house and there are two routers creating a small wifi network, the problem is one of the routers doesn't work properly, since i don't want any problems with the landlord i cant change it, plus i dont have admin access, the landlord keeps sending repair guys around and instead of changing the router they mess-about with the settings and pretty much change nothing.

    My problem is this, the router that doesn't work has a channel frequency of 1 and the one that does has ch frq. of 9. The router that doesn't work is closer to my room thus my computer always automatically connects to it (only 2-3% difference in signal strength). I have a macbook and i'm on OSX mountain lion , so how can i connect specifically to the channel 9 router every time?
     
  2. switon macrumors 6502a

    Joined:
    Sep 10, 2012
    #2
    Hi lukataylo,

    You don't state whether the two routers have different APs (Access Point names), but assuming that they do, then you can simply go to your System Preferences Network pane and under the Advanced button is a list of Preferred Networks. You can reorder these networks by dragging into the order you wish to connect to them, or you can also delete the offending router entirely so you MBP will never try to attach to it.

    Regards,
    Switon
     
  3. lukataylo thread starter macrumors newbie

    Joined:
    Sep 9, 2012
    #3
    Yeha they both have the same network name Student-living-company, i can only tell which one i am connected to by alt clicking on the wifi button and then seeing which channel the wifi is on

    Here is a link to the smae question i posted on apple support communities with a screenshot https://discussions.apple.com/thread/4876915
     
  4. switon macrumors 6502a

    Joined:
    Sep 10, 2012
    #4
    RE: networksetup and airport commands ...

    Hi,

    I was worried that this was the case. But there is still a solution to your troubles, I believe.

    First of all, since you can see both routers in the Preferred Networks listing, why can't you just delete the one on Channel 1 and keep the one on Channel 9? If this doesn't work, then perhaps you can rearrange their order by dragging the channel 9 to the top of the list. If neither of these work, then you will need to change the channel on your Mac. You accomplish this with a well-hidden and poorly documented command called "airport"; it is located in the following directory:
    /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/

    You will need root privileges to change the channel, but try the following command:
    Code:
    /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -c 9
    Hopefully, this will change the channel your Mac is using to 9, thus it should not attach to the channel 1 AP. If you do an "airport -I" it will return information on your network card, and if you do an "airport --help" it will give very brief help on the command's usage. If you end up needing this "airport" command often, then I would add the above directory to your PATH variable so that you don't have to access it using the long directory name.

    The "networksetup" commands provide a terminal commandline interface to the options handled in the Network pane of System Preferences.

    Good luck,
    Switon
     

Share This Page