[Pending] - Configure broadcast address for WOL

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by TheNoctambulist, August 18, 2013.

  1. TheNoctambulist

    TheNoctambulist Portal Member

    Joined:
    January 27, 2013
    Messages:
    23
    Likes Received:
    14
    Gender:
    Male
    Ratings:
    +25 / 0
    Home Country:
    Australia Australia
    This patch allows the user to configure the broadcast address used for WOL of the TV server to something other than the global 255.255.255.255, e.g. 192.168.5.255.

    This is needed because of the Win 7 behavior of only sending global broadcasts on one interface. If you have multiple network interfaces (this happened to me after I installed Virtual Box) then the WOL broadcast may not be sent out on the interface that connects to the server. Refer to this discussion on ServerFault for a more detailed explanation of the difference between Win XP and Win 7 behavior with global broadcast.



    There are two components to the patch
    1. WolBroadcastAddress.patch updates the TV plugin to use the configured broadcast address.
    2. WolBroadcastAddress_SettingsUI.patch adds the broadcast address to the Wake-On-Lan configuration section.
     

    Attached Files:

    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Thanks for the patch (y)
    These days we really like to avoid adding additional settings unless it is really necessary. Just wondering whether it would be possible to get the same functionality without adding a setting by putting the call in a loop like this:
    Code (Text):
    1.         IPHostEntry local = Dns.GetHostEntry(Dns.GetHostName());
    2.         foreach (IPAddress ipaddress in local.AddressList)
    3.         {
    4.           // send broadcast packet on interface
    5.         }
    6.  
    Could you confirm?
     
  4. TheNoctambulist

    TheNoctambulist Portal Member

    Joined:
    January 27, 2013
    Messages:
    23
    Likes Received:
    14
    Gender:
    Male
    Ratings:
    +25 / 0
    Home Country:
    Australia Australia
    Good idea.

    I had a look, and it is possible to determine the broadcast address for all interfaces using functionality in the System.Net.NetworkInformation namespace. I have attached an alternative patch that uses this approach.
     

    Attached Files:

    • Like Like x 1
  5. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Looks good to me! (y)
     
    • Thank You! Thank You! x 1
  6. Holzi
    • Team MediaPortal

    Holzi Super Moderator

    Joined:
    April 21, 2010
    Messages:
    7,928
    Likes Received:
    1,591
    Gender:
    Male
    Location:
    Ba-Wü
    Ratings:
    +2,228 / 8
    Home Country:
    Germany Germany
    Show System Specs
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!