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

Bluetooth: BAP: Add PSN debug log support #63607

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

Thalley
Copy link
Collaborator

@Thalley Thalley commented Oct 6, 2023

Add a Kconfig that enables support for logging and debugging invalid sequence numbers.

larsgk
larsgk previously approved these changes Oct 6, 2023
@Thalley Thalley requested a review from cvinayak October 6, 2023 11:06
Comment on lines 285 to 287
Use this option to enable Bluetooth Audio Stream sequence number debuggin logs for
the Bluetooth Audio functionality. This will provide an warning if the application
provide unexpected sequence numbers.
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
Use this option to enable Bluetooth Audio Stream sequence number debuggin logs for
the Bluetooth Audio functionality. This will provide an warning if the application
provide unexpected sequence numbers.
Use this option to enable Bluetooth Audio Stream sequence number debugging logs for
the Bluetooth Audio functionality. This will provide a warning if the application
provides unexpected sequence numbers.

@@ -273,6 +273,15 @@ int bt_bap_stream_send(struct bt_bap_stream *stream, struct net_buf *buf,
return -EBADMSG;
}

#if defined(CONFIG_BT_BAP_DEBUG_STREAM_SEQ_NUM)
if (stream->_prev_seq_num != 0U && seq_num != 0U && stream->_prev_seq_num + 1 != seq_num) {
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 (stream->_prev_seq_num != 0U && seq_num != 0U && stream->_prev_seq_num + 1 != seq_num) {
if (stream->_prev_seq_num != 0U && seq_num != 0U && (stream->_prev_seq_num + 1U) != seq_num) {

larsgk
larsgk previously approved these changes Oct 6, 2023
default y
help
Use this option to enable Bluetooth Audio Stream sequence number debugging logs for
the Bluetooth Audio functionality. This will provide an warning if the application
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
the Bluetooth Audio functionality. This will provide an warning if the application
the Bluetooth Audio functionality. This will provide a warning if the application

Add a Kconfig that enables support for logging and
debugging invalid sequence numbers.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
@fabiobaltieri fabiobaltieri added this to the v3.6.0 milestone Oct 9, 2023
@carlescufi carlescufi merged commit 6054714 into zephyrproject-rtos:main Oct 20, 2023
21 checks passed
@Thalley Thalley deleted the bap_stream_psn_debug branch December 18, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants