Apply missing node features after receiving composition data#539
Conversation
|
Hello, |
|
And sorry for the long response time. I didn't notice your PR during the holiday period. |
|
Hello,
no problem.
our nodes sometimes have large composition data and when we connect to another node as a proxy, we have some problems receiving the composition data. Now we enable the proxy after the provisioning. With an enabled proxy we are connecting us directly to the node to get a higher success rate for receiving the Data. However, the enabled proxy has the effect of initialising the node features. After that, there was no way to update the other features such as the friends feature. |
|
Do you read Composition Data Page 0 before you connect to that node using GATT bearer? Is the Proxy feature disabled at that moment? |
|
No, we do not read Page 0 until we are connected to the GATT bearer. After provisioning, the node's proxy is disabled by default. So, we first send the message to enable the proxy. If the proxy is enabled, we connect directly to the node so that a message does not have to be routed through multiple nodes. With a direct connection, we request Page 0, which leads to a higher success rate. |
|
OK, I finally get it now. By sending Then, the features received in the Composition Data are not applied, as the object exist. |
Correct, that was the problem. Do you see any problems with the adjustments of this PR? |
|
The only issue I can imagine is that the Composition Data should not change, that's why there's this check. But anyway, your suggestion is OK. I'll merge the PR when I'm done with my current changes. |
This PR revises the processing of the composition data in the case of the node features. The current implementation discarded newly-received node features if NodeFeaturesState was already set once. In this PR, the individual node features are now checked for nil and, if necessary, replaced by the newly received composition data.