Question

Is there a way to programmatically reach into the BIOS and turn on the Wake on LAN capability for those machines that support it?

Ideally, the solution would be cross-BIOS, but hitting each of the major vendors with separate solutions would be okay, too.

Was it helpful?

Solution

BIOS configuration is something that the OS intentionally limits to avoid virus problems (lots of bios viruses back in the day!).

You need to look at the system management interface to see if it's available generally. You'll probably need to work in ring0 in windows (or root/kernel in linux). Additionally, you'll likely need to learn how to do this accessing the hardware directly, learning and keeping a database of the most common BIOS manufacturers and types, and even then won't be able to cover all of them.

OTHER TIPS

SMBIOS might help?

I know we had a utility to read the BIOS from a regular windoze program once, at my previous job.

I think you're going to find that Wake on LAN is a CMOS Setup option, and so not programmable via hardware-agnostic OS interfaces.

Dell Inc. provides customers the OpenManage suite of utilities for remotely manipulating Setup settings on its client machines. Some links:

Dell OpenManage
Wikipedia article

There are several steps on enabling Wake on LAN. First it must be enabled in BIOS and second it must be enabled on the network card itself.

In Windows, you can find the settings under the advanced options dialog box for your network adapter. For Linux, you can use ethtool command.

Use ethtool eth0 to display current status for eth0 interface:

Settings for eth0:
        Wake-on: g

Use ethtool -s eth0 wol XYZ to set the option, but remember that not all cards support all WoL methods and that some cards do remember the settings upon reboot, but others do not (then you need to add this command to your startup scripts).

wol p|u|m|b|a|g|s|d...
    Sets Wake-on-LAN options.  Not all devices support this.  The argument to this option is  a  string  of
    characters specifying which options to enable.
    p  Wake on phy activity
    u  Wake on unicast messages
    m  Wake on multicast messages
    b  Wake on broadcast messages
    a  Wake on ARP
    g  Wake on MagicPacket(tm)
    s  Enable SecureOn(tm) password for MagicPacket(tm)
    d  Disable (wake on nothing).  This option clears all previous options.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top