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

Characteristics count and TX ressources

Hello everyone,

I have a device with a custom service including 3 characteristics and another device with 4 characteristics (same 3 chars as the first device + 1 new).

When I sync data continuously on the same char for both devices (as soon as BLE_GATTS_EVT_HVN_TX_COMPLETE is received, I send a new packet), I have 30% TX failure rate due to NRF_ERROR_RESOURCES on the device with 3 chars. However, on the device with 4 chars, I have 50% TX failure rate with same error: NRF_ERROR_RESOURCES.
I am not trying to send more data on the second device. Actually, the data is being sent a bit less often looking at the timestamps.

Is there a link between char count and TX buffer size?

Maybe bandwidth occupation?


Best,

  • Hi,

    I don't think there should be any link between the characteristics count and TX buffer size. Have you seen ths post regarding the NRF_ERROR_RESOURCES error?

  • Hello,

    I performed data sync on both devices, using the same phone, and logged into a CSV file:

    characteristic number (0, 1 or 2), timestamp with hundredth, err_code

    Both have a MTU of 120 bytes.

    As I said before, packets are sent on BLE_GATTS_EVT_HVN_TX_COMPLETE event.

    Device with 3 data chars has way more errors:

    nRF52840

    SD: s140_nrf52_6.0.0_softdevice.hex

    SDK 15.0
    output_s_OP3T_char2notsubscribed.csv

    Device with 2 data char:

    nRF52832
    SD s132_nrf52_4.0.2_softdevice.hex

    SDK 13.0

    output_OP6.csv

    How is it possible to have that many NRF_ERROR_RESOURCES on the device with 3 data chars?

    Best,

    Cyril

  • Hi Cyril

    Martin is on vacation, so I've been assigned this case in his absence. I'm struggling to see why you would get this many resource errors here. What devices are your peripheral and central? What is your buffer size set to? Are you able to see where the NRF_ERROR_RESOURCES is coming from? What is the NRF_SDH_BLE_GAP_EVENT_LENGTH in sdk_config.h set to? You can try to increase that and alternatively lower your connection interval parameters.

    Due to the summer holidays in Norway, our support team is understaffed this week, and delayed replies must be expected. Sorry for the inconvenience!

    Best regards,

    Simon

  • Hello,

    sorry for the late response.

    Peripheral are either nRF52832 or nRF52840 for peripheral (see above MCU, SDK and SD version).
    Central is One Plus 3T or One Plus 6 but the behavior looks the same. 

    Connection interval is changed dynamically and lowered when much data has to be transferred. Regarding BLE GAP event length, the MCU is acting as peripheral so that no longer relevant, right?

    For nRF52840:
    NRF_SDH_BLE_GAP_EVENT_LENGTH 320

    I think I'll investigate with 2 simple examples for each target using the two different SDK on each target.

    I'll let you know if I find someting.

    Best

Related