WOL (Wake on LAN) script - start a computer remotly
#1
Lightbulb 
trying to use the wol script i have added all mac addresses of the pcs i wish to activate via xbmc wol script, all nics are wol capable and has been confirmed by seeing it on my switch when all machines are off. all pcs in question have wol activated in the cmos settings on the motherboards. even using an xover cable directly doesnt work.



Reply
#2
can you send a wol from pcs to eachother? some older motherboards require a special cable going from the nic to the machine for it to work. i would make sure that this signal works before trying it on the xbox.
Reply
#3
ill try that thankyou for the insight. when you say special cable do you mean a crossover?
Reply
#4
@asteron:

my network card on my pc is onboard, thus there is no wol cable from the netword card to the motherboard.

the wol script is also not functioning for me. i have enabled wol in my computers bios. i have entered the correct mac-adress in the script. but i cannot wakup my pc from the xbox.

is the script working for anybody? can somebody confirm this script works in general?

any hints or tips?



My XBOX built into a Sony Hifi CD-Player Case
XBOX Hifi Media Center Picture Gallery

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
(dragonneus @ jan. 10 2006,04:08 Wrote:ill try that thankyou for the insight. when you say special cable do you mean a crossover?
there is such a thing as a wol cable (small two wires) that connects an nic to the motherboard that could possibly be required (not sure though).

for wol to work it must construct a magic packet that contains
ffffffffffff followed by the mac address 16 times.
Quote:00 ff ff ff ff ff ff
06 00 e0 98 13 45 e2
12 00 e0 98 13 45 e2
**
96 00 e0 98 13 45 e2
i dont have wol setup but remember looking at that script a while ago. you might need to be careful about router settings i suppose? the router might block broadcast traffic. maybe you should send it on a port forwarded to the target computer.
Reply
#6
(asteron @ jan. 10 2006,16:54 Wrote:i dont have wol setup but remember looking at that script a while ago. you might need to be careful about router settings i suppose? the router might block broadcast traffic. maybe you should send it on a port forwarded to the target computer.
router settings. that could be the problem. my computer is connected to the router and the xbox is connected to the router too.

could you please help me which port exactly and which protocol tcp/udp to forward in the router config? so that the magic packet for wakeonlan arrives to my computer and will not be blocked by my router.
i think i cannot configure any port in the wol script, or can i ?

thanks in advance.
My XBOX built into a Sony Hifi CD-Player Case
XBOX Hifi Media Center Picture Gallery

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
do you have a link light even with power off? you should for wol to work.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#8
the magic packet shouldnt care about port... looking at the code it looks like this

Quote: # broadcast it to the lan.
sock = socket.socket(socket.af_inet, socket.sock_dgram)
sock.setsockopt(socket.sol_socket, socket.so_broadcast, 1)
sock.sendto(send_data, ('<broadcast>', 7))

can be changed to something like
Quote: # send to specific computer
sock = socket.socket(socket.af_inet, socket.sock_dgram)
sock.sendto(send_data, ('host_ip', 'port_number'))
replace those last two fields with the pc's local address.
this makes the script less general of course. try setting the router to forward the port to the correct ip.
Reply
#9
Star 
i will certainly try your idea. i have to say though that even if i use a crossover from the xbox directly to the pc (removing the router and switch) it still doesnt work. anyone else have any ideas. i mean i have a seperate room thats my pc lab its not difficult to just turn them on but it would be cool to get this to work.
Reply
#10
and yes nuka1195 i have all link lights on my switch when the power is off to the pcs in question.



Reply
#11
hi

usually the pc has to be shutdown in a state that allows it to listen for wake-on-lan packets. this means that in windows (2000 and xp) you need to tell the driver to do this. if you have let windows use it's driver (a microsoft provided one) when you installed the pc/network card, then you probably won't have this option. i had to install the ones from the 3com site. this will allow you to go to (roughly) control panel - computer management - device manager - network adapters - properties. on the 3com drivers i have under the advanced tab "rwu magic packet", this needed to be set to enable (plus a reboot) for wol to work. you may have something similar under your network drivers.

under linux, i believe a tool called ethtool can set this up, but i've never got it to work with my network cards.


mjh
Reply
#12
Star 
ahhh coolt he info ive been looking for, ill try it and let you all know what ive found
Reply
#13
(asteron @ jan. 10 2006,19:32 Wrote:the magic packet shouldnt care about port...  looking at the code it looks like this

Quote:    # broadcast it to the lan.
   sock = socket.socket(socket.af_inet, socket.sock_dgram)
   sock.setsockopt(socket.sol_socket, socket.so_broadcast, 1)
   sock.sendto(send_data, ('<broadcast>', 7))

can be changed to something like
Quote:    # send to specific computer
   sock = socket.socket(socket.af_inet, socket.sock_dgram)
   sock.sendto(send_data, ('host_ip', 'port_number'))
replace those last two fields with the pc's local address.
this makes the script less general of course.  try setting the router to forward the port to the correct ip.

i have a broadcom onboard network card, and changed the settings in windows xp device manager to wake on lan = magic frame and i also tried wake on lan = wake up frame. nothing works.

but you suggested to forward the port in my router config. but how will that work, because if the pc is off, then the router cannot contact any ip-adress. it has to use the mac-adress like the script does.

so, before i am doing more on trying this out i would like to know if this script is already working for somebody ??
My XBOX built into a Sony Hifi CD-Player Case
XBOX Hifi Media Center Picture Gallery

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#14
the pc should show up on the router if it has wol even if it is off. even when off the nic is somewhat powered to listen for the packet. i dont actually have experience with wol but am just saying how i understand it to work.



Reply
#15
hi all

i made remote wol as an experiment since wake on lan doenst work for me.
i thought the router was a problem so i wrote a script that connects to a site an d that site (writen by myself, source included) that send the magic packet

it has a few advantages over the wol script:
- wake any pc you want (doenst have to be in your lan)
- can bypass routers if you use NAT-forwarding


but it didnt work for me, my router thinks its an attack and whatever i tried it keeps killing the waking packet

so here's the project. Its not done yet but maybe some python devver likes this script and wants to make this into something usefull!

NOTE ! there is no readme and no fancy settings menu. I cant even try if it works!

link:
http://test.familie-gerbers.nl/RemoteWOL.zip


peace out

Jasper
Reply

Logout Mark Read Team Forum Stats Members Help
WOL (Wake on LAN) script - start a computer remotly0