Ad Hoc terminal command to set-up for Lion OSX... need help!

Discussion in 'Mac OS X Lion (10.7)' started by hatbe, Jan 9, 2012.

  1. hatbe macrumors newbie

    Joined:
    May 12, 2011
    #1
    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
     
  2. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #2
    Look into this :

    Code:
    # networksetup -printcommands
    # networksetup -help
    Good luck.
     
  3. hatbe thread starter macrumors newbie

    Joined:
    May 12, 2011
    #3
    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
     
  4. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #4
    The only other command is :

    Code:
    # /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
    Otherwise, why not just do it with AppleScript ?
     

Share This Page