Hi to all!

I heard that there are network adapters which can power on the computer in a local network when it receives some package from other computer. If it is the truth how to write the program which will make it?

Posted on 2003-10-01 10:21:58 by Mike
This isn't a software thing.

Some cards have a small plug with three or four prongs marked WOL.
It stands for "Wake On LAN" and the cable goes from it to the WOL on your motherboard. Normally you have to enable it in your BIOS settings, and after that, the machine will wake up whenever theres network noise (wake up from standby powersaving state).
It's actually really similar to the one that carries Digital Audio signal from your CDPlayer to the motherboard (if you have that).
Posted on 2003-10-01 10:58:43 by Homer
Hi EvilHomer2k!

I understand you. I must buy a card with WOL option and plug it. But later I must wake up some one computer in the network, not all. E.g. I have 5 computers with IP,,, and All computers are active except third and fifth (IP = and Can I power on only third computer if I send ping or it wake up whenever I power on any computer or hub ?

Thanks, Mike
Posted on 2003-10-01 11:51:17 by Mike
Please remember not all motherboards support this WOL feature.

Also consider that it's a WAKE function, which means the client is in a SLEEP mode. Please don't confuse this SLEEP mode with being TURNED OFF.

WOL will NOT turn a computer ON.
WOL will NOT turn a computer ON on most older motherboards. Thanks f0dder for the additional info.

Regards, P1 :cool:
Posted on 2003-10-01 12:18:32 by Pone

Thank you, now I have understood all. I should itself make a gear from chips, connect it to the serial port and in this cas one computer can turn on another ones.

Regards, Mike
Posted on 2003-10-02 05:39:05 by Mike
Back in days gone by ....

There was remote power control devices, very much like what you described.

If you browse some, they even have one to control power from the internet or intranet.

Regards, P1 :cool:
Posted on 2003-10-02 11:49:07 by Pone
Make a search for "Magic Packet",if you send such a packet to a mac-address you can wake up the computer. I have tried that myself and know it works.
Posted on 2003-10-03 00:14:30 by WinCC
Wake on LAN _does_ power on the computer from power-off state, not just sleep/standby. Of course this only works with ATX PSU+motherboard combinations, as those do keep a little power in the system even when turned off.

As mentioned previously, do a search for "Magic packet" - thEse are the magic bytes required in a ethernet packet to make the NIC power-on the system (unless it's lame and does WOL on any "line noise"). I'm curious how you'd send a packet like this over the internet, though - the existing programs I've seen are for local networks, as they send to a specified MAC address - which means you use it to turn on a single computer (dunno if you can send to the broadcast MAC address...)
Posted on 2003-10-03 05:13:43 by f0dder
makes possible to switch on a computer from a second one by sending a "Magic Packet". Both of computers can be located on the same LAN or on the different LAN segments.

Requirements to use the WOL (Wake-On-LAN)
# An ATX motherboard with an onboard, 3-pin "WOL" connector.
# An ATX power supply that meets ATX 2.01 specifications.
# A network card that can support WOL with its cable to the motherboard properly installed.
# In the BIOS Power Management, you must enable the LAN Wakeup option.
Posted on 2003-10-08 22:04:36 by illwill
Thanx to all!

Later I'll try to send something with my programs but I can't understand how can adapter to recieve any data when Windows inactive....

Posted on 2003-10-09 09:32:29 by Mike
Mike, with ATX there's always some amount of power in the system, and this happens at the hardware level. If the NIC sees a Magic Packet, it shorts the WOL pins which causes the motherboard to active the ATX power supply - just like shorting the "pwrbtn" pins do.
Posted on 2003-10-09 11:38:31 by f0dder
Good. But will this program work?

invoke WSAStartup,101h,ADDR wsadata
.if eax
mov eax,1

invoke IcmpCreateFile
mov hPort,eax

invoke IcmpSendEcho,hPort,IP,addr PingStr,sizeof PingStr - 1,0,pEchoReply,sizeof ICMP_ECHO_REPLY,TimeOut
push eax

invoke IcmpCloseHandle,hPort
invoke WSACleanup

Posted on 2003-10-10 05:58:16 by Mike
I don't think you example will work as it stands.

A WOL magic packet must contain FFFFFFFFFFFF followed by the MAC address of the machine to wake up repeated 16 times. This packet can be included inside any other valid network packet, so the easiest way to send it would be to use UDP, send it to the broadcast address, as you may have trouble getting the destination IP/MAC address of a machine that is switched off. The source and destination port should not matter, but the UDP packet must have the magic packet sequence contained within it. This means that only a single client can be turned on at once, as the frame only contains a single MAC address.

Posted on 2003-10-10 06:22:17 by Nick
Well spoken, but I must mention that "cheap and nasty" cards with WOL will wake up on ANY packet referring to them by MAC.
They wake on the first packet but don't actually process that packet.
The cheap ones wake fast and process the second packet they catch, which is the first after they wake that refers to them by MAC.
(I'm hinting that they DROP packets while waking ;) )
Posted on 2003-10-11 07:54:30 by Homer
This program only sends a ping. Everybody may use any data including

pingstr db 0FFFFFFFFFFFFFh
db 16 dup (010203040506h) ; That's example of MAC address

But for sending I can use
invoke send,hSock,addr Buf1,eax,0 (socket may be created as you say)
invoke IcmpSendEcho,hPort,IP,addr PingStr,sizeof PingStr - 1, 0, pEchoReply, sizeof ICMP_ECHO_REPLY, TimeOut

What method is better?
Posted on 2003-10-11 08:38:47 by Mike