connecting to wireless network using terminal "airport" command

Discussion in 'Mac Basics and Help' started by mark2288, Feb 13, 2010.

  1. mark2288 macrumors regular

    Joined:
    Jan 11, 2006
    #1
    Hey all,
    So I'm trying to write some scripts to connect to a network. I used this page to figure out how to get to the terminal version of the airport utility.

    http://osxdaily.com/2007/01/18/airport-the-little-known-command-line-wireless-utility/

    I've tried tons of methods to connect to a wireless network using the:

    sudo airport -A

    command. But have no luck. Has anyone had any luck doing this? I've tried all the suggestions in the comments area. If I'm trying to connect to wireless network Network with password password - what command do I type?

    Thanks!
     
  2. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #2
    When you say "no luck", what is happening exactly? Any error messages?
     
  3. mark2288 thread starter macrumors regular

    Joined:
    Jan 11, 2006
    #3
    I turned security off to see if I could get it working by passing the SSID as an argument. Here are my attempts:

    1.
    nope:public Mark$ sudo airport -A --bssid=PLOrk-dlink
    Network Name (SSID):

    2.
    nope:public Mark$ sudo airport -A -associate=PLOrk-dlink
    Network Name (SSID):

    3.
    nope:public Mark$ sudo airport -A -associate=PLOrk-dlink
    Network Name (SSID):

    4.
    nope:public Mark$ sudo airport -A -ssid=PLOrk-dlink
    Network Name (SSID):

    No dice for any of these. It always asks me for the SSID although I already pass it. This network also exists - I am able to manually connect to it by clicking on the airport icon.
     

Share This Page