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

BUG - BT USS Service write errors when MTU size is to small #35

Open
TjazVracko opened this issue Feb 16, 2023 · 0 comments
Open

BUG - BT USS Service write errors when MTU size is to small #35

TjazVracko opened this issue Feb 16, 2023 · 0 comments
Labels
type: bug Something is not working and must be fixed.

Comments

@TjazVracko
Copy link
Collaborator

TjazVracko commented Feb 16, 2023

Describe the bug

If a packet that would be notified as a response to write operation (for example 0x04 (list) is larger than the MTU size, prv_send_notification will return an error, and thus BT_ATT_ERR_UNLIKELY will be returned to the central device.

Firmware/Software Version
v1.3.4 of irnas-usersettings-lib

To Reproduce
Steps to reproduce the behavior:

  1. Connect to device from nrf connect app
  2. Make sure MTU size is low (23).
  3. Subscribe to USS notifications
  4. Send 0x04 command
  5. If a setting has a longer name or value, it will exeede 23 bytes when encoded and will trigger the bug.

How to fix

Two paths:

  1. Return a better error message to indicate MTU size.
  2. if packet is to large, split it and notify it in chunks.
@TjazVracko TjazVracko added the type: bug Something is not working and must be fixed. label Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something is not working and must be fixed.
Projects
None yet
Development

No branches or pull requests

1 participant