Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AT+MDNS does not produce the expected record #810

Open
3 tasks done
SeraphimlabsLLC opened this issue Mar 4, 2024 · 1 comment
Open
3 tasks done

AT+MDNS does not produce the expected record #810

SeraphimlabsLLC opened this issue Mar 4, 2024 · 1 comment

Comments

@SeraphimlabsLLC
Copy link

SeraphimlabsLLC commented Mar 4, 2024

Answers checklist.

  • I have read the documentation ESP-AT Programming Guide and the issue is not addressed there.
  • I have used the latest released firmware or have updated my ESP-AT branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

AT versions 3.3 and higher do not appear to produce the expected mdns record. The host portion is being replaced by the service name. It is likely that this applies as far back as 2.2, I've only tested 3.3 and 4.1.

With a working AT 1.7.4, the command string AT+MDNS=1,"dcchost","withrottle",2560
results in avahi-browse --all showing

  • enp41s0 IPv4 dcchost _withrottle._tcp local

If I use AT 3.3 or 4.1 with the same AT+MDNS=1,"dcchost","withrottle",2560,
avahi-browse --all actually breaks with avahi_service_browser_new() failed: Invalid service type, this is actually a known bug with this tool when a malformed broadcast was made recently.

Using mdns-scan instead, I see the malformed

  • withrottle.withrottle._tcp.local instead.

Please advise what can be done. I've tried a couple different ESP-AT versions on an ESP32-C3-WROOM-2 module, compiling from the git repository in order to assign the pin numbers correctly.

Edit:
Further comparison of the mdns output of 1.7.4 vs 3.3 using Wireshark, I can see that the 3.3 firmware is sending correct queries for the intended hostname before transmitting the malformed PTR records.
Compared to the 1.7.4 firmware where it just sends PTR records with the provided data. Could this have something to do with it? There is an extra setup step in the newer firmware that the documents missed?

@ustccw
Copy link
Collaborator

ustccw commented May 21, 2024

@SeraphimlabsLLC many thanks for your report, i agreed.

on AT v1.7.4, esp-at uses hostname as the instance name:
v1 7 4-at-mdns

on AT v3.3.0, esp-at uses the service name as the instance name:
v3 3 0-at-mdns

maybe we should add one AT+CIPMDNS command to configure the parameters amap for mdns.
I'll let you know once this feature is done. thanks again!

CW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants