This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Increasing BLE MTU/Data Length For Notifications on NCS v1.8

Hello,

I am new to embedded/BLE development so forgive me for my ignorance on some of these topics. I am creating a fairly simple BLE Peripheral Server device that has a few sensors connected and will notify the Central Client with the sensor values on a regular basis via a GATT service with characteristics for each sensor (it seems like this is the proper way to do this?). I have adapted some of the code from the Zephyr BLE Peripheral sample (albeit simplified) to write my program. The biggest sensor value I have to send is a uint16_t array of length 12 (24 bytes). When I setup notifications for this characteristic I get the following outputs from the NRF terminal and the notifications do not work:

<wrn> bt_att: No ATT channel for MTU 27
<wrn> bt_att: No buffer available to send notification

When I reduce the size of the array to length 6 (12 bytes) then it works properly and notifies without errors. I suspect this problem is due to the ATT and/or Data Length parameters. I have been browsing online and these forums for a few hours today and none of the answers I've found have worked for me. I have tried pasting various things in prj.conf and also attempting to use the "Update MTU" and "Update Data Length" options in the NRF Connect BLE tool once connected but the console output shows that the update does not work and the value stays at 23 or whatever the default is.

So my question is, what is the proper and most simple way to fix this and be able to read and send notifications for a characteristic with data of this size?

For reference, I am using:

NRF Connect SDK v1.8.0 with VS Code

NRF52833DK (the device I'm programming)

NRF52840 Dongle (for the NRF Connect BLE tool)

I would include the code and prj.conf values I've tried so far but there are so many of them it would be long and pointless considering none have worked and some have caused compilation issues. Any example of code and/or configuration options to fix this would be great. If those don't work then I will start attaching my files for everyone to view.

Thanks to anyone who has the time to help!

Related