-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Send current IP address during network provisioning #4591
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
Conversation
Size increase report for "esp32-example-build" from 1073ccf
Full report output
|
* The device can use this function to send its current IP address to | ||
* commissioner. This would generally be called during network | ||
* provisioning of the device, when the device already has an IP address. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a GH issue to change this?
If this is to stay, the comment should explain why we are specifically using IPv4 when CHIP is supposed to work with IPv6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andy31415, this code NetworkProvisioning.h/.cpp
will be deleted once we move the provisioning to ZCL cluster. I'll file a GH issue in regards to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #4606
|
||
CHIP_ERROR NetworkProvisioning::SendCurrentIPv4Address() | ||
{ | ||
for (chip::Inet::InterfaceAddressIterator it; it.HasCurrent(); it.Next()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point we probably want to propagate the source interface as well.
That seems really important for link-local and I imagine there could be unusual network setups where different network cards exist on different LANs.
Probably a TODO for the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andy31415, this code NetworkProvisioning.h/.cpp
will be deleted once we move the provisioning to ZCL cluster and DNS-SD. I'll file a GH issue in regards to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #4606
@saurabhst, any feedback? |
Problem
For multi-admin scenarios, the device address needs to be detected by the additional commissioners. In the current flow, the device sends its IP address to the commissioner as part of the network provisioning flow. Eventually, it'll be changed to DNS-SD.
In current flow, the network provisioning state machine doesn't send the IP address to the commissioner, if it was already connected to the network. The state machine needs to be updated, so that it can detect it has a valid IP, and send it to the commissioner.
Summary of Changes
When network provisioning command is received from the commissioner, the device will
Note
This is a temporary solution. Once Network Provisioning cluster and DNS-SD is implemented/integrated, the
NetworkProvisioning.cpp/.h
class implementation will be removed. This change is contained within this class, so it'll be removed along with it.