Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Notification length greater than current connection MTU size (not MTU max size)

Hey Guys,

Have been playing around with various MTU sizes to better understand throughput.  I'm curious about one scenario though.  Let's say for example that we are using the UART service and our MAX_MTU size is 158.  The UART service sets the characteristic to use a max length of MAX_MTU.

Then let's say in my code I do ble_nus_string_send(&m_nus, data, dataLength), where dataLength = 100.

For phones capable of higher MTUs & DLE this will work fine and we'll get higher throughput.  However, what happens if a older phone who is only capable of an MTU size of 23 connects?

I've tested this on my phone by connecting and then manually setting the MTU connection size to 23.  It looks like my code doesn't throw an errors, I still see TX complete events.  However, in nrfConnect, I don't see any data being read back.

What is the expected behavior here?  Or is it expected that I need to keep track of the MTU size and adjust the notification length appropriately?

Related