Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mark2288

macrumors regular
Original poster
Jan 11, 2006
239
4
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!
 
When you say "no luck", what is happening exactly? Any error messages?

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.