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

LMP Responese Timeout - nRF52840 S140v6.1.0 SDK 15.2.0

Hello everybody,

I'm using nRF5280 (Laird BL654) with SoftDeveice S140v6.1.0 and SDK 15.2.0 with a modified version of the blinky peripheral example.

I've changed NRF_SDH_BLE_GATT_MAX_MTU_SIZE to 138 and NRF_SDH_BLE_GAP_DATA_LENGTH to 142

After connecting to this chip with a Samsung Galaxy S7 with Android 8.0.0 the chip disconnects with reason 0x22 (LMP Response Timeout).

I've attached the debug log from SES.


Galaxy S7 Android 8.0.0  MTU 138 Bytes

<debug> nrf_sdh_ble: RAM starts at 0x20002768
<info> app: Blinky example started.
<debug> nrf_sdh_ble: BLE event: 0x10.
<debug> nrf_ble_gatt: Requesting to update ATT MTU to 138 bytes on connection 0x0.
<debug> nrf_ble_gatt: Updating data length to 142 on connection 0x0.
<info> app: Connected
<debug> nrf_sdh_ble: BLE event: 0x3A.
<debug> nrf_ble_gatt: ATT MTU updated to 138 bytes on connection 0x0 (response).
<debug> nrf_sdh_ble: BLE event: 0x12.
<debug> nrf_sdh_ble: BLE event: 0x12.
<debug> nrf_sdh_ble: BLE event: 0x12.
<debug> nrf_sdh_ble: BLE event: 0x11.
<info> app: Disconnected reason: 0x22

This problem occures only with this specific phone and if the MTU is larger than 23.

For example this is the debug log of a connection with a Galaxy S9 with Android 9.0.0 and an MTU of 138.

alaxy S9 Android 9.0.0 MTU 138 Bytes

<debug> nrf_sdh_ble: RAM starts at 0x20002768
<info> app: Blinky example started.
<debug> nrf_sdh_ble: BLE event: 0x10.
<debug> nrf_ble_gatt: Requesting to update ATT MTU to 138 bytes on connection 0x0.
<debug> nrf_ble_gatt: Updating data length to 142 on connection 0x0.
<info> app: Connected
<debug> nrf_sdh_ble: BLE event: 0x3A.
<debug> nrf_ble_gatt: ATT MTU updated to 138 bytes on connection 0x0 (response).
<debug> nrf_sdh_ble: BLE event: 0x24.
<debug> nrf_ble_gatt: Data length updated to 142 on connection 0x0.
<debug> nrf_ble_gatt: max_rx_octets: 27
<debug> nrf_ble_gatt: max_tx_octets: 142
<debug> nrf_ble_gatt: max_rx_time: 328
<debug> nrf_ble_gatt: max_tx_time: 2120
<debug> nrf_sdh_ble: BLE event: 0x12.
<debug> nrf_sdh_ble: BLE event: 0x23.
<debug> nrf_ble_gatt: Peer on connection 0x0 requested a data length of 27 bytes.
<debug> nrf_ble_gatt: Updating data length to 27 on connection 0x0.
<debug> nrf_sdh_ble: BLE event: 0x24.
<debug> nrf_ble_gatt: Data length updated to 27 on connection 0x0.
<debug> nrf_ble_gatt: max_rx_octets: 27
<debug> nrf_ble_gatt: max_tx_octets: 27
<debug> nrf_ble_gatt: max_rx_time: 328
<debug> nrf_ble_gatt: max_tx_time: 2120
<debug> nrf_sdh_ble: BLE event: 0x12.
<debug> nrf_sdh_ble: BLE event: 0x12.

Parents
  • Hi,

    I have talked to one of our Android developers and it seems like that there shouldn't be different MTU size for different phones. Android supports MTU from 23 up to 517. What other changes have you done to the example? What is your connection interval?

  • Hi ,

    I have only changed the MTU.

    I Havn't toched the connection interval.

    #define MIN_CONN_INTERVAL               MSEC_TO_UNITS(100, UNIT_1_25_MS)        /**< Minimum acceptable connection interval (0.5 seconds). */
    #define MAX_CONN_INTERVAL               MSEC_TO_UNITS(200, UNIT_1_25_MS)        /**< Maximum acceptable connection interval (1 second). */
    #define SLAVE_LATENCY                   0                                       /**< Slave latency. */
    #define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS)         /**< Connection supervisory time-out (4 seconds). */
    
    #define FIRST_CONN_PARAMS_UPDATE_DELAY  APP_TIMER_TICKS(20000)                  /**< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (15 seconds). */
    #define NEXT_CONN_PARAMS_UPDATE_DELAY   APP_TIMER_TICKS(5000)                   /**< Time between each call to sd_ble_gap_conn_param_update after the first call (5 seconds). */
    #define MAX_CONN_PARAMS_UPDATE_COUNT    3                                       /**< Number of attempts before giving up the connection parameter negotiation. */
    
    #define BUTTON_DETECTION_DELAY          APP_TIMER_TICKS(50)                     /**< Delay from a GPIOTE event until a button is reported as pushed (in number of timer ticks). */

    These are the original connection Parameter from the example.

Reply
  • Hi ,

    I have only changed the MTU.

    I Havn't toched the connection interval.

    #define MIN_CONN_INTERVAL               MSEC_TO_UNITS(100, UNIT_1_25_MS)        /**< Minimum acceptable connection interval (0.5 seconds). */
    #define MAX_CONN_INTERVAL               MSEC_TO_UNITS(200, UNIT_1_25_MS)        /**< Maximum acceptable connection interval (1 second). */
    #define SLAVE_LATENCY                   0                                       /**< Slave latency. */
    #define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS)         /**< Connection supervisory time-out (4 seconds). */
    
    #define FIRST_CONN_PARAMS_UPDATE_DELAY  APP_TIMER_TICKS(20000)                  /**< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (15 seconds). */
    #define NEXT_CONN_PARAMS_UPDATE_DELAY   APP_TIMER_TICKS(5000)                   /**< Time between each call to sd_ble_gap_conn_param_update after the first call (5 seconds). */
    #define MAX_CONN_PARAMS_UPDATE_COUNT    3                                       /**< Number of attempts before giving up the connection parameter negotiation. */
    
    #define BUTTON_DETECTION_DELAY          APP_TIMER_TICKS(50)                     /**< Delay from a GPIOTE event until a button is reported as pushed (in number of timer ticks). */

    These are the original connection Parameter from the example.

Children
No Data
Related