August 26, 2015, 6:52am
Has anyone implemented a Bonjour findable device?
I am looking for a way for the particle to advertise itself (once connected to wifi router) and have a computer find its address without using the cloud.
Have anyone has any experience with this? I guess is something with UDP advertising…
Any help welcomed!
It can be done I think with multicast. After device got ip from router it can send multicast with information you need. Address and port of multicast can be well known for subscriber.
August 26, 2015, 1:30pm
Adafruit did a CC3000 mDNS/Bonjour client. The problem with mDNS is you need to continuously monitor the broadcast stream for other nodes joining with the same name so your node can say it already has that name (there is no centralized control). This was big resource drain on a Core but on a Photon, particularly after multi-tasking comes along, I think it should be great.
I have done something similar last year, modified the Adafruit mDNS client on Spark Core but not tested on Photon.
Spark Core and MDNS Here is the Spark Core port of Adafruit MDNS library. The library provides the ability to setup a name for the Spark Core and resolve it. We can name the Core anything we want, the library will append "**.local**" to the name and...
Reading time: 2 mins 🕑
Likes: 14 ❤
August 27, 2015, 6:30am
What happens if you create a UUID so no one else can join the broadcast stream with the same name? Say use the MAC address for the name? Would you still need to monitor the stream?
August 27, 2015, 12:33pm
If you want to implement the protocol properly, yes, you do need to monitor. You also need to answer “who knows who xxxx is?” requests since there is no central server.
The TI CC3000 in there sample code implemented a very simple start-up broadcast 3 mDNS packets version but it never worked for me with any other mDNS or Bonjour clients.