Skip to content

Support multi interface - #7

Merged
jdesai61 merged 5 commits into
mainfrom
suppor-multi-interface
Jul 11, 2022
Merged

jdesai61 merged 5 commits into
mainfrom
suppor-multi-interface

Conversation

@mfucci

@mfucci mfucci commented Jul 11, 2022

Copy link
Copy Markdown
Owner
  • Add support for multiple interface in the MDNS server
  • Refactor MDNS server to isolate low level UDP APIs
  • Deprecate Singleton class, so multiple Matter servers can be launched simultaneously

@jdesai61

Copy link
Copy Markdown
Collaborator

This fixes the issue of me having to specify IP and now I am able to pair using Android CHIPTool or "chip-tool pairing ethernet 222 20202021 3840 192.168.1.28 5540" command where I specify the IP of the node-matter device.

I assumed this fix would also make the device discoverable (able to pair using "chip-tool pairing onnetwork 222 20202021") so that I don't have to specify the IP of the device. I tried but it didn't work because MdnsServer doesn't have any records to serve until I connect to it. Any thoughts?

@jdesai61

Copy link
Copy Markdown
Collaborator

Seems like when I try "chip-tool pairing onnetwork 222 20202021", I see following MDNS requests but no responses:

10:05:36.117133 IP 192.168.1.27.5353 > 224.0.0.251.5353: 0 ANY (QM)? _matterc._udp.local. (37)
10:05:38.117873 IP 192.168.1.27.5353 > 224.0.0.251.5353: 0 ANY (QM)? _matterc._udp.local. (37)
10:05:42.124818 IP 192.168.1.27.5353 > 224.0.0.251.5353: 0 ANY (QM)? _matterc._udp.local. (37)
10:05:50.130823 IP 192.168.1.27.5353 > 224.0.0.251.5353: 0 ANY (QM)? _matterc._udp.local. (37)

@mfucci

mfucci commented Jul 11, 2022

Copy link
Copy Markdown
Owner Author

Yes, I did not reverse engineered and implemented this part of the protocol yet.
I think the logic should be:

  • before commissioning, advertise _matterc._udp.local. on MDNS
  • after commissioning, advertise _matter._udp.local. on MDNS (without the "c")

Maybe we can close your original bug and you can file a new one for this?
This will have to wait until I am back from vacations: I need to be able to compile chip-tool command line util before I can test on my side.

@jdesai61

jdesai61 commented Jul 11, 2022 via email •

Copy link
Copy Markdown
Collaborator

@jdesai61

Copy link
Copy Markdown
Collaborator

This seems to work. We can close this. Will open up another issue for discovering new devices on the network...

@jdesai61 jdesai61 closed this Jul 11, 2022
@jdesai61

Copy link
Copy Markdown
Collaborator

Re-open for merge

@jdesai61 jdesai61 reopened this Jul 11, 2022
@jdesai61
jdesai61 merged commit 4c5e0d4 into main Jul 11, 2022
@mfucci
mfucci deleted the suppor-multi-interface branch August 5, 2022 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants