ArduinoMDNS with arduino UNO wifi rev2

I installede ArduinoMDNS on Arduino UNO WIFI Rev 2.
The wifi library is "WiFiNINA.h".
All examples compile correctly, and the hostname resolution works properly.
Nevertheless, the service discovery detects the service but reports ip=0.0.0.0 and port = 0, for any service. Any idea of the reason for this misbehaviour? I suspect some limitation in the baffers for reading the UDP datagram that in this case i quite huge. How it is possible to change it?

I miss the code you used. Don't tell us you just used the example as there is no example for WIFININA.

You must ensure that WiFi is completely initialized before you start the MDNS object.

Thanks for your quick answer.
Coming to the point, I just replaced in the example WiFi101.h with WIFININA.h. The compilation is ok, no warnings.

When the service discovery example starts, wifi seems to be working. I see the ip address printed on the console.

I see, as well, using wireshark, the UDP datagram sent to the mDNS group, and I see the answers coming back.

Just the "demo program" prints on the console, the host name and the service name, but it fails to extract the ip address and the port of the protocol. It happens with all services I tried.
Instead the example for hostname resolution (same change of WIFI101,h with WIFININA.h) works properly for any hostname.

Attilio

What exactly do you want to do with mDNS? Discovering other services? Registering own services?

Either post the exact sketch you're writing about or tell us exactly which example you use and what modifications you did! Post the serial output you get (no pictures!).

This is the sketch, that is just the first one in the examples of ArduinoMDNS, which show how to discover a service from Arduino:
"WIFIDiscoveringServices".
The code of the sketch is the following one:

Can you post the serial output you got (no pictures!)?

Something weird is happening. I've flashed again my Arduino uno wifi with the sketch I posted. Now, it doesn't work anymore.
I.e, it sends the message but doesn't receive answers. Looking with Wireshark, the message seems to contain spurious data.
On the other hand, the sketch for the hostname resolution still works properly.
I'm no longer trusting the flash memory of my Arduino,maybe it is corrupted. Tomorrow I'll get a new one in my department and I'll let you know the results.
Just for your knowledge. The serial output for hostname resolution is:
Attempting to connect to WPA SSID: cortazzone
You're connected to the networkEnter a mDNS host name via the Arduino Serial Monitor to have it resolved.
Do not postfix the name with ".local"
Resolving 'htmaster' via Multicast DNS (Bonjour)...
The IP address for 'htmaster' is 192.168.1.102
Resolving 'databoss' via Multicast DNS (Bonjour)...
The IP address for 'databoss' is 128.0.15.0
Resolving 'databoss' via Multicast DNS (Bonjour)...
The IP address for 'databoss' is 128.0.15.0
Resolving 'DataBoss' via Multicast DNS (Bonjour)...
The IP address for 'DataBoss' is 192.168.1.114
Resolving 'Attilios-Mac-mini' via Multicast DNS (Bonjour)...
The IP address for 'Attilios-Mac-mini' is 192.168.1.113

Very unlikely.

I cannot find any problem there. I guess this is also what you expected.

It would have been much more informative to post the output of the sketch that doesn't work.
If you can post the WireShark file too, that would help searching for the problem.

Ok, I've a new Arduino wifi rev 2.
I'm using the same sketch and I'm now obtaining the output in the following:

Here I have the screenshot for the request (from Arduino) and the answer of an host providing _mqtt._tcp.local
As you it seems correct in all details.
Attilio

Request.pdf (221 KB)

Answer.pdf (269 KB)

If I ask for the WireShark files I usually don't expect to get screenshots in PDFs.

Does that mean you get absolutely nothing?

But I thought we already concluded that the host name resolution does work. Why do you post again data for the host name resolution? Aren't you confident with the results? What problems do you have with the results?

sorry for the long delay in answering but I had a very busy week.
It seems that I've been misunderstood. I summarize very shortly what I've found with the mdns examples:

  1. host name resolution: works. The data I posted is just to show that I obtain the correct answer.
  2. service discovery: works only partially: the programs find the service but fail in extracting the IP address of the server and the port.
    The data I posted and are repeated in the following are just what I get on the console of the IDE:

Post the code you used for that test and the exact and complete output you get!

I've already done it. It is exactly the example in the library where I changed WiFi101.h with WhiFiNINA.h.
Anyhow: this is the code

The code is OK if you really only changed that line. But the complete serial output you got wasn't posted yet.

I did it 3/4 messages ago. Look back please
Attilio

You have output in post #7 but that is from WiFiResolvingHostNames.ino and that one worked as expected (according to you). So post the output of the sketch that you think don't work and tell at least the exact name of the example you used!

This is a copy of the message I posted April 14th.
It contains the output for the service discovery example (the code
that you already received a few days ago and that you approved):

No it doesn't. The forum system marks your post as inserted by email. Is it possible that it doesn't show email attachments? Go to the web forum and check your post there!

Now I understand why you kept asking what I've posted several times.

It is crazy! I posted the log in the body of the message itself, as a part of the text. In the same way I did with the log
of the host resolution. I don't understand why the system cutted my messages. I 'll try to post the log directly on the forum.
Sorry for that

Attilio