-
Notifications
You must be signed in to change notification settings - Fork 122
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
Update Network and Application key at start of KeyUpdate #477
Comments
Hi,
The message will be handled here: Lines 139 to 145 in 78b532d
Setting the key in line 141 does the following: IOS-nRF-Mesh-Library/nRFMeshProvision/Classes/Mesh Model/NetworkKey.swift Lines 94 to 104 in 78b532d
The update(networkKeyWithIndex sets the updated flag in the Node's key list:IOS-nRF-Mesh-Library/nRFMeshProvision/Classes/Mesh Model/Node.swift Lines 748 to 756 in 78b532d
|
You may find some info here: #314 |
Thanks - that explains the 2nd half of the process. The remaining part is how to instantiate the two messages with the new key. Looks like only way is to generate a newkey bytestring and then hand craft a msg using the ConfigNetKeyUpdate(parameters:Data) initializer. Line 50 in 78b532d
Not intuitive, but we will try it out... Thanks. Closing the issue since there is a workaround. |
Great that you pointed it out. That needs improvement. I'll fix it in the next (big!) release. |
@eanderlind I fixed the API. The 2 config messages now allow to pass the new key as |
Is there a way for application to create updates of NetworkKey and ApplicationKey for use in KeyUpdate procedure?
The api in
IOS-nRF-Mesh-Library/nRFMeshProvision/Classes/Mesh API/MeshNetwork+Keys.swift
Line 74 in 78b532d
recreates a key at same index, while we instead want to invoke the (internal access) didSet on the existing key.
The same api also limits binding to the first Netkey, however it looks like once we have an Appkey we can rebind it using
IOS-nRF-Mesh-Library/nRFMeshProvision/Classes/Mesh API/ApplicationKey+NetworkKey.swift
Line 40 in 78b532d
Hopefully just didn't find correct api.
The text was updated successfully, but these errors were encountered: