Re: Detecting AirPort Power Enabled
Re: Detecting AirPort Power Enabled
- Subject: Re: Detecting AirPort Power Enabled
- From: Allan Nathanson <email@hidden>
- Date: Wed, 30 Sep 2009 08:41:53 -0400
On Sep 30, 2009, at 6:57 AM, Bill Cheeseman wrote:
I've written a Cocoa method using the System Configuration framework
to detect whether the AirPort card is powered on. I first test the
current network configuration set for a network interface of type
kSCNetworkInterfaceTypeIEEE80211 (AirPort). Then, if one is present,
I get its configuration dictionary and extract the value associated
with its "PowerEnabled" key. A user is reporting that this returns
nil because the dictionary does not contain a "PowerEnabled" key at
all. I thought it was illegal for a kSCNetworkInterfaceTypeIEEE80211
interface to have a configuration dictionary that does NOT contain
the "PowerEnabled" key, so i didn't test for nil.
1. Can a kSCNetworkInterfaceTypeIEEE80211 interface configuration
dictionary lawfully omit a "PowerEnabled" key? Under what
circumstances? Can anybody point me to documentation?
2. I'm doing this in an app that uses the Snow Leopard Core Location
facility to detect (but not join) wi-fi hotspots. Am I correct in
assuming that it could not detect wi-fi hotspots without (a) an
IEEE80211 interface configuration dictionary (b) whose
"PowerEnabled" key reports that the power is turned on?
The configuration dictionaries contain keys/values that specify and/or
change the configuration. If a key/value is absent than a default
value is assumed. For the "PowerEnabled" key, I believe that we
assume that the AirPort interface should be enabled unless we see that
it has explicitly been turned off.
- Allan
_______________________________________________
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