Skip to content

apps: bttester: Implement notify / Remove set_mult #1964

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

Merged
merged 2 commits into from
May 12, 2025

Conversation

szymon-czapracki
Copy link
Contributor

@szymon-czapracki szymon-czapracki commented Jan 28, 2025

Add functionality to utilize BTP notify multiple command.
Previous notify handling via set_mult parses non-existent data.

@github-actions github-actions bot added the size/S Small PR label Jan 28, 2025
@szymon-czapracki szymon-czapracki force-pushed the notify_mult branch 5 times, most recently from 2bc0f0f to 153b898 Compare January 29, 2025 16:02
@szymon-czapracki szymon-czapracki changed the title apps: bttester: Add notify multiple command apps: bttester: Implement notify / Remove set_mult Jan 29, 2025
uint16_t count;
uint8_t data[0];
uint16_t data[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

name this handles[0]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


os_mbuf_append(tuples[i].value, cp->data + data_idx, data_len);
data_idx += data_len;
if (cp->count > sizeof(cb_data.handles)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

while you are at is please also add size validations for btp command since it is declared BTP_HANDLER_LENGTH_VARIABLE

if (cmd_len < sizeof(*cp) || cmd_len != (sizeof(*cp) + (le16toh(cp->count)) * sizeof(cp->handles[0])))) { return failed;}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


os_mbuf_append(tuples[i].value, cp->data + data_idx, data_len);
data_idx += data_len;
if (cp->count > sizeof(cb_data.handles)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

count is also le16

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@szymon-czapracki szymon-czapracki force-pushed the notify_mult branch 2 times, most recently from 11b505e to 98912b5 Compare March 21, 2025 13:34
@szymon-czapracki szymon-czapracki requested a review from sjanc March 21, 2025 13:35
Add functionality to utilize BTP notify multiple command.
Existing notify handling parses non-existent data.
This command has no corresponding auto-pts procedure.
Notify is now utilized via function specially designed
for notify purpose.
@szymon-czapracki szymon-czapracki requested a review from sjanc May 12, 2025 11:28
@sjanc sjanc merged commit 75a3ec3 into apache:master May 12, 2025
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Small PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants