[mythtv] HDHomeRun discover broadcast

David George david at thegeorges.us
Tue Oct 31 14:27:27 UTC 2006


On 10/31/2006 4:36 AM, Jafa wrote:
> Hi guys,
>
> The HDHomeRun uses a simple address resolution protocol over broadcast
> UDP. The HDHomeRun with the matching DeviceID responds to the UDP
> broadcast thus telling the requestor the IP address of the HDHomeRun.
>
> The version of the hdhomerun lib used in MythTV sends out a global
> broadcast (255.255.255.255). If the machine has multiple interfaces then
> it looks like Linux will only send it out one interface. Windows also
> does weird things - it will send it out all interfaces but with the
> source address from only one interface.
>
> The solution is to iterate all IP addresses on all interfaces to send
> out subnet-broadcasts.
>
> I have this working under Windows using the built in API and under Linux
> using the netlink/route2 API.
>
> The potential issue is that this fix introduces a new library
> dependency. The Ubuntu distribution includes the library as standard but
> you need to install libnl-dev and route2-dev for it to compile.
>   
Can you use the SIOCGIFCONF and SIOCGIFADDR ioctl's for Linux?  I use it 
to loop through the interfaces and get the IP addresses.  There should 
be plenty of examples if you search on google.  Didn't require any 
dependencies IIRC.

-- 
David



More information about the mythtv-dev mailing list