2

I have been investigating.

I want to wake-on-lan a PC I have on the same LAN as the Raspberry Pi.

Wake on LAN doesn't work over the internet, so, I though to use the Raspberry Pi to wake up my PC. Using a binary would be fine.

I have found some binaries that would do the job, but since I am using OPENELEC on my Raspberry Pi, I can not download them. Here are some tools I have found:

  • wol
  • etherwake
  • wakeonlan

afaik, any one of those would work. But I can not find the binary, only the sources or download via repository.

I need the binary to run on my OPENELEC Raspberry Pi. Could someone compile it or share one that would work?

Thanks!!

I have also found these tools:

WOL Repeater using Arduino

Raspberry Pi as WOL Forwarder

Jivings
  • 22,538
  • 11
  • 90
  • 139
mushi
  • 123
  • 2
  • 8

1 Answers1

5

Finally i could solve it. a simply python script to send a magic packet.

replace the QQ on the last line with your target pc's MAC address. with lowercase. just exec it, and voilĂ ...

#!/usr/bin/env python
import socket

s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.sendto('\xff'*6+'\xQQ\xQQ\xQQ\xQQ\xQQ\xQQ'*16, ("255.255.255.255",9))
mushi
  • 123
  • 2
  • 8