Missing character
During my tests I found that a character is missing.
In my code I use:
mDNS.addServiceRecord("_ewillie._tcp", 1883, MDNSServiceTCP, "testdata");
When I look with Discovery.app ( www.tildesoft.com ), I only see the text: estdata The first character is missing.
Ofcourse the best way would be reading the whole zeroconf manual and do something like this:
mDNS.addServiceRecord("_ewillie._tcp", 1883, MDNSServiceTCP, "\x09version=2\x07model=2");
In this case there aren't missing characters.
Thanks @jaapcammeraat. I see that the required format is documented and demonstrated in the example sketches (which serve as the library's user documentation):
https://github.com/arduino-libraries/ArduinoMDNS/blob/a4fbf1e0a9ddb85f3dc3b25e02070cfc59ae760e/examples/Ethernet/RegisteringServicesWithTxtRecord/RegisteringServicesWithTxtRecord.ino#L72-L84
https://github.com/arduino-libraries/ArduinoMDNS/blob/a4fbf1e0a9ddb85f3dc3b25e02070cfc59ae760e/examples/WiFi/WiFiRegisteringServicesWithTxtRecord/WiFiRegisteringServicesWithTxtRecord.ino#L91-L103
Ideally there would be a better explanation of the "length byte", but I think that what is provided now is all that is realistically feasible for us to achieve given the available resources for maintaining this library. So I'll close this. I will commit to making some reasonable effort to assist if anyone wants to submit a pull request to improve the explanation of the required format in the examples.