canonical / matter-docs

https://canonical-matter.readthedocs-hosted.com/en/latest/
0 stars 2 forks source link

docs: Confusing use of the otbr-snap for non-BR purposes #19

Open prash813 opened 5 months ago

prash813 commented 5 months ago

*Please describe the question or issue you're facing with "How to run Matter applications with Thread networking on Ubuntu - Matter on Ubuntu documentation"

I have couple of issues with the dcoumentation

There are two RCPs and they are controlled by same snap otbr-snap installed on Machine A and B.

  1. why otbr-snap running on machine B needs avahi-control interface? becuase Mchine B being just a thread device will not use mDNS for service publishing it
  2. why would you need to provide infra-if config option for the otbr-snap running on machine B?

Reported from: https://canonical-matter.readthedocs-hosted.com/en/latest/how-to/matter-and-thread-on-ubuntu/

farshidtz commented 4 months ago

Thanks for the feedback. The documentation doesn't explicitly say that those steps are required, but it points the reader to another how-to, which does.

The avahi-control interface is not required. I'll add a note for that. The agent does attempt to use the client but moves on without erroring out:

otbr-agent[16695]: [INFO]-MDNS----: Avahi client state changed to 101
otbr-agent[16695]: [INFO]-MDNS----: Avahi client is connecting to the server

When connected:

otbr-agent[18884]: [INFO]-MDNS----: Avahi client state changed to 2
otbr-agent[18884]: [INFO]-MDNS----: Avahi client is ready
otbr-agent[18884]: [INFO]-BA------: Publish meshcop service OpenThread BorderRouter #E3F0._meshcop._udp.local.
otbr-agent[18884]: [INFO]-MDNS----: Commit avahi service OpenThread BorderRouter #E3F0._meshcop._udp
otbr-agent[18884]: [INFO]-ADPROXY-: Publish all hosts and services

infra-if config is needed because the agent does perform some checks on it, before starting the router:

otbr-agent[16695]: [NOTE]-ILS-----: Infra link selected: wlan0
...
otbr-agent[16695]: 49d.18:33:22.314 [I] Platform------: Backbone interface is configured to wlan0 (3)
...
otbr-agent[16695]: [INFO]-APP-----: Thread Border Router started on AIL wlan0.

The agent runs in full operational mode, with backbone routing, ip forwarding, etc, even though most aren't needed. Because of that, the setup oneshot service as well as firewall-control and network-control interfaces are required too.

I'm not sure if there is a way to limit the agent to just activate DBus to RCP communication for the Matter app.