[Plugin] [CLOSED] WOL-PowerManager (6 Viewers)

Status
Not open for further replies.

Guzzi

Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    Hi.
    Sorry, I can't tell. I've got compiled binaries from Seppi and tested them until we got a working solution. I've never seen the source (I am no developer at all) But I found some of the old conversations between Seppi and me, maybe this helps:
    Until now I think the problems occurs because of different DNS Server settings. Our DNS Server saves the IP of every client, even if it's offline. If WOL-PowerManager tries to Wake up a offline client he asks the DNS Server, which IP the Domain of the Server has. Your Server seems to don't save the IP and returns a error.
    Lots of the conversation was in IRC and is gone forever... But this was the main problem, I remember...
    Well, WOL sould always be done with an IP address, not depending on a DNS name.
    Anyway, maybe you can ask Seppi via PM if he is still supporting ths plugin - if not, I'd suggest to e.g. commit the code to MP-Plugin repository, so it is available to the community - but best would be of course, if Seppi updates the current Repo and republishes an updated version ...
     

    GJC

    Portal Pro
    March 10, 2012
    97
    11
    Home Country
    Canada Canada
    Sorry for the delay getting back to this problem, but it's been crazy at work these days.

    I don't see why any entry in the hosts file would be necessary if you have the "Use IP instead DNS name" option checked. All the hosts file does is convert the server name to an IP address locally, like a local lookup table, removing the need for DNS.

    I believe that the problem occurred because the broadcast address that was being used was 255.255.255.255, which, as I understand, requires the router to route the packet based on entries in the router's ARP table. If you have dd-wrt then you can add permanent entries to the ARP table to work around the problem, but that's not really the best solution.

    The fix that I provided uses the subnet mask to include the subnet in the broadcast IP. This way the broadcast doesn't need routing (which is why it works for wireless access points). As it is a broadcast to the entire subnet, there's no need to have the server's IP in any ARP table.

    I removed the entry in my hosts file and found that WOL still works fine with the new plug-in (where it used to be necessary). I'm surprised that your testing still shows it to be an issue. Did you have the "Use IP instead DNS name" option checked? You should leave this checked always IMO, why force a DNS lookup when you don't need to?

    As I can't reproduce the issue anymore, I'm afraid that I can't be of much further help. If you have anything you'd like me to try, then please let me know.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Hi.
    For me there is no difference between "Use IP instead DNS name" option checked or not, as long as I don't have those entries in hosts. I always get this:
    wol-1.jpg


    BTW "Spock" is the name of my server. All my PC are named after Star Trek characters and my workgroup is called "Sternenflotte" (German for "Star Fleet")...
    No firewall is active, no AV software or something like that (only windows defender is there, but this should not do any harm).
    Here is my config:
    wol-2.jpg

    wol-3.jpg


    I've tried different ports for ping, did not help... The HTPC (Pille) is on IP 192.168.1.55 so it's in the same subnet, the same workgroup, the same router,...
    And ping is working from command prompt without any issues. Same is for WOL with WOLCMD.exe

    As soon as I modify the hosts all went well. So I definitely can live with this, as the modification don't do any harm at all. V0.3 has worked without the hosts modifications but I don't understand what's different...
     

    GJC

    Portal Pro
    March 10, 2012
    97
    11
    Home Country
    Canada Canada
    Thanks for the feedback Lehmden.

    Ping won'twork if your server is asleep, so it's clearly not waking up. Can you please double-check the subnet on your router using ipconfig?

    Did you assign the server a static IP at the router (using the router configuration pages)? Leave your server TCP/IP configuration at DHCP, but go into your router setup and reserve IP 192.168.1.99 for the server. Set the WOL PowerManager back to port 7, check the "WOL on MediaPortal Startup" box then try again.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Can you please double-check the subnet on your router using ipconfig?
    It is definitely the same subnet with mask 255.255.255.0. All used IP addresses are starting with 192.168.1,xxx

    Did you assign the server a static IP at the router (using the router configuration pages)? Leave your server TCP/IP configuration at DHCP, but go into your router setup and reserve IP 192.168.1.99 for the server.
    I always have static IP addresses. Fix on all PC and! all reserved in Router. DHCP normally is only for Smartphone (not able to give a fixed IP here) or guests. And DHCP IP Range starts at .101 so it can't collide with my fixed IP Addresses between .2 and .99. The router itself has .1

    Set the WOL PowerManager back to port 7, check the "WOL on MediaPortal Startup" box then try again.
    I've done this at first. I've tried Port 0 only because it's the default Ping Port, but this did not change anything. If I had modified the hosts, Port 0 did work the same as Port 7, if I don't have modified the hosts Port 0 or 7, both did not work..
     

    GJC

    Portal Pro
    March 10, 2012
    97
    11
    Home Country
    Canada Canada
    You can try turning on Debug level logging for MP and then look in the log for the word "broadcast". You can then verify that the broadcast address being used is 192.168.1.255.

    I don't have the 0.3 source code, so I can't compare sources to see what has changed. If WOLCMD successfully wakes the computer, then we are still probably doing something not quite correctly.

    I'm afraid that I'm at a bit of a loss at this point. If you have the source for 0.3, then please send it to me so that I can do a quick comparison.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,562
    3,944
    Lehmden
    Home Country
    Germany Germany
    Hi.
    If you have the source for 0.3
    That could make things a lot easier, but I never have seen the source..

    Thank you very much for your work. Without this we couldn't use WolPowerManager on MP1.3 at all..
     

    GJC

    Portal Pro
    March 10, 2012
    97
    11
    Home Country
    Canada Canada
    Hi Lehmden,

    Can you please reproduce the issue again with MP set to Debug log level and attach the MP logs? I revisited the code and there's a log message that may shed some light on this. It looks like the plug-in is trying to send a ping before attempting to wake the machine and the ping throws an exception, so the wake-up packet is never sent. I'm not sure why a ping is attempted before waking the server, but I'd like a bit more detail on the exception before I implement a fix.
     

    GJC

    Portal Pro
    March 10, 2012
    97
    11
    Home Country
    Canada Canada
    Hi again Lehmden,

    Please give this version a try and let me know if it fixes the ping problem.[DOUBLEPOST=1345520591][/DOUBLEPOST]PS: This installer only installs the dll file, no xml configuration file. I think this should be ok as the configuration should display defaults for a new installation and create the xml file once the user saves the configuration.
     

    Attachments

    • WOLPowerManager.mpe1
      92.8 KB
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom