How to Enable Wake on LAN programmatically
Asked Answered
C

4

2

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.

Chartreuse answered 21/4, 2009 at 22:54 Comment(0)
V
4

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.

Volny answered 21/4, 2009 at 22:58 Comment(0)
V
2

SMBIOS might help?

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

Varicose answered 28/4, 2009 at 21:31 Comment(0)
D
0

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

Discomfit answered 9/7, 2010 at 21:22 Comment(0)
H
0

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.
Hubbard answered 5/1, 2012 at 13:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.