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:
- Connect to device from nrf connect app
- Make sure MTU size is low (23).
- Subscribe to USS notifications
- Send
0x04 command
- 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:
- Return a better error message to indicate MTU size.
- if packet is to large, split it and notify it in chunks.
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:
0x04commandHow to fix
Two paths: