commit 403ff664cc5785d75eb662d0c186c918aba70fc1
parent cdff892e9b6d2abb19d66eb0bf4cb546c1befe44
Author: Daniel Barlow <dan@telent.net>
Date: Fri, 26 Dec 2025 23:11:59 +0000
update notes
Diffstat:
| M | notes.md | | | 127 | ++++++++----------------------------------------------------------------------- |
1 file changed, 12 insertions(+), 115 deletions(-)
diff --git a/notes.md b/notes.md
@@ -147,51 +147,15 @@ https://docs.espressif.com/projects/rust/no_std-training/03_6_http_client.html
* scan for networks and then pick whichever of dandroid,telent
is available
+** eventually we will do a wifi provisioning over ble thing
+
* use mdns to notify the peer of where to connect to
https://lib.rs/crates/esp-hal-mdns
+** Probe and Announce at startup
-probably we should do the dns-sd thing instead of just publishing an A record.
-
-This means that
-
-```
-1) in response to
- _services._dns-sd._udp.local: type PTR, class IN, "QM" question
-we send
- _services._dns-sd._udp.local: type PTR, class IN, _keihin._udp.local
-
-2) in response to
- _keihin._udp.local: type PTR, class IN, "QM" question
-we send the response
- _keihin._udp.local: type PTR, class IN, Honda Motorbike._keihin._udp.local
-with additional records
-Honda Motorbike._keihin._udp.local SRV priority 0, weight 0, port 5000, target honda.local
-Honda Motorbike._keihin._udp.local TXT (empty)
-honda.local type A class IN 192.168.8.5
-
-```
-
-we need a collection of records any of which which we can send in
-response to a query for that record, and some logic for which
-addl records are to be sent with it.
-
-this might be easier if we named each record (variable name, I mean)
-
-let my_instance_ptr = (
- query(" _keihin._udp.local", PTR), // query
- my_instance_ptr_rr, // response
- [my_instance_srv_rr, my_instance_txt, my_instance_a]
-)
-
-
-
-
-3) in response to a direct query for any of the SRV/TXT/A we send that record
-as th Answer and the other two records as Additional
-
-4) at startup it should do Probe and Announce for "all those resource
+at startup it should do Probe and Announce for "all those resource
records that a Multicast DNS responder desires to be unique on the local link"
so that would be `Honda Motorbike._keihin._udp.local` TXT and SRV,
but not honda.local A because the fact we got it using dhcp means
@@ -202,84 +166,17 @@ we already know it's unique
"Announce" means send 2 <= n <= 8 packets one second apart, containing
all the records we
+** send additional data in responses
-I think the easiest approach is to start with two arrays of RRs for
-"answers" and "additional", then iterate through every known RR and
-say "should we send this in response to any question in the current
-query packet". Then we can (hopefully) use array slices to copy
-only the needed records into the Message
-
----
-
-most of the RRs are static data that we could initialise at compile
-time, the exception is our A record which we don't know until after
-DHCP has succeeded. we could have a static array of almost all the RRs,
-but that one needs to be stack-allocated.
-
-maybe use a stack-allocated array of RR references, which mostly
-points to the static data except for that one record.
-
-
-
-
-
-
-
-
-
-
-```
-
-then the responders respond
-
- > _airplay._tcp.local: type PTR, class IN, Sky Q 2TB Box7448._airplay._tcp.local
-
-with additional records
-
-
-a client sends query
- > _services._dns-sd._udp.local: type PTR, class IN, "QM" question
-
-responders send responses e.g.
-
- > _services._dns-sd._udp.local: type PTR, class IN, _hue._tcp.local
- > _services._dns-sd._udp.local: type PTR, class IN, _http._tcp.local
- > _services._dns-sd._udp.local: type PTR, class IN, _airplay._tcp.local
-
-then the querier sends followups, e.g.
-
- > _airplay._tcp.local: type PTR, class IN, "QM" question
-
-then the responders respond
-
- > _airplay._tcp.local: type PTR, class IN, Sky Q 2TB Box7448._airplay._tcp.local
-
-with additional records
-
-Sky Q 2TB Box7448._airplay._tcp.local: type TXT, class IN, cache flush
-Sky Q 2TB Box7448._airplay._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 5000, target skyq.local
-skyq.local: type A, class IN, cache flush, addr 192.168.8.24
-Sky Q 2TB Box7448._airplay._tcp.local: type NSEC, class IN, cache flush, next domain name Sky Q 2TB Box7448._airplay._tcp.local
-skyq.local: type NSEC, class IN, cache flush, next domain name skyq.local
-
-
-
-
-
-
-
-_ecutables._udp.local PTR 123abcd._ecutables._udp.local.
-
-123abcd._ecutables._udp.local SRV
- priority = 0, weight = 0, port = nnn, host = eculogical.local
-
-123abcd._ecutables._udp.local TXT (required but may be empty)
-
-
-
-
+section 12 of https://www.ietf.org/rfc/rfc6763.txt describes the
+expected additional records:
+ * for SRV, all the A and AAAA it names
+ * for PTR "Service Instance Enumeration or Selective
+ Instance Enumeration (subtype)": i.e. when the record data names
+ an instance of the service, the SRV and TXT records for the instance
+ and all the A/AAAA named by the SRV
* start a udp server, and stream the tables to anyone who sends a message to it