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

Fatal error occurs when trying MTU extension between sdk15.2 and sdk12.3

Hi, Everyone

I have a product (named "A") developed on sdk12.3 and 52832.
This product has peripheral function and MTU Size is 64.
If I use "nRF Toolbox -> UART" on my smartphone and connect it to "A", it is performing well for MTU extension and data transmission.
I am developing NUS Central (named "B") using sdk15.2 and 52832.
If "B" tries to connect with "A", "A" fatal error occurs while processing MTU extension.
Attachment 1) peripheral ("A") output message
Attachment 2) peripheral ("A") debugger message

Best Regards,
< "A" fatal error occurs while processing MTU extension. 
  "A" sdk12.3 52832 Peripheral function
  "B" sdk15.2 52832 Central function >
  
0> APP:INFO:Start scanning for device name Cretam_Safety.
 0> APP:INFO:Fast Advertising
 0> APP:INFO:Multilink Example
 0> APP:INFO:Peripheral connected
 0> BLE_GATT:INFO:on_connected_evt(nrf_ble_gatt_t * p_gatt, ble_evt_t * p_ble_evt)
 0> BLE_GATT:INFO:request ATT MTU 64 for conn_handle 0 
 0> SDH:DEBUG:sd_ble_enable: RAM start at 0x200056a8
=====================================================
< "A" sdk12.3 52832 Peripheral function
  "B" nRFTool -> UART on smartphone >
  
0> APP:INFO:Peripheral connected
 0> BLE_GATT:INFO:on_connected_evt(nrf_ble_gatt_t * p_gatt, ble_evt_t * p_ble_evt)
 0> BLE_GATT:INFO:request ATT MTU 64 for conn_handle 0 
 0> BLE_GATT:INFO:EXCHANGE_MTU_RSP effective ATT MTU is 64 for conn_handle 0 
 0> APP:DEBUG:ATT MTU exchange completed. central 0xf7 peripheral 0x40
===================================================== 

Parents
  • Hi,

    You are getting error-code 8, that is NRF_ERROR_INVALID_STATE. How does the call stack look like? 

    Could it be sd_ble_gatts_exchange_mtu_reply() in nrf_ble_gatt.c that is returning NRF_ERROR_INVALID_STATE?

    What SoftDevice version are you using ? S132 v3.0.0?  Could you test with S132 v3.1.0?

    s132_nrf52_3.1.0_softdevice.hex

  • Hi, Sigurd

    Thank you for your advice.

    I tested with s132_nrf52_3.1.0_softdevice.hex.

    But the same result came out.

    I attached a log file and attached a call stack for peripheral ("A")

    Best Regards,

    Alex

    < "A" fatal error occurs while processing MTU extension. 
      "A" sdk12.3(s132_nrf52_3.1.0_softdevice.hex) 52832 Peripheral function
      "B" sdk15.2 52832 Central function >
      
     0> SDH:DEBUG:sd_ble_enable: RAM start at 0x200056a8
     0> APP:INFO:charge Example
     0> APP:INFO:Start scanning for device name Cretam_Safety.
     0> APP:INFO:Fast Advertising
     0> APP:INFO:Multilink Example
     0> APP:INFO:Peripheral connected
     0> BLE_GATT:INFO:on_connected_evt(nrf_ble_gatt_t * p_gatt, ble_evt_t * p_ble_evt)
     0> BLE_GATT:INFO:request ATT MTU 64 for conn_handle 0 
     0> APP_ERROR:ERROR:Fatal
    =====================================================
    < "A" sdk12.3(s132_nrf52_3.1.0_softdevice.hex) 52832 Peripheral function
      "B" nRFTool -> UART on smartphone >
      
    0> APP:INFO:Peripheral connected
     0> BLE_GATT:INFO:on_connected_evt(nrf_ble_gatt_t * p_gatt, ble_evt_t * p_ble_evt)
     0> BLE_GATT:INFO:request ATT MTU 64 for conn_handle 0 
     0> BLE_GATT:INFO:EXCHANGE_MTU_RSP effective ATT MTU is 64 for conn_handle 0 
     0> APP:DEBUG:ATT MTU exchange completed. central 0xf7 peripheral 0x40
    ===================================================== 
     <   "B" sdk15.2(s132_nrf52_6.1.0_softdevice.hex) 52832 Central log >
     
     <debug> ble_scan: Connecting
     0> <debug> ble_scan: Connection status: 0
     0> <debug> nrf_ble_gatt: Requesting to update ATT MTU to 100 bytes on connection 0x0.
     0> <info> app: Connection 0x0 established, starting DB discovery.
     0> <debug> ble_db_disc: Starting discovery of service with UUID 0x1 on connection handle 0x0.
     0> <info> app: Start scanning for device name SafetyElectronic.
     0> <debug> ble_scan: Scanning
     0> <debug> nrf_ble_gatt: Peer on connection 0x0 requested an ATT MTU of 64 bytes.
     0> <debug> nrf_ble_gatt: Updating ATT MTU to 64 bytes (desired: 100) on connection 0x0.
     
     0> <info> app: LBS central link 0x0 disconnected (reason: 0x8)
     0> <info> app: Start scanning for device name SafetyElectronic.
     0> <debug> ble_scan: Scanning
    
    

  • Hi, Sigurd

    Can not this happen?
    Or does this happen because the SDK version is different?
    I would appreciate it if you could give me a hint.

    Best Regards,

    Alex

  • Hi,

    Please see this post on how to debug this with Keil. Remember to set the Optimization level to 0, and add DEBUG as a Preprocessor symbol. Then post a new image of the call stack when you have done that.

Reply Children
No Data
Related