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
Bluetooth OTS asserts or fail on runtime depending on configuration options #72471
Labels
area: Bluetooth
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Comments
sjanc
added a commit
to sjanc/zephyr
that referenced
this issue
May 20, 2024
MCS OTS support doesn't implement OTS checksum and if this is globally enabled assert is triggered. [00:00:03.409,484] <dbg> bttester_gap: set_io_cap: io_cap: 0 ASSERTION FAIL [ots_init->cb->obj_cal_checksum] @ WEST_TOPDIR/zephyr/subsys/bluetooth/services/ots/ots.c:476 Callback for object calculate checksum is not set This should be reverted when Zephyr issue zephyrproject-rtos#72471 is fixed. Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
sjanc
added a commit
to sjanc/zephyr
that referenced
this issue
May 23, 2024
MCS OTS support doesn't implement OTS checksum and if this is globally enabled assert is triggered. [00:00:03.409,484] <dbg> bttester_gap: set_io_cap: io_cap: 0 ASSERTION FAIL [ots_init->cb->obj_cal_checksum] @ WEST_TOPDIR/zephyr/subsys/bluetooth/services/ots/ots.c:476 Callback for object calculate checksum is not set This should be reverted when Zephyr issue zephyrproject-rtos#72471 is fixed. Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
sjanc
added a commit
to sjanc/zephyr
that referenced
this issue
May 24, 2024
MCS OTS support doesn't implement OTS checksum and if this is globally enabled assert is triggered. [00:00:03.409,484] <dbg> bttester_gap: set_io_cap: io_cap: 0 ASSERTION FAIL [ots_init->cb->obj_cal_checksum] @ WEST_TOPDIR/zephyr/subsys/bluetooth/services/ots/ots.c:476 Callback for object calculate checksum is not set This should be reverted when Zephyr issue zephyrproject-rtos#72471 is fixed. Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
jhedberg
pushed a commit
that referenced
this issue
May 24, 2024
MCS OTS support doesn't implement OTS checksum and if this is globally enabled assert is triggered. [00:00:03.409,484] <dbg> bttester_gap: set_io_cap: io_cap: 0 ASSERTION FAIL [ots_init->cb->obj_cal_checksum] @ WEST_TOPDIR/zephyr/subsys/bluetooth/services/ots/ots.c:476 Callback for object calculate checksum is not set This should be reverted when Zephyr issue #72471 is fixed. Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Bluetooth
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Describe the bug
Currently OTS code asserts or fails depending on configuration selected in Kconfig.
Eg enabling CONFIG_BT_OTS_OACP_CHECKSUM_SUPPORT results in assert on init for instances that doesn't implement obj_cal_checksum callback. Similarly bt_ots_obj_add() may fail if added object has unsupported (ie. disabled in Kconfig) feature.
Since Kconfig is global configuration this leads to confusion where multiple OTS instances are created (eg some might be internal like in MCS case) user might not have control over what is implemented/required by OTS instance...
Either optional features should be made mandatory (ie no kconfig option to disable or always require to implement all callbacks) or some runtime disablement (eg masking out disabled features) could be added. Otherwise one may end up in case where is it impossible to use multiple OTS instances with contradicting features enabled.
note: There are also few other issues with OTS API (ie no userdata for callbacks) so maybe this issue should cover more overhaul as enhancement instead of bug?
The text was updated successfully, but these errors were encountered: