Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic IPv6 Support #181

Merged
merged 1 commit into from May 23, 2023
Merged

Basic IPv6 Support #181

merged 1 commit into from May 23, 2023

Conversation

bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented May 22, 2023

This adds the most basic IPv6 support

This is a non-default feature. ("ipv6")

Currently it just creates a link-local address which is used. No DAD is done to detect address conflicts right now. SLAAC / Dhcpv6 is not implemented

Easiest way to test this:

In one of the example folders execute this cargo run --example static_ip --release --features "embedded-svc,wifi,ipv6"

See the link-local address logged at INFO level.

You should be able to ping that address or connect via a browser (with a URL similar to http://[fe80::36b4:72ff:fe4c:4410]:8080/)

The feature also activates Ipv6 support in embassy-net but it seems there is currently no way to set the v6 IP / route there?

Things to be done in future (not part of this PR)

  • SLAAC or DhcpV6 support
  • Find out how to use IPv6 with embassy-net

@bjoernQ
Copy link
Contributor Author

bjoernQ commented May 23, 2023

Probably SLAAC and DhcpV6 are impossible to implement since smoltcp currently doesn't support multicast for anything but IPv4

However, I was able to not only commission a Matter device but also to control it in Google Home with this ( https://github.com/bjoernQ/matter-rs-experiment/tree/ipv6 )

Screenshot_20230523-120628 (Klein)

Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice! Looks good from my perspective!

By the way, what about IPv6 makes the matter demo work?

@bjoernQ
Copy link
Contributor Author

bjoernQ commented May 23, 2023

By the way, what about IPv6 makes the matter demo work?

The problem was that Google Home does the commissioning part fine on v4 but after that it only wants to talk v6. The spec leaves this a bit open so v4 might work with some vendors (and with the official CHIP tool it does) but for some vendors it won't work on v4. The fact that commissioning went through made me believe that everything should also work on v4 so it took me a bit too long to realize that 🤷‍♂️

@bjoernQ bjoernQ merged commit dad30df into main May 23, 2023
12 checks passed
@bjoernQ bjoernQ deleted the feature/ipv6 branch May 23, 2023 11:19
@bjoernQ bjoernQ mentioned this pull request May 24, 2023
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.

None yet

2 participants