Re: Script to create a network
Re: Script to create a network
- Subject: Re: Script to create a network
- From: Jonathon Kuo <email@hidden>
- Date: Wed, 18 Aug 2010 17:09:34 -0700
Hi Terry,
Yes, you are correct in that setting a password seems to trigger encryption. A 5-char ASCII password sets WEP/40, for example. The WEP encryption setting is verified using iStumbler.
But, there's an odd anomaly with this. When a password is set on the network, I'm prompted to enter a password from my MacBook or iPhone to connect to it, but even if the password I enter is incorrect, it still connects me! Strange...
-Jon
On Aug 18, 2010, at 1:51 PM, Terry Simons wrote:
> Since you can only have a password on encrypted networks, that
> dictionary parameter is likely what you need to use. Try setting it
> and see what happens.
>
> Mac OS X does not support IBSS networks with WPA-PSK, so you're
> probably out of luck there.
>
> My guess is that your password length will trigger the proper
> encryption type to be used, but I think you'll probably be limited to
> WEP 40/104. Try using hex-only keys that are the proper length for a
> 40 or 104 bit network respectively.
>
> You could try setting a 64-byte WPA-PSK key and see if it enables
> WPA-PSK, but I don't think that will work...
>
> - Terry
>
> On Wed, Aug 18, 2010 at 10:35 AM, Jonathon Kuo
> <email@hidden> wrote:
>> I just came across the enableIBSSWithParameters:error: method too. Looks promising but I don't see how to add an encryption to it (WEP/WPA), it seems only to allow network name, password, and channel in the parameters dictionary. Otherwise, this would be perfect. The commandline tools you mention will deserve a serious looking into.
>> Thanks!
>> -Jon
>>
>> On Aug 17, 2010, at 4:14 PM, Michael VanLandingham wrote:
>>
>>>
>>> Aside from the previously mentioned CoreWLAN Framework (specifically, the look at the enableIBSSWithParameters:error: method of the CWInterface class), there are also 2 command line tools that might be used to accomplish this (either one or both together): "networksetup" and "airport". The airport tool lives @ /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport, although on my system it's soft linked to /usr/local/bin/airport.
>>>
>>> The 'networksetup' tool lets you (supposedly) configure any of the network settings that the System Preferences GUI lets you, although a cursory glance at the man page for it didn't reveal anything about setting up ad-hoc networks, which is why you probably need to look at 'airport'. I'd personally go the CoreWLAN route if you can, as it's better documented, and that airport tool might change in the future (I think it did for SnowLeopard actually). If you search for "scripting ad-hoc network os x", or something along those lines, you might find a ready-made solution.
>>>
>>> -mv
>>>
>>> On Aug 17, 2010, at 9:42 AM, Jonathon Kuo wrote:
>>>
>>>> Thanks, Tom. That gives me a place to start.
>>>> -Jon
>>>>
>>>>
>>>> On Aug 16, 2010, at 6:30 PM, Tom marchand wrote:
>>>>
>>>>> I asked a similar question earlier in the year and was pointed towards CoreWLAN. Unfortuneatly for me I am still using 10.5 and CoreWLAN requires 10.6.
>>>>>
>>>>>
>>>>> On Aug 16, 2010, at 8:04 PM, Jonathon Kuo wrote:
>>>>>
>>>>>> So... is there an Apple framework that might I utilize to create a 'computer-to-computer' network?
>>>>>>
>>>>>> On Aug 13, 2010, at 10:47 AM, Jonathon Kuo wrote:
>>>>>>
>>>>>>> In Network Preferences there's a panel in the GUI to create a computer-to-computer network. This works fine. The only problem is that upon reboot, the network gets 'uncreated' and has to be created manually again each timeā¦
>>>>>>>
>>>>>>> I'd like to write a script that gets run when the system boots to create such a network, but I don't know what commands the GUI executes behind the scenes to actually create the network. How can I accomplish this?
>>>>>>>
>>>>>>> Mac mini OSX 10.6.4
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>>> Macnetworkprog mailing list (email@hidden)
>>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>>
>>>>>>> This email sent to email@hidden
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>> Macnetworkprog mailing list (email@hidden)
>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>
>>>>>> This email sent to email@hidden
>>>>>
>>>>> _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Macnetworkprog mailing list (email@hidden)
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>
>>>>> This email sent to email@hidden
>>>>>
>>>>
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Macnetworkprog mailing list (email@hidden)
>>>> Help/Unsubscribe/Update your Subscription:
>>>>
>>>> This email sent to email@hidden
>>>
>>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Macnetworkprog mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden