xboxscene.org forums

Author Topic: Xbmc Python Wake-on-lan Script  (Read 18 times)

arturhs

  • Archived User
  • Newbie
  • *
  • Posts: 3
Xbmc Python Wake-on-lan Script
« on: February 14, 2004, 12:19:00 PM »

Hi all,

   today I tried to build a wake-on-lan script to wake up my computer from XBMC. I got a simple script from internet and tried it on xbmc:

import socket

s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.sendto('\xff'*6+'\x00\x50\x2c\x01\x99\x52'*16, ('192.168.200.255',9))

   This script creates a Magic Packet tha has the data portion full-filled with six ff pairs and 16 times the mac addres of my computer.

    I've tried all the noon to make it work but nothing. So, I've realized that I was having some packet generation problem. I've installed a Sniffer and Windows Python on my notebook. I've discovered that this script works well on windows python a the Magic packet is sended to the broadcast address of my network.

    When I try to do the same think with the same script running on xbox, the xbmc python socket sends an ARP resolution packet trying to figure out who is the host 192.168.200.255. I think that this could be a TCP/IP problem, because this address is a broadcast address for the network, and the TCP/IP knows that.

    Because o this the Wake-on-Lan script is not working on XBMC python, but works ok with Windows python.

    If some one could help, or the XBMC python developers could help we will be pleased.
Logged