Skip to content

Switch mDNS service type to _webthing._tcp. #18

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

Merged
merged 1 commit into from
Jul 10, 2018

Conversation

mrstegeman
Copy link
Contributor

No description provided.

@mrstegeman mrstegeman requested a review from hobinjk July 10, 2018 17:55
@ghost ghost assigned mrstegeman Jul 10, 2018
@ghost ghost added the review label Jul 10, 2018
// String url = "url=http://" + name + ".local";
serviceTxt = "\x13webthing=true"; // _" + url;
// serviceTxt[14] = (char)url.length();
serviceTxt = "\x13path=/";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure what the \x13 was for here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\x13 is the length of "webthing=true" although it should actually be \x0d (which explains a lot in hindsight).

To add the path the correct incantation is located around here:
https://github.com/arduino-libraries/ArduinoMDNS/blob/master/examples/WiFi/WiFiRegisteringServicesWithTxtRecord/WiFiRegisteringServicesWithTxtRecord.ino#L99

It was removed since the incorrect length \x13 was corrupting the packets

@mrstegeman
Copy link
Contributor Author

@hobinjk Fixed.

@mrstegeman mrstegeman merged commit 5934c52 into WebThingsIO:master Jul 10, 2018
@ghost ghost removed the review label Jul 10, 2018
@mrstegeman mrstegeman deleted the mdns branch July 10, 2018 20:08
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

Successfully merging this pull request may close these issues.

2 participants