-
Notifications
You must be signed in to change notification settings - Fork 433
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
Conversation
2bc0f0f
to
153b898
Compare
apps/bttester/src/btp/btp_gatt.h
Outdated
uint16_t count; | ||
uint8_t data[0]; | ||
uint16_t data[0]; |
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.
name this handles[0]
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.
Done
apps/bttester/src/btp_gatt.c
Outdated
|
||
os_mbuf_append(tuples[i].value, cp->data + data_idx, data_len); | ||
data_idx += data_len; | ||
if (cp->count > sizeof(cb_data.handles)) { |
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.
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;}
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.
Done
apps/bttester/src/btp_gatt.c
Outdated
|
||
os_mbuf_append(tuples[i].value, cp->data + data_idx, data_len); | ||
data_idx += data_len; | ||
if (cp->count > sizeof(cb_data.handles)) { |
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.
count is also le16
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.
Done
11b505e
to
98912b5
Compare
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.
98912b5
to
fd3860b
Compare
Add functionality to utilize BTP notify multiple command.
Previous notify handling via set_mult parses non-existent data.