Skip to content
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

Merged

Conversation

ludvigsj
Copy link
Collaborator

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.

@ludvigsj ludvigsj force-pushed the develop/mesh_improve_cdp_docs branch 3 times, most recently from a56c099 to 47e1a66 Compare October 25, 2023 09:23
Copy link
Collaborator

@omkar3141 omkar3141 left a 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.

Comment on lines 217 to 223
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Collaborator Author

@ludvigsj ludvigsj Nov 1, 2023

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)

Comment on lines 214 to 215
: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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
: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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

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
Copy link
Contributor

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.

Comment on lines 60 to 73
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Comment on lines 75 to 78
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Andrewpini
Andrewpini previously approved these changes Nov 1, 2023
Copy link
Collaborator

@Andrewpini Andrewpini left a 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 👍

@ludvigsj ludvigsj added the DNM This PR should not be merged (Do Not Merge) label Nov 1, 2023
@ludvigsj ludvigsj force-pushed the develop/mesh_improve_cdp_docs branch from 5f7a0a1 to a43d7f6 Compare November 1, 2023 08:27
@ludvigsj ludvigsj removed the DNM This PR should not be merged (Do Not Merge) label Nov 1, 2023
@ludvigsj ludvigsj force-pushed the develop/mesh_improve_cdp_docs branch from a43d7f6 to 1ca03c1 Compare November 1, 2023 08:28
@ludvigsj ludvigsj force-pushed the develop/mesh_improve_cdp_docs branch from 1ca03c1 to 05d6be7 Compare November 1, 2023 08:42
Andrewpini
Andrewpini previously approved these changes Nov 1, 2023
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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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]>
@jhedberg jhedberg assigned PavelVPV and unassigned jhedberg Nov 1, 2023
@carlescufi carlescufi merged commit 596fc48 into zephyrproject-rtos:main Nov 2, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants