This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF maximum gatt mtu size

Hi,

I am trying to develop an application which recieves data over SPI and I want to send this data over ble, I am using NUS service. I am recieving 5 bytes over SPI at a time, and SPI sampling rate is around 4 Mhz.

I am sending this data to ble buffer, till I get NRF_ERROR_RESOURCES err_code. Also when I get BLE_GATTS_EVT_HVN_TX_COMPLETE notification I push remaining data in BLE queue. I repeat this procedure.

I am able to maximum MTU size set in config file to 158.

I have used gatt_mtu_set(),data_len_ext_set,conn_evt_len_ext_set from nrf's demo project for throughput.

But when I set maximum mtu size to 251 and try to use it, nrf chip doesn't advertise and there is no ble transfer?

From different ques on nordic developer zone I came to know that max size is 247 bytes. Do we need to change something on app side for this?

Parents
  • Do you really need a bigger ATT MTU? If you are sending 5 bytes at the time?

    Anyways, which SDK and SoftDevice version are you using? Which example? Sounds like you are getting an error code somewhere and the chip resets. Please try to turn off optimizations, define DEBUG, and set a breakpoint in app_error_handler(). If you hit the breakpoint, extract the error code, line number and file name.

Reply
  • Do you really need a bigger ATT MTU? If you are sending 5 bytes at the time?

    Anyways, which SDK and SoftDevice version are you using? Which example? Sounds like you are getting an error code somewhere and the chip resets. Please try to turn off optimizations, define DEBUG, and set a breakpoint in app_error_handler(). If you hit the breakpoint, extract the error code, line number and file name.

Children
No Data
Related