dtaweb / android-xbmcremote

Automatically exported from code.google.com/p/android-xbmcremote
0 stars 0 forks source link

WakeOnLan isn't working if remote isn't in same Lan with XBMC computer #387

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
XBMC remote sends broadcast WakeOnLan packet. This work if both remote and XBMC 
computer are in 1 LAN. In case remote isn't in LAN with XBMC computer it won't 
work (for example user doesn't have WiFi and 3g connection to control XBMC - 
You can see Jayman488's posts in this topic 
http://forum.xbmc.org/showthread.php?t=78167&page=3).

Possible solution described in this post: 
http://forum.xbmc.org/showpost.php?p=603747&postcount=28 (simply change from 
broadcast packet to IP specific packet)

Original issue reported on code.google.com by misiekpi...@gmail.com on 13 Sep 2010 at 10:00

GoogleCodeExporter commented 8 years ago
Thanks! Till, can you confirm the issue?

Original comment by phree...@gmail.com on 22 Oct 2010 at 12:32

GoogleCodeExporter commented 8 years ago
Recommend mark this wontfix.

IP addresses have no meaning for WakeOnLan packets, WOL is just a special data 
pattern which has to be delivered to the network card any way possible. 
Broadcasting the packet to the whole LAN is the only way to do this.

WOL from a remote subnet is possible - you need to direct the packet the the 
network broadcast address (eg 192.168.0.255) however most routers will block 
this due to security problems(see Smurf Attacks).

Original comment by cg6...@gmail.com on 30 Aug 2011 at 11:32

GoogleCodeExporter commented 8 years ago
Should be merged into #239

Original comment by mukkenb...@gmail.com on 9 Oct 2011 at 3:06

GoogleCodeExporter commented 8 years ago
I suggest to use the unicast address instead (or allow to choose from 
broadcast, network broadcast and unicast)!

Using the unicast address (e.g. 192.168.3.39) is possible with the wakeonlan 
tool on GNU/Linux.

With unicast address it is possible to set a static ARP entry on the WiFi 
router and let it to forward the magic packet from a WiFi Android to an 
Ethernet XBMC box, despite they are on different subnets.

Original comment by niccolo....@gmail.com on 14 May 2012 at 10:05

GoogleCodeExporter commented 8 years ago
I insist recommending the unicast solution, as implemented by the Wake On Lan 
Android application.

In this way you can configure a Wake-on-LAN proxy which receives the routed UDP 
packet and broadcasts it on its LAN segment.

Making a W-o-L proxy with a GNU/Linux box is simple as running the following 
commands:

ip neigh change 192.168.3.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev eth0
ip neigh add    192.168.3.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev eth0
iptables -t nat -A PREROUTING --protocol udp --dport 9 -j DNAT --to-destination 
192.168.3.254

where 192.168.3.254 is a free IP address used for Ethernet broadcast. Just 
direct the Wake on LAN packet to the proxy and you are done.

Original comment by niccolo....@gmail.com on 15 Jun 2012 at 8:52