WOL (Wake on LAN) script - start a computer remotly

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
dragonneus Offline
Junior Member
Posts: 11
Joined: Jan 2006
Reputation: 0
Lightbulb    Post: #1
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.
find quote
Asteron Offline
"Skilled" Python Coder
Posts: 933
Joined: Feb 2004
Reputation: 0
Post: #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.
find quote
dragonneus Offline
Junior Member
Posts: 11
Joined: Jan 2006
Reputation: 0
Post: #3
ill try that thankyou for the insight. when you say special cable do you mean a crossover?
find quote
sCAPe Offline
Fan
Posts: 441
Joined: Mar 2005
Reputation: 0
Location: Germany
Post: #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: badge.gif]
find quote
Asteron Offline
"Skilled" Python Coder
Posts: 933
Joined: Feb 2004
Reputation: 0
Post: #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.
find quote
sCAPe Offline
Fan
Posts: 441
Joined: Mar 2005
Reputation: 0
Location: Germany
Post: #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: badge.gif]
find quote
Nuka1195 Online
Skilled Python Coder
Posts: 3,916
Joined: Dec 2004
Reputation: 17
Post: #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/
find quote
Asteron Offline
"Skilled" Python Coder
Posts: 933
Joined: Feb 2004
Reputation: 0
Post: #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.
find quote
dragonneus Offline
Junior Member
Posts: 11
Joined: Jan 2006
Reputation: 0
Star    Post: #9
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.
find quote
dragonneus Offline
Junior Member
Posts: 11
Joined: Jan 2006
Reputation: 0
Post: #10
and yes nuka1195 i have all link lights on my switch when the power is off to the pcs in question.
find quote
Post Reply