bt_gatt_notify
function does not notify data larger than 20 bytes
#52475
Replies: 6 comments
-
The error might be wrong, but the failure is expected, you can't notify > 20 bytes unless you use DLE. Try with the latest version of zephyr on main branch and see if you see the same issue, if it does not return that error, then this bug can be closed. If you then try on the latest version of nRF connect SDK and see the issue, please report this to nordic on https://devzone.nordicsemi.com/ not here |
Beta Was this translation helpful? Give feedback.
-
Because I'm not using Zephyr directly but trough the nRF Connect SDK I don't know how to run zephyr on the main branch. Can you instruct me how to use DLE feature? |
Beta Was this translation helpful? Give feedback.
-
https://docs.zephyrproject.org/latest/develop/getting_started/index.html describes how to get and use zephyr.
It can, it can't in your example above because you haven't enabled DLE. This is printed in clear text in the output:
And this is actually nothing to do with zephyr, this is part of the bluetooth standard.
You can look at https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/subsys/mgmt/mcumgr/smp_svr/overlay-bt.conf to see what Kconfig values need to be set |
Beta Was this translation helpful? Give feedback.
-
Kconfig values in the provided link did not work for me. Also, I've set the following Kconfig values looking at the throughput example:
and called the |
Beta Was this translation helpful? Give feedback.
-
Then the remote device does not support DLE. |
Beta Was this translation helpful? Give feedback.
-
What do you mean by saying |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I have BLE peripheral device which is trying to notify 20 bytes of data over custom GATT characteristic using
bt_gatt_notify
function. When there are not any devices connected,bt_gatt_notify
function returns-ENOTCONN
(-128) error as normal. Once the device is connected,bt_gatt_notify
function is returning0
indicating that the notify was successful. Also, I can clearly see the data being notified with the nrf Connect android app.However, when I try to send 21 bytes of data (or more),
bt_gatt_notify
function is returning-ENOTCONN
error whether the device is connected or not.I am using nrf52832 target platform and nRF Connect v2.0.2 SDK.
To Reproduce
Here is the code that I'm working with:
Expected behavior
The output on the terminal should be as follows:
but I'm getting
21 -128
,22 -128
etc. on the console output.Logs and console output
Current console output (with error):
Environment:
Beta Was this translation helpful? Give feedback.
All reactions