A convenient Objective-C function for sending a WOL message into your LAN.
You need:
- http://objective-c-functions.blogspot.com/2013/08/wol-wake-on-lan-within-custom-subnet.html
/** Broadcast a Wake On Lan (WOL) messagge to the specified MAC address.
MAC address must be in the 12:34:56:78:9A:BC format.
@param mac The MAC address to wake up.
@return Returns true on success, false otherwise.
@see wakeOnLanByMacAddress:usingSubnet:
*/
+ (BOOL)wakeOnLanByMacAddress:(char *)mac {
return [LMFunctions wakeOnLanByMacAddress:mac usingSubnet:"255.255.255.255"]; // Broadcast to everyone.
}
Download the ready-for-use source file (.m) of WOL: Wake On Lan (with broadcast message)
No comments:
Post a Comment