Re: [TF-DI] using mDNS for discovering gateways

Hi Dave,

there are examples for ESP8266 / Arduino which might provide some insight (not my code):

https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266mDNS


http://gkaindl.com/software/arduino-ethernet/dhcp


Kind regards,
Thomas

> On 01 Apr 2016, at 13:03, Dave Raggett <dsr@w3.org> wrote:
> 
> I’ve implemented a small mDNS client as a means for my C++ based web of things server for microcontrollers to discover a gateway, and wonder if anyone else has been exploring this approach and would care to swap notes?
> 
> This is aimed at IoT devices with IP connectivity. When the device starts up, it uses DHCP to set up the network parameters and then uses mDNS to discover the gateway.  The device then registers its “things” as proxies on the gateway, which is likely to be a more powerful device, e.g. running Linux, such as a Raspberry Pi or Intel Edison.
> 
> I am currently using the dns-sd command line tool to register the gateway as a discoverable service. However, OS X is setting the time to live to only 120 seconds for the DNS “A” records that declare the IPv4 address for a service. OS X stops responding to mDNS queries once this time has expired.  I guess, that I will need to look at the Bonjour library as a way to extend the time to live.
> 
> —
>    Dave Raggett <dsr@w3.org>
> 
> 
> 

Received on Friday, 1 April 2016 11:14:28 UTC