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

DEADBEAF from src\ll_ctrl.s0.c

I use softdevice s110 7.3.0 and SDK version 7.2.

Some times softdevice call app_error_handler with: error_code 0xDEADBEEF line num - 990 file_name - src\ll_ctrl.s0.c

I can't recognize why that happens. softdevice call app_error_handler after i try to disconnect form device and delete bond information.

This is my code:

err_code = dm_device_delete_all(&m_app_handle);	 
APP_ERROR_CHECK(err_code);

if( m_conn_handle == BLE_CONN_HANDLE_INVALID )return NRF_SUCCESS;

err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);	

if( err_code != NRF_ERROR_INVALID_STATE )
{
	APP_ERROR_CHECK(err_code);
}
return NRF_SUCCESS;
Parents
  • I understood why and when such error occur.

    In my application device periodically starts Connection Update Procedure.

    I use 2 sets of connection parameters.

    First one have connection min connection interval 90ms and max connection interval 110ms.

    Second one have connection min connection interval 1450ms and max connection interval 1550ms.

    It takes quite long time to change connection interval from 1450ms to 90ms.

    When I call sd_ble_gap_disconnect while Connection Update Procedure has not been finished error occur.

    When Connection Update Procedure is in progress and try to disconnect from Master Controll Panel the reason of disconnection is quete strange:

    image description

Reply
  • I understood why and when such error occur.

    In my application device periodically starts Connection Update Procedure.

    I use 2 sets of connection parameters.

    First one have connection min connection interval 90ms and max connection interval 110ms.

    Second one have connection min connection interval 1450ms and max connection interval 1550ms.

    It takes quite long time to change connection interval from 1450ms to 90ms.

    When I call sd_ble_gap_disconnect while Connection Update Procedure has not been finished error occur.

    When Connection Update Procedure is in progress and try to disconnect from Master Controll Panel the reason of disconnection is quete strange:

    image description

Children
  • that should not create a softdevice assert in my opinion. I will investigate it further.

  • I noteced nor more thing. I use Master Controll Panel to communicate with my device.

    When Connection Update Procedure is in progress and I try to disconnect from Master Controll Panel reason of disconnection is quite strange: Lost connection to device. Reason: BTLE_STATUS_CODE_LMP_RESPONSE_TIMEOUT.

    And when Connection Update Procedure isn't in progress reason is obvious: Lost connection to device. Reason: BTLE_LOCAL_HOST_TERMINATED_CONNECTION.

  • I will try it out, which version of MCP did you use

  • [10:54:54.1] ConnectToDevice()

    [10:54:54.1] SERVER: Received packet <HciEvent: eventCode=0x05> - <HciEvent: eventCode=0x05>

    [10:54:54.1] ----------------------------

    [10:54:54.1] Connected to device

    [10:54:54.1] Role: 0

    [10:54:54.1] PeerAddressType: 1

    [10:54:54.1] PeerAddress (MSB): E241E8318B99

    [10:54:54.1] Connection Interval: 20.0ms

    [10:54:54.1] Connection Latency: 0

    [10:54:54.1] Supervision Timeout: 3000ms

    [10:54:54.1] Clock Accuracy: (1)

    [10:54:54.1] ----------------------------

    [10:54:54.1] Connected to E241E8318B99

    [10:54:59.1] Received Connection Parameter Update Request

    [10:54:59.1] Automatic connection update accept.

    [10:54:59.1] SendConnectionUpdateResponse(2, 0)

    [10:54:59.2] UpdateConnParams(90, 6, 30000)

    [10:54:59.1] ConnectionParameterUpdateResponse sent

    [10:54:59.4] Connection Parameters Updated. ConnInterval:90ms, SlaveLatency:6, SupervisionTimeout:30000ms

    [10:55:28.1] SendConnectionUpdateResponse(2, 0)

    [10:55:28.2] UpdateConnParams(1450, 6, 3000)

    [10:55:28.1] ConnectionParameterUpdateResponse sent

    [10:55:29.5] Connection Parameters Updated. ConnInterval:1450ms, SlaveLatency:6, SupervisionTimeout:3000ms

    [10:55:44.6] UpdateConnParams(90, 6, 3000)

    [10:55:45.7] DisconnectFromDevice()

    [10:55:48.3] Lost connection to device. Reason: BTLE_LOCAL_HOST_TERMINATED_CONNECTION

    [10:55:48.4] SERVER: Received packet <HciEvent: eventCode=0x0A> - <HciEvent: eventCode=0x0A>

    [10:55:48.4] SERVER: Received Link Loss

    [10:55:48.4] Disconnected

    I tried even with 10 seconds connection param update and then sending connection param update to 90ms and discconnect before the update. It worked ok

Related