-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
doc: bluetooth: mesh: Improve CDP128+ docs #64325
doc: bluetooth: mesh: Improve CDP128+ docs #64325
Conversation
a56c099
to
47e1a66
Compare
47e1a66
to
5f7a0a1
Compare
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.
Looks good to me.
Composition Data Page 128, 129 and 130 | ||
-------------------------------------- | ||
|
||
These pages mirror Composition Data Page 0, 1 and 2, and are used to represent the | ||
new content of the mirrored pages when the composition data will change after a firmware | ||
update. See :ref:`bluetooth_mesh_dfu_srv_comp_data_and_models_metadata` | ||
for details. |
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.
Composition Data Page 128, 129 and 130 | |
-------------------------------------- | |
These pages mirror Composition Data Page 0, 1 and 2, and are used to represent the | |
new content of the mirrored pages when the composition data will change after a firmware | |
update. See :ref:`bluetooth_mesh_dfu_srv_comp_data_and_models_metadata` | |
for details. | |
Composition Data Pages 128, 129 and 130 | |
--------------------------------------- | |
Composition Data Pages 128, 129 and 130 mirror Composition Data Pages 0, 1 and 2 respectively. They are used to represent the new content of the mirrored pages when the composition data changes after a firmware update. See :ref:`bluetooth_mesh_dfu_srv_comp_data_and_models_metadata` for details. |
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.
No, not "changes". When it changes, they are back to being the same data. They represent the incoming data after the new firmware is on the device but the device is still running with the old composition data (until reprovisioned). Meaning when the data "will change" (but is not changing yet and has not changed yet)
:c:enum:`BT_MESH_DFU_EFFECT_COMP_CHANGE`, the application must call | ||
:c:func:`bt_mesh_comp_change_prepare` and :c:func:`bt_mesh_models_metadata_change_prepare` to |
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.
:c:enum:`BT_MESH_DFU_EFFECT_COMP_CHANGE`, the application must call | |
:c:func:`bt_mesh_comp_change_prepare` and :c:func:`bt_mesh_models_metadata_change_prepare` to | |
:c:enum:`BT_MESH_DFU_EFFECT_COMP_CHANGE`, the application must call functions :c:func:`bt_mesh_comp_change_prepare` and :c:func:`bt_mesh_models_metadata_change_prepare` to |
then process the metadata and provide the effect value. If the effect is | ||
:c:enum:`BT_MESH_DFU_EFFECT_COMP_CHANGE`, the application must call | ||
:c:func:`bt_mesh_comp_change_prepare` and :c:func:`bt_mesh_models_metadata_change_prepare` to | ||
prepare the composition data page and models metadata page contents before applying the new |
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.
prepare the composition data page and models metadata page contents before applying the new | |
prepare the Composition Data Page and Models Metadata Page contents before applying the new |
|
||
.. _bluetooth_mesh_dfu_srv_comp_data_and_models_metadata: | ||
|
||
Composition Data and Models Metadata |
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.
We have instances of composition data and Composition Data. I checked the spec and it seems like Composition Data (capitalized) is the one they go for. Maybe we should too then?
The more thorough round could be done in another task, maybe along with Bluetooth Mesh change.
unprovisioned, this should be communicated through the effect parameter of the metadata check. | ||
|
||
When the transfer will cause the composition data to change and | ||
:ref:`bluetooth_mesh_models_rpr_srv` is supported, the composition data of the new firmware image | ||
will be represented by Composition Data Page 128, 129 and 130, and the models metadata of the new |
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.
Is models metadata also supposed to be capitalized? In the spec, I only found instances with state attached to it (i.e. Models Metadata state), but assuming you would still keep it capitalized even if referring to it without mentioning state every time.
When the transfer will cause the composition data to change and | ||
:ref:`bluetooth_mesh_models_rpr_srv` is supported, the composition data of the new firmware image | ||
will be represented by Composition Data Page 128, 129 and 130, and the models metadata of the new | ||
firmware image will be represented by Models Metadata Page 128. Composition Data Page 0, 1 and 2, | ||
and Models Metadata Page 0 will represent the composition data and models metadata of the old | ||
firmware image, until the device is reprovisioned using the Node Provisioning Protocol Interface | ||
Procedures using the :ref:`bluetooth_mesh_models_rpr_cli`. The application must call | ||
:c:func:`bt_mesh_comp_change_prepare` and :c:func:`bt_mesh_models_metadata_change_prepare` in | ||
order to store the existing composition data and models metadata pages before booting into the | ||
firmware with the updated composition data and models metadata. The old composition data will then | ||
be loaded into Composition Data Page 0, 1 and 2, while the composition data in the new firmware | ||
will be loaded into Composition Data Page 128, 129 and 130. The models metadata for the old image | ||
will be loaded into Models Metadata Page 0, and the models metadata for the new image will be | ||
loaded into Models Metadata Page 128. |
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.
When the transfer will cause the composition data to change and | |
:ref:`bluetooth_mesh_models_rpr_srv` is supported, the composition data of the new firmware image | |
will be represented by Composition Data Page 128, 129 and 130, and the models metadata of the new | |
firmware image will be represented by Models Metadata Page 128. Composition Data Page 0, 1 and 2, | |
and Models Metadata Page 0 will represent the composition data and models metadata of the old | |
firmware image, until the device is reprovisioned using the Node Provisioning Protocol Interface | |
Procedures using the :ref:`bluetooth_mesh_models_rpr_cli`. The application must call | |
:c:func:`bt_mesh_comp_change_prepare` and :c:func:`bt_mesh_models_metadata_change_prepare` in | |
order to store the existing composition data and models metadata pages before booting into the | |
firmware with the updated composition data and models metadata. The old composition data will then | |
be loaded into Composition Data Page 0, 1 and 2, while the composition data in the new firmware | |
will be loaded into Composition Data Page 128, 129 and 130. The models metadata for the old image | |
will be loaded into Models Metadata Page 0, and the models metadata for the new image will be | |
loaded into Models Metadata Page 128. | |
When the transfer will cause the Composition Data to change, and the :ref:`bluetooth_mesh_models_rpr_srv` is supported, the Composition Data of the new firmware image will be represented by Composition Data Pages 128, 129, and 130. The Models Metadata of the new firmware image will be represented by Models Metadata Page 128. | |
Composition Data Pages 0, 1 and 2, and Models Metadata Page 0, will represent the Composition Data and the Models Metadata of the old firmware image until the device is reprovisioned with Node Provisioning Protocol Interface (NPPI) procedures using the :ref:`bluetooth_mesh_models_rpr_cli`. | |
The application must call functions :c:func:`bt_mesh_comp_change_prepare` and :c:func:`bt_mesh_models_metadata_change_prepare` to store the existing Composition Data and Models Metadata Pages before booting into the firmware with the updated Composition Data and Models Metadata. The old Composition Data will then be loaded into Composition Data Pages 0, 1 and 2, while the Composition Data in the new firmware will be loaded into Composition Data Pages 128, 129 and 130. The Models Metadata for the old image will be loaded into Models Metadata Page 0, and the Models Metadata for the new image will be loaded into Models Metadata Page 128. |
Limitation: | ||
|
||
* It is currently not possible to change the composition data of the device and keep the device | ||
provisioned and working with the old firmware after the firmware image is applied. |
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.
Limitation: | |
* It is currently not possible to change the composition data of the device and keep the device | |
provisioned and working with the old firmware after the firmware image is applied. | |
Limitation: | |
* It is not possible to change the Composition Data of the device and keep the device | |
provisioned and working with the old firmware after the new firmware image is applied. |
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.
Looks good to me. Assuming that you will fix @mia-ko comments, I'm approving this PR 👍
5f7a0a1
to
a43d7f6
Compare
a43d7f6
to
1ca03c1
Compare
1ca03c1
to
05d6be7
Compare
firmware image will be represented by Models Metadata Page 128. Composition Data Pages 0, 1 and 2, | ||
and Models Metadata Page 0, will represent the Composition Data and the Models Metadata of the old | ||
firmware image until the device is reprovisioned with Node Provisioning Protocol Interface (NPPI) | ||
Procedures using the :ref:`bluetooth_mesh_models_rpr_cli`. |
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.
Procedures using the :ref:`bluetooth_mesh_models_rpr_cli`. | |
procedures using the :ref:`bluetooth_mesh_models_rpr_cli`. |
Improves the documentation about how CDP 128, 129 and 130, as well as Models Metadata Page 128 are created, as well as which functions the application will have to call to store the correct contents in the pages. Signed-off-by: Ludvig Jordet <[email protected]>
05d6be7
to
115ac5f
Compare
Improves the documentation about how CDP 128, 129 and 130, as well as Models Metadata Page 128 are created, as well as which functions the application will have to call to store the correct contents in the pages.