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

Characteristic read response is limited to 19 bytes when reading by UUID #1881

Open
exocron opened this issue Sep 27, 2024 · 0 comments
Open

Comments

@exocron
Copy link

exocron commented Sep 27, 2024

When reading a characteristic by type/UUID, if the length of the response is greater than 19 bytes, the server will respond with Unlikely Error. This limitation does not exist when reading by handle. According to the Core Specification, the maximum length for a single attribute response when reading by type can be up to 253 bytes, provided that the MTU is large enough to handle it.

This line calls ble_att_svr_read_flat with a fixed size buffer, and is likely the culprit:

rc = ble_att_svr_read_flat(conn_handle, entry, 0, sizeof buf, buf,

To the access_cb function, reading a characteristic this way appears to be successful. There's no obvious indication that it will actually return an error to the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant