Skip to content

Comments

bluetooth: subsys: samples: clarify BMS auth code Kconfig scope#641

Open
PizzaAllTheWay wants to merge 2 commits intonrfconnect:mainfrom
PizzaAllTheWay:config-scope
Open

bluetooth: subsys: samples: clarify BMS auth code Kconfig scope#641
PizzaAllTheWay wants to merge 2 commits intonrfconnect:mainfrom
PizzaAllTheWay:config-scope

Conversation

@PizzaAllTheWay
Copy link

The BMS authorization code configuration has been aligned with its actual usage by making it sample‑specific.
CONFIG_BLE_BMS_AUTHORIZATION_CODE (and BLE_BMS_AUTHORIZATION_CODE) was previously defined at the BMS library level even though it is only used by the BLE BMS sample. This change clarifies the configuration scope and avoids confusion for users by ensuring the authorization code setting is defined and documented where it is actually applied.

@PizzaAllTheWay PizzaAllTheWay requested review from a team as code owners February 10, 2026 15:33
@github-actions github-actions bot added changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. doc-required PR must not be merged without tech writer approval. labels Feb 10, 2026
@github-actions
Copy link

You can find the documentation preview for this PR here.


Authorization codes up to **127 bytes** are supported. You may configure the code to any value within this limit as needed.

If this security feature is not required, it can be enabled or disabled using `BLE_BMS_USE_AUTHORIZATION_CODE` in the same Kconfig file. After changing the configuration, rebuild the sample and test how bond deletion behaves with or without an authorization code.
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
If this security feature is not required, it can be enabled or disabled using `BLE_BMS_USE_AUTHORIZATION_CODE` in the same Kconfig file. After changing the configuration, rebuild the sample and test how bond deletion behaves with or without an authorization code.
If this security feature is not required, it can be enabled or disabled using the :kconfig:option:`CONFIG_APP_BLE_BMS_USE_AUTHORIZATION_CODE` Kconfig option. After changing the configuration, rebuild the sample and test how bond deletion behaves with or without an authorization code.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

@eivindj-nordic eivindj-nordic left a comment

Choose a reason for hiding this comment

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

One more nit.


Authorization codes up to **127 bytes** are supported. You may configure the code to any value within this limit as needed.

If this security feature is not required, it can be enabled or disabled using :kconfig:option:`APP_BLE_BMS_USE_AUTHORIZATION_CODE` in the same Kconfig file. After changing the configuration, rebuild the sample and test how bond deletion behaves with or without an authorization code.
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
If this security feature is not required, it can be enabled or disabled using :kconfig:option:`APP_BLE_BMS_USE_AUTHORIZATION_CODE` in the same Kconfig file. After changing the configuration, rebuild the sample and test how bond deletion behaves with or without an authorization code.
If this security feature is not required, it can be enabled or disabled using the :kconfig:option:`APP_BLE_BMS_USE_AUTHORIZATION_CODE` Kconfig option. After changing the configuration, rebuild the sample and test how bond deletion behaves with or without an authorization code.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

@PizzaAllTheWay PizzaAllTheWay force-pushed the config-scope branch 2 times, most recently from a8968fa to 218f7c1 Compare February 16, 2026 09:04
@github-actions github-actions bot removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Feb 16, 2026
Comment on lines 17 to 23
config APP_BLE_BMS_USE_AUTHORIZATION_CODE
bool "Use authorization code"
default y

config APP_BLE_BMS_AUTHORIZATION_CODE
string "Authorization code"
default "ABCD"
Copy link
Contributor

Choose a reason for hiding this comment

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

use SAMPLE_ for these

Copy link
Author

Choose a reason for hiding this comment

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

@eivindj-nordic What do you think? This would require changing all Kconfig options in all samples to use the SAMPLE_ prefix, since all samples currently use the APP_ prefix.

Copy link
Contributor

@eivindj-nordic eivindj-nordic Feb 17, 2026

Choose a reason for hiding this comment

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

We will create a separate PR to address this across the repository to match the new guidelines.

Copy link
Contributor

Choose a reason for hiding this comment

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

Opened #648. You can align this and other PRs to use the SAMPLE_ prefix too.

Copy link
Author

Choose a reason for hiding this comment

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

oki will do for this PR and the #637 PR

Copy link
Author

Choose a reason for hiding this comment

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

fixed :)

The BMS authorization code configuration has been aligned with its
actual usage by making it sample‑specific.
CONFIG_BLE_BMS_AUTHORIZATION_CODE (and BLE_BMS_AUTHORIZATION_CODE) was
previously defined at the BMS library level even though it is only
used by the BLE BMS sample. This change clarifies the configuration
scope and avoids confusion for users by ensuring the authorization
code setting is defined and documented where it is actually applied.

Signed-off-by: Martynas Smilingis <martynas.smilingis@nordicsemi.no>
clarified in changelog that CONFIG_BLE_BMS_AUTHORIZATION_CODE and
CONFIG_BLE_BMS_USE_AUTHORIZATION_CODE have been moved to be
sample specific.

Signed-off-by: Martynas Smilingis <martynas.smilingis@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-required PR must not be merged without tech writer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants