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

> On 1 Apr 2016, at 12:13, Thomas Amberg <tamberg@yaler.net> wrote:
> 
> 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

Thanks for the pointers - they will come in handy when I get around to porting my server to the ESP8266.

Through experiment, I’ve now learned that to get the SRV and A records for a given service, you need to send PTR as the question type and not SRV as I originally thought. DNS is somewhat arcane!  One nice feature is that you can set name/value pairs for a given service, which could be handy for indicating what message encoding types are supported.

On a side note: For now, I am assuming IP connectivity and taking advantage of the Arduino Ethernet Shield’s native support for TCP, which is much better than UDP when you want scalable reliable in sequence message delivery.  I am using TCP for asynchronous delivery of binary encoded JSON messages, analogous to my other open source project based upon NodeJS and Web Sockets. The challenge I’ve taken on is to implement a server with 2Kbytes RAM and 30Kbytes Flash, which is all you get with the Arduino Uno.  In principle, I should be able to extend this to support regular Web Sockets, but that would take more RAM in order to retain the dictionary of names. That wouldn’t be a problem for the Arduino MEGA and for ARM based microcontrollers. It might even be reasonable to offload  the dictionary to spare RAM in the Ethernet Shield.

p.s. I also want to explore the use of Non-IP based protocols, e.g. using the Nordic nRF24L01+ chip for sensor networks. This requires a different approach to discovery and messaging. Is anyone interested in collaborating on that?

Many thanks,
—
   Dave Raggett <dsr@w3.org <mailto:dsr@w3.org>>

Received on Friday, 1 April 2016 14:37:07 UTC