-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Do not use an undefined node id for mdns advertising #7488
Do not use an undefined node id for mdns advertising #7488
Conversation
Size increase report for "gn_qpg6100-example-build" from 77e727c
Full report output
|
@@ -48,7 +48,7 @@ NodeId GetCurrentNodeId() | |||
|
|||
// Search for one admin pairing and use its node id. | |||
auto pairing = GetGlobalAdminPairingTable().cbegin(); | |||
if (pairing != GetGlobalAdminPairingTable().cend()) | |||
if (pairing != GetGlobalAdminPairingTable().cend() && pairing->GetNodeId() != kUndefinedNodeId) |
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.
Wrt the TODO above:
// TODO: once operational credentials are implemented, node ID should be read from them
I would think that once we are getting the node ID from operational credentials, we should remove this check.
Size increase report for "nrfconnect-example-build" from 77e727c
Full report output
|
Could you explain the situation a bit? Why do we have an admin pairing info without a well defined node id? Should the admin pairing info be missing in that case? |
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.
I think this could definitely use a comment answering @andy31415's question. Is this about the time period between an admin being added and a node id being provisioned? Or nodes that were partially provisioned? Or something else?
Not sure what's @vivien-apple's case, but it once happened to me that the pairing window has expired and when I started BLE advertising again, a new admin has been allocated and after the commissioning the previously allocated admin had the node ID uninitialized. I guess this change will fix such issues although it might be better to remove incomplete admins when commissioning fails. |
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.
Marking as changes requested to not get merged until we understand the case.
not having an invalid state at all seems better than ignoring invalid state when we see it.
I'm... not sure. Asking @shana-apple since she may have an answer. But actually this is interesting. I dig more into the code and I'm curious of what is the right fix here. The current code flow is, when the pairing window is opened, the next available admin id is populated to the
The comment " |
This will be resolved by my next patch. This wasn't just AddOpCert landing but further implementation is needed to hook it all up. |
After some investigations, it seems like the issue here is that the accessory is locally broadcasting using |
/rebase |
1 similar comment
/rebase |
9c25983
to
f1c5a6c
Compare
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This stale pull request has been automatically closed. Thank you for your contributions. |
Problem
If an accessory already connected to the network and without any admin pairing is on the network, the mdns advertisement is
0000000000000000-0000000000000000
instead of beeing (for example):0000000000000000-0000000000BC5C01
if the node id is12344321
.Change overview
Testing
chip-all-clusters-app
, withchip_config_network_layer_ble=false
, advertising over mdns on the local network.