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

hatbe

macrumors newbie
Original poster
May 12, 2011
4
0
Hi,

I'd like to set up 2 MacBook Air running Lion OSX to connect via Ad Hoc network USING terminal command ( I already know how to set-up via GUI)

The steps would be:

1. Create Ad Hoc network on the first MacBook
2. Then from the second MacBook, make a connection to the wireless network on the first MacBook.

Please share the terminal commands if you know anything about this!!!

Thanks in advance,

HB
 
Look into this :

Code:
# networksetup -printcommands
# networksetup -help

Good luck.

Hi,

I've tried network setup command, and find the solution for #2 answer, to connected to an ad hoc network:
networksetup -setairportnetwork en0 <network_name> <password>

But I can NOT find the command to create computer-to-computer network, with this command (in the GUI) there is an option to enter "Network Name", Channel # and Security.

I would be appreciated to any help.

BTW, I need to use the terminal/networksetup of some kind of CLI to incorporated in to the script.

Thanks again...

HB
 
The only other command is :

Code:
# /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

Otherwise, why not just do it with AppleScript ?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.