Is it possible to get confirmation of Wake On Lan?

Help each other out

Is it possible to get confirmation of Wake On Lan?

Postby rungabic on Mon Apr 11, 2005 7:32 pm

I posted the following in the HTPC forum at AVS, but of course it got swallowed up immediately -- maybe you guys are the best sources of information for this anyway:

I have a setup similar to many of you out there -- a media server stuck in a closet, along with a few PCs around the house that pull video and audio from it (all PCs are running WinXP Pro).

It's easy enough to power up the media server from another computer (using WOL), but I'd like to get feedback of when the media server is fully booted into Windows and is ready for action (a process that takes a good few minutes in my case). I suppose I could stick a batch file in the server's startup folder to send an ugly "net send" message to all PCs on the LAN, but I'd really like such a confirmation to be sent ONLY to the specific machine that sent the WOL request (is this even possible?).

Similarly, if the media server is already running, and someone tries to wake it up, I'd like that PC to get a message right away that the server is already on and ready.

So that's the general set of events -- is it possible to have a simple, elegant system for getting feedback of a hidden server's readiness? In practice, I probably will be settling on XLobby, but since I'm not aware of any front-ends that handle this feedback loop, the question is more of a general one, although a way to integrate this feedback into the XLobby GUI (or whatever) would be icing on the cake. All knowledgeable advice is greatly appreciated!

Thanks,
Brent
rungabic
 
Posts: 36
Joined: Sun Jun 22, 2003 2:30 pm

Postby lar282 on Tue Apr 12, 2005 6:57 am

WOL is just fire and forget but u can prob do it easy with a simple script

1/fire the WOL packet
2/ping the computer and wait for good response
3/ wait another 10 sec
4/all done



//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby tswhite70 on Wed Apr 13, 2005 6:54 pm

Lar282 is right about magic packets, it is definitely a one way street. Below is a fleshed out dos batch file with some status messages like Lar282 suggested... (Add your WOL command into the batch file where the place holder is, and call the batch with the servername or just replace %1 with the servername or IP directly in the batch).

Echo Off
set _servername=%1

PING -n 1 -w 200 %_servername% | FIND "Reply from " > NUL
IF NOT ERRORLEVEL 1 GOTO EOF

:WOL
net send Waking Server....
echo Place your WOL command here!

:CheckPing
:*Double pings are so that it actually waits between pings, in this case 30 seconds
PING -n 1 -w 30000 %_servername% > NUL
PING -n 1 -w 200 %_servername% | FIND "Reply from " > NUL
IF NOT ERRORLEVEL 1 GOTO WAIT
GOTO CheckPing

:WAIT
:*Wait another 30 seconds from 1st successful ping for server to be ready
PING -n 1 -w 30000 xxxxxx > NUL
PING -n 1 -w 200 xxxxxx > NUL

:EOF
net send Server is online!

:************************** End Batch ************************

Of course you could write the batch file in whatever language you want, maybe even do all the logic in girder. If you are adventerous you should also be able to use sendmessage.exe or girder to pop up the status messages as overlays in Xlobby instead of using net send.

good luck,
tsw
tswhite70
 
Posts: 318
Joined: Tue Jan 06, 2004 3:44 pm
Location: Houston, Tx

Postby rungabic on Thu Apr 14, 2005 8:40 pm

Thanks for the help, guys! I'll pore over this stuff & try to get my head around it all :wink:

Brent
rungabic
 
Posts: 36
Joined: Sun Jun 22, 2003 2:30 pm