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

GATT timeout executing long write with nRF Connect

I successfully built the example peripheral project "experimental_ble_app_queued_writes" from nRF5_SDK_12.0.0_12 and successfully downloaded the app to a nRF52832 development board with subsequent automatic activation of fast advertising. I can successfully connect to the resulting "Queued_Write" peripheral with the nRF Connect software that interfaces with a nRF51 dongle. I can successfully access the "UART over BLE" service with the associated single characteristic that is supposed to support long writes. However, when I actually try to write some number of bytes to this characteristic, nRF Connect eventually times out with a "Received a Gatt timeout" message. My assumption would be that this should work correctly with no user modifications since it is Nordic example code running on Nordic hardware and interfacing with the nRF Connect software also running on Nordic hardware. What's going wrong? Thanks for the help.

Parents
  • OK, I have discovered by testing that the maximum allowed length for a long variable length characteristic is indeed 510 bytes, and that the minimum corresponding buffer size I can map to this characteristic without triggering a fatal error on every write is 686 bytes. This is 6 bytes less than what is given by the formula ceil(510*23/17)+2 = 692 (which I discovered as part of a different thread pertaining to the nRF51822 with SoftDevice S110 version 7.1). So, my question final question is the following. Does the above formula also apply to the nRF52832 running SoftDevice S132 version 3.0.0? Thanks for the help.

Reply
  • OK, I have discovered by testing that the maximum allowed length for a long variable length characteristic is indeed 510 bytes, and that the minimum corresponding buffer size I can map to this characteristic without triggering a fatal error on every write is 686 bytes. This is 6 bytes less than what is given by the formula ceil(510*23/17)+2 = 692 (which I discovered as part of a different thread pertaining to the nRF51822 with SoftDevice S110 version 7.1). So, my question final question is the following. Does the above formula also apply to the nRF52832 running SoftDevice S132 version 3.0.0? Thanks for the help.

Children
No Data
Related