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

Data len is set to 0xF4(244) ERROR

Hello

When I send data over BLE, I got this messages in debug terminal.

<info> app: Debug logging for UART over RTT started.
<info> app: Connected
<info> app: Data len is set to 0xF4(244)
<error> app: Fatal error

I changed BLE_GATT_ATT_MTU 23 to 247 in code(static uint16_t   m_ble_nus_max_data_len = BLE_GATT_ATT_MTU_DEFAULT - 3;)

However, There was no changes.   

Also, there is my connection parameters.

#define MIN_CONN_INTERVAL               MSEC_TO_UNITS(8, UNIT_1_25_MS)             /**< Minimum acceptable connection interval (20 ms), Connection interval uses 1.25 ms units. */
#define MAX_CONN_INTERVAL               MSEC_TO_UNITS(700, UNIT_1_25_MS)             /**< Maximum acceptable connection interval (75 ms), Connection interval uses 1.25 ms units. */
#define SLAVE_LATENCY                   0                                           /**< Slave latency. */
#define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS)             /**< Connection supervisory timeout (4 seconds), Supervision Timeout uses 10 ms units. */
#define FIRST_CONN_PARAMS_UPDATE_DELAY  APP_TIMER_TICKS(5000)                       /**< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (5 seconds). */
#define NEXT_CONN_PARAMS_UPDATE_DELAY   APP_TIMER_TICKS(30000)                      /**< Time between each call to sd_ble_gap_conn_param_update after the first call (30 seconds). */
#define MAX_CONN_PARAMS_UPDATE_COUNT    3        

And, the picture is call stack after <error> app : Fatal error

How can I solve this problem??

Parents Reply
  • Assume the error is 0x13 hexadecimal? At least that's what was shown in the screenshot you posted earlier. In that case, you are actually getting the NRF_ERROR_RESOURCES error, not NRF_ERROR_TIMEOUT.

    This error means the Softdevice's notification queue is full, and that you need to wait for packets to be transmitted before attempting to add more packets to the queue. In other words, the throughput of your connection is too low to keep up with the current SAADC sample rate.

    To increase the throughput you may try to recuce the MAX_CONN_INTERVAL paramater. 15 ms for instance.

    API documentation for reference: sd_ble_gatts_hvx()

Children
Related