you can also query that data from linux like this:Looks like the Pico W does respond to SSDP, uPNP, M-SEARCH, requests. So perhaps just a matter of seeing how those could be used and coercing the returned data to be useful -
Code:
[root@amd-nixos:~]# avahi-browse -at+ enp8s0 IPv4 c2d _ssh._tcp local+ enp8s0 IPv4 Chromecast-censored _googlecast._tcp local+ enp8s0 IPv4 thermostat _thermostat._tcp local
Code:
c2d ~ # cat /etc/avahi/services/thermostat.service <service-group> <name>thermostat</name> <service> <type>_thermostat._tcp</type> <port>49115</port> </service></service-group>c2d ~ # ls /etc/avahi/services/thermostat.service -lh-rw-r--r-- 1 root root 134 Oct 28 2013 /etc/avahi/services/thermostat.service
i would assume there is also some way to tag the pico-w as being unique, so you can find the pico-w that is running your service, and pick it out of the crowd
edit:
Code:
[clever@amd-nixos:~/apps/rpi/pico/pico-sdk-master]$ grep -r --color mdnssrc/rp2_common/pico_lwip/CMakeLists.txt: pico_add_library(pico_lwip_mdns NOFLAG)src/rp2_common/pico_lwip/CMakeLists.txt: target_sources(pico_lwip_mdns INTERFACEsrc/rp2_common/pico_lwip/CMakeLists.txt: ${PICO_LWIP_PATH}/src/apps/mdns/mdns.c[clever@amd-nixos:~/apps/rpi/pico]$ git clone https://github.com/lwip-tcpip/lwip.git[clever@amd-nixos:~/apps/rpi/pico]$ cd lwip/[clever@amd-nixos:~/apps/rpi/pico/lwip]$ find -name mdns_out.c./src/apps/mdns/mdns_out.c
this may expose an api that a pico-w program can use, to control the mdns
ah nice findI found this example:
https://github.com/Comcast/EasyConnect/ ... aspberrypi
Maybe you need one of those patches?
i was having trouble finding any examples of how to use dpp, so i was just brute-forcing things
but that looks to explain it all nicely, and how to fix dpp in the pi3 firmware
Statistics: Posted by cleverca22 — Sun Feb 11, 2024 12:39 am