Resolving Host on mDNS

Ok. That does answer that.
Another query I had is, Is it possible to copy a UDP library of another board, say EP8266, and use it as an include in my application. As I am using one of their libraries that depend heavily on lwIP which is not accessible in particle. If I make an include which will have all the necessary lwIP and the ESPUDP files, will it work or it will have massive issues due to change in platform?

Most likely not since the network stacks between the two platforms are entirely different and I doubt any ESP UDP library would be that hardware agnostic that it could be transferred over without a good amount of rework.

Any other possible way to resolve a hostname on mDNS on particle photon apart from porting an ESP library and spending hours clearing all the dependencies without any guarantee it will work?
I also thought about using the current mDNS library present in the particle and include the feature of sending and resolving QTYPE A queries but even that will require a lot of effort to understand the library and add those features at the right place. However, this seems to be the only path left for now.

Hey is it possible to modily your serverLocater code on github and use it to send QTYPE A and resolve the host IP? Maybe we can work together and convert it into a library used just for host IP resolving?

Where did you find this information? I am hoping to find the response part of it too so that I can make it work somehow.

1 Like

Hey, is it possible to start a service on the host on which it sends it’s current dhcp IP address so that the photon can subscribe to it and get the IP Address?

Hey. Some new developments. While testing with the MDNS library for photon, I found that the particle is unable to join the multicast group after some time. It is working fine in the beginning but after some time it is dropping off of the group and unable to join again. Any views on why this must be happening? I have tried leaving the multicast group and joining again but to no vain.

Hey. So I forgot to update here. I was able to modify an ESP8266 library for particle photon to resolve the mDNS host IPs. It takes in the host name “host1.local” and returns it’s IP on the subnet. I will post it on my github. Ping me if anyone needs it. Thank you everyone for your help.

2 Likes

Hi @moz, I could totally use that right now. Thanks!

Hey @Triodegain, I am attaching the link to the github for this library. I have been using this ever since and have faced no issues with particle photon so it is pretty stable. Do let me know if you find any issues.

Hi @moz. Big thanks. I am connecting to an ESP32 websocket server with mDNS. I need to resolve that IP. :slight_smile: You are my only hope, Obi Wan.


@moz Bewm. I have my IP now. I am extending a Nextion HMI screen over WiFi websockets with an ESP32 as a websocket server for a marine power control product using a Particle P1. I will test on P1 to make sure all is well. So far it works beautifully. Again thanks.
Capture

4 Likes

@moz The IP goodness continues. My Photon-based vacuum tube microphone preamp can find Node Red by name now. Double win.
P1 install is running fine after 24 hrs, btw. Thanks. twice. :slight_smile:

2 Likes

Glad to see it helped you.

1 Like

@moz Both these projects were stalled on the greaseboard at “resolve IP” for weeks. Things can proceed now thanks to you. Bravo.

Edit: both P1 and Photon installs have been running for 24 hrs now with no issues.

2 Likes