-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Deprecate BT_FIXED_APPKEY #25414
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
base: main
Are you sure you want to change the base?
Deprecate BT_FIXED_APPKEY #25414
Conversation
|
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 2 projects with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
CI InformationTo view the history of this post, click the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 708e406461747116808233bd063e44669e1d5cd8 more detailssdk-nrf:
matter:
zephyr:
Github labels
List of changed files detected by CI (22)Outputs:ToolchainVersion: df3cc9d822 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
|
You can find the documentation preview for this PR here. |
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 smp_bt_auth.c for sure should not use the deprecated API and should only be compiled with CONFIG_BT_APP_PASSKEY.
But also I think that since the LE Pairing Responder model is experimental, it is OK to change it is behavior and API without deprecation period. But we need to mention this change in the release notes.
Also, remember to update documentation of the model: https://github.com/nrfconnect/sdk-nrf/blob/main/doc/nrf/libraries/bluetooth/mesh/vnd/le_pair_resp.rst.
2999999 to
0d6a557
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.
Updated the documentation and added release notes for DFU distributer sample and LE Pair Responder model.
Remove all dependency on deprecated FIXED_PASSKEY, solely it depends on APP_PASSKEY now.
Removed immediate invalidation of passkey.
Update the Documentation diagram.
added commit to update matter door lock sample.
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.
Can we show the usage of bt_mesh_le_pair_resp_passkey_get function on diagram? In the app_passkey callback.
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.
TODO:
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.
Some changes are required in the Matter Lock sample.
doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
Outdated
Show resolved
Hide resolved
0d6a557 to
d30f085
Compare
| :depth: 2 | ||
|
|
||
| The LE Pairing Responder model is a vendor model. | ||
| The LE Pairing Responder model is a vendor model and it requires :kconfig:option:`CONFIG_BT_APP_PASSKEY` option to be enabled. |
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.
| The LE Pairing Responder model is a vendor model and it requires :kconfig:option:`CONFIG_BT_APP_PASSKEY` option to be enabled. | |
| The LE Pairing Responder model is a vendor model and you must enable the :kconfig:option:`CONFIG_BT_APP_PASSKEY` Kconfig option to use this model. |
| This model can be used to hand over a passkey that will authenticate a Bluetooth LE connection over a mesh network when it is not possible to use other pairing methods. | ||
|
|
||
| Before the pairing is initiated, an initiator should send an LE Pairing message with Passkey Reset sub-opcode to set a new passkey for the next pairing request. | ||
| Before the pairing is initiated, an initiator should send an LE Pairing message with Passkey Reset sub-opcode. If the passkey has been set by the :c:func:`bt_mesh_le_pair_resp_passkey_set` function, the predefined passkey will be returned in the Passkey Status message. Otherwise, a new passkey will be generated by LE Pairing Responder model and returned in the Passkey Status message. |
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.
| Before the pairing is initiated, an initiator should send an LE Pairing message with Passkey Reset sub-opcode. If the passkey has been set by the :c:func:`bt_mesh_le_pair_resp_passkey_set` function, the predefined passkey will be returned in the Passkey Status message. Otherwise, a new passkey will be generated by LE Pairing Responder model and returned in the Passkey Status message. | |
| Before the pairing is initiated, an initiator must send an LE Pairing message with the Passkey Reset sub-opcode. | |
| If the passkey has been set by the :c:func:`bt_mesh_le_pair_resp_passkey_set` function, the predefined passkey is returned in the Passkey Status message. | |
| Otherwise, a new passkey will be generated by the LE Pairing Responder model and returned in the Passkey Status message. |
| /** @brief Get passkey to be used in the very next pairing. | ||
| * | ||
| * This function will return the passkey set by the @ref bt_mesh_le_pair_resp_passkey_set function or it will return | ||
| * a randomly generated passkey by the Reset message. |
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.
| * a randomly generated passkey by the Reset message. | |
| * a randomly generated passkey by the reset message. |
| * Updated the :makevar:`FILE_SUFFIX` make variable to use more descriptive suffixes for external flash configurations. | ||
| The new suffixes are ``_dfu_ext_flash`` for external flash DFU storage and ``_ext_flash_settings`` for external flash settings storage. | ||
|
|
||
| * Updated the sample to use the :kconfig:option:`CONFIG_BT_APP_PASSKEY` option instead of the deprecated :kconfig:option:`CONFIG_BT_FIXED_PASSKEY` option. |
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.
| * Updated the :makevar:`FILE_SUFFIX` make variable to use more descriptive suffixes for external flash configurations. | |
| The new suffixes are ``_dfu_ext_flash`` for external flash DFU storage and ``_ext_flash_settings`` for external flash settings storage. | |
| * Updated the sample to use the :kconfig:option:`CONFIG_BT_APP_PASSKEY` option instead of the deprecated :kconfig:option:`CONFIG_BT_FIXED_PASSKEY` option. | |
| * Updated: | |
| * The :makevar:`FILE_SUFFIX` make variable to use more descriptive suffixes for external flash configurations. | |
| The new suffixes are ``_dfu_ext_flash`` for external flash DFU storage and ``_ext_flash_settings`` for external flash settings storage. | |
| * The sample to use the :kconfig:option:`CONFIG_BT_APP_PASSKEY` option instead of the deprecated :kconfig:option:`CONFIG_BT_FIXED_PASSKEY` option. |
| After every pairing request, the application must invalidate the previously used passkey by calling the :c:func:`bt_mesh_le_pair_resp_passkey_invalidate` function. | ||
| This function can be called from callbacks :c:member:`bt_conn_auth_info_cb.pairing_complete` and :c:member:`bt_conn_auth_info_cb.pairing_failed`. | ||
| See the :file:`samples/bluetooth/mesh/common/smp_bt_auth.c` file for the reference. | ||
| This model requires an application to only enable the display capability for the LE pairing by setting the :c:member:`bt_conn_auth_cb.pairing_display` callback. The application must also set the :c:member:`bt_conn_auth_cb.app_passkey` callback to use the passkey generated by LE Pairing Responder model. |
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.
| This model requires an application to only enable the display capability for the LE pairing by setting the :c:member:`bt_conn_auth_cb.pairing_display` callback. The application must also set the :c:member:`bt_conn_auth_cb.app_passkey` callback to use the passkey generated by LE Pairing Responder model. | |
| This model requires an application to only enable the display capability for the LE pairing by setting the :c:member:`bt_conn_auth_cb.passkey_display` callback. | |
| The application must also set the :c:member:`bt_conn_auth_cb.app_passkey` callback to use the passkey generated by the LE Pairing Responder model. |
Is passkey_display the correct call instead of pairing_display?
Is app_passkey the correct callback?
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.
Good catch.
app_passkey comes with the cherry-picking PR: https://github.com/nrfconnect/sdk-zephyr/pull/3466/files
| See the :file:`samples/bluetooth/mesh/common/smp_bt_auth.c` file for the reference. | ||
| This model requires an application to only enable the display capability for the LE pairing by setting the :c:member:`bt_conn_auth_cb.pairing_display` callback. The application must also set the :c:member:`bt_conn_auth_cb.app_passkey` callback to use the passkey generated by LE Pairing Responder model. | ||
| After every pairing request, the application must invalidate the previously used passkey by calling the :c:func:`bt_mesh_le_pair_resp_passkey_invalidate` function or calling :c:func:`bt_mesh_le_pair_resp_passkey_set` with :ref:`BT_PASSKEY_RAND` value. | ||
| Those functions can be called from callbacks :c:member:`bt_conn_auth_info_cb.pairing_complete` and :c:member:`bt_conn_auth_info_cb.pairing_failed`. See the :file:`samples/bluetooth/mesh/common/smp_bt_auth.c` file for the reference. |
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.
| Those functions can be called from callbacks :c:member:`bt_conn_auth_info_cb.pairing_complete` and :c:member:`bt_conn_auth_info_cb.pairing_failed`. See the :file:`samples/bluetooth/mesh/common/smp_bt_auth.c` file for the reference. | |
| Those functions can be called from callbacks :c:member:`bt_conn_auth_info_cb.pairing_complete` and :c:member:`bt_conn_auth_info_cb.pairing_failed`. | |
| See the :file:`samples/bluetooth/mesh/common/smp_bt_auth.c` file for the reference. |
| This function can be called from callbacks :c:member:`bt_conn_auth_info_cb.pairing_complete` and :c:member:`bt_conn_auth_info_cb.pairing_failed`. | ||
| See the :file:`samples/bluetooth/mesh/common/smp_bt_auth.c` file for the reference. | ||
| This model requires an application to only enable the display capability for the LE pairing by setting the :c:member:`bt_conn_auth_cb.pairing_display` callback. The application must also set the :c:member:`bt_conn_auth_cb.app_passkey` callback to use the passkey generated by LE Pairing Responder model. | ||
| After every pairing request, the application must invalidate the previously used passkey by calling the :c:func:`bt_mesh_le_pair_resp_passkey_invalidate` function or calling :c:func:`bt_mesh_le_pair_resp_passkey_set` with :ref:`BT_PASSKEY_RAND` value. |
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.
| After every pairing request, the application must invalidate the previously used passkey by calling the :c:func:`bt_mesh_le_pair_resp_passkey_invalidate` function or calling :c:func:`bt_mesh_le_pair_resp_passkey_set` with :ref:`BT_PASSKEY_RAND` value. | |
| After every pairing request, the application must invalidate the previously used passkey by calling the :c:func:`bt_mesh_le_pair_resp_passkey_invalidate` function or calling :c:func:`bt_mesh_le_pair_resp_passkey_set` with the ``BT_PASSKEY_RAND`` value. |
Any specific reason for using ref for a value?
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.
Perhaps it should be :c:macro:BT_PASSKEY_RAND?
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 am not able to check this locally, does :c:macro: works with zephyr defined ones? I mean can doc pick up from zephyr?
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 do use it at least here and it works:
| The last element in the opcode list is always the :c:macro:`BT_MESH_MODEL_OP_END` macro: |
https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/bt/bt_mesh/vendor_model/dev_overview.html#adding_the_model_to_the_node_composition_data
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.
nice, we can do that then 👍
Manifest update to depracate and replace BT_FIXED_PADDKEY Signed-off-by: alperen sener <[email protected]>
d30f085 to
27124bd
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.
Addressed the Doc reviews.
Replaced the matter sample commit with the one given by @ArekBalysNordic with connectedhomeip revision.
I ll update the diagram once I have it, until then at least we can merge the sdk-zephyr, and sdk-connectedhomeip PRs.
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.
TODO:
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.
Thanks!
27124bd to
6064145
Compare
BT_FIXED_PASSKEY is depracated so wee need to aling the le pair responder model with the new Kconfig BT_APP_PASSKEY usage. Adding bt_mesh_le_pair_resp_passkey_get to be able to retreive the passkey set randomly or by app. Signed-off-by: alperen sener <[email protected]>
BT_FIXED_PASSKEY is deprecated, thus we start using BT_APP_PASSKEY Signed-off-by: alperen sener <[email protected]>
CONFIG_BT_FIXED_PASSKEY has been deprecated. We switched to CONFIG_BT_APP_PASSKEY and added a migration guide entry. Signed-off-by: Arkadiusz Balys <[email protected]>
6064145 to
708e406
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.
Doc fix.
Deprecating BT_FIXED_PASSKEY and start using BT_APP_PASSKEY instead.