Detecting AirPort Power Enabled
Detecting AirPort Power Enabled
- Subject: Detecting AirPort Power Enabled
- From: Bill Cheeseman <email@hidden>
- Date: Wed, 30 Sep 2009 06:57:44 -0400
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?
Bill Cheeseman
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