arduino-libraries / arduinomdns Goto Github PK
View Code? Open in Web Editor NEWThis project forked from trippylighting/ethernetbonjour
mDNS Library for Arduino
This project forked from trippylighting/ethernetbonjour
mDNS Library for Arduino
The service query message appends some data that shouldn't be transmitted.
I will create a more thorough explanation soon.
In more than one location, space is created with something like:
char* mem = malloc( strlen( text ) );
followed by something like:
strcpy(mem, text);
This only mallocs enough memory for the number of characters in the text, but not for the terminating null, so that the strcpy
writes outside the bounds of the allocated memory.
Better to do something like:
char* mem = malloc( strlen(text) + 1 ); // so that there's room for the terminating null.
When I use one arduino to generate an MDNS service, and another arduino to listen to the service...
It seems like adding the service record is OK, as on my host computer, I don't have issues reading the text data,
...but the service discovery on arduino is very broken?
Hello dear developers,
I see that the trippylighting branch has a few additional commits/fixes (june-august 2017) since the last one here (april 2017). Would it be possible/necessary to include these in the arduino-libraries fork?
See: https://github.com/TrippyLighting/EthernetBonjour/commits/master
Cheers,
Brian.
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.
I am looking a way to to pin my dependencies, would this be possible to have tags in this repo ?
Eventually aligned the arduino sdk ones
In file included from d:\Arduino\Sketchbook\libraries\WiFi101\src/WiFiClient.h:28,
from d:\Arduino\Sketchbook\libraries\WiFi101\src/WiFi101.h:35,
from C:\Users\tao\AppData\Local\Temp\.arduinoIDE-unsaved2024025-8816-1pfxd5m.1slaf\WiFiResolvingHostNames\WiFiResolvingHostNames.ino:25:
d:\Arduino\Sketchbook\libraries\WiFi101\src/socket/include/socket.h:1839:15: error: conflicting declaration of C function 'sint8 close(SOCKET)'
NMI_API sint8 close(SOCKET sock);
^~~~~
In file included from C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32c3/include/newlib/platform_include/sys/unistd.h:23,
from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\sys-include\unistd.h:4,
from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\sys-include\pthread.h:25,
from C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32c3/include/newlib/platform_include/pthread.h:21,
from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\riscv32-esp-elf\rv32imc\ilp32\no-rtti\bits\gthr-default.h:48,
from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\riscv32-esp-elf\rv32imc\ilp32\no-rtti\bits\gthr.h:151,
from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\ext\atomicity.h:35,
from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\bits\basic_string.h:39,
from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\string:52,
from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\stdexcept:39,
from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\array:39,
from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\tuple:39,
from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\functional:54,
from C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/HardwareSerial.h:49,
from C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/Arduino.h:184,
from C:\Users\tao\AppData\Local\Temp\arduino\sketches\63ADCEAE1835CF6FB6AEF0D323A2C879\sketch\WiFiResolvingHostNames.ino.cpp:1:
c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\sys-include\sys\unistd.h:30:9: note: previous declaration 'int close(int)'
int close (int __fildes);
^~~~~
exit status 1
Compilation error: exit status 1
I am not that into mDNS but I read several times now that mDNS machines can update their mDNS cache automaticly.
When an mDNS client needs to resolve a host name, it sends an IP multicast query message that asks the host having that name to identify itself. That target machine then multicasts a message that includes its IP address. All machines in that subnet can then use that information to update their mDNS caches. Wikipedia
Does ArduinoMDNS library does this too or is it only possible to query for a host or a service which are both blocking operations?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.