This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LL Response Timeout

Other Parts Discussed in Thread: MSP430BT5190, CC2564

Hi,

We are currently developing a product using the MSP430BT5190 MCU and the CC2564 Bluetooth controller which we currently use only for BLE with the bluetopia stack.

We experience a strange behaviour in a very specific case. When using our device with most of Samsung smartphones, we connect the first time correctly and remain connected with no trouble. If we get away from our device with the smartphone in order to trigger a disconnection, both devices get a disconnection event (0x05) from their controller with for disconnection reason 0x08 = Connection Supervision Timeout which is pretty normal. On a disconnection, our device starts advertising again and when we come back closer, the smartphone scans and connects to the device.

Exactly 46s later, the smartphone displays a disconnection without doing anything, both devices being on a table next to each other. On HCI traces, we noticed that on the smartphone side was experienced again a Connection Supervision Timeout (0x08), but on the device, the cause is different and is 0x22 = LL Response Timeout. Those error codes, explains the 46 seconds, as our connection supervision timeout is 6s and Bluetooth Core Spec v4.2, Vol 6, Part B, Section 5.2 says the following, explaining the 40 seconds remaining:

---------------------------------------------------------------------------------------------------------------

This section specifies procedure timeout rules that shall be applied to all the
Link Layer control procedures specified in Section 5.1, except for the
Connection Update and Channel Map Update procedures for which there are
no timeout rules.
To be able to detect a non-responsive Link Layer Control Procedure, both the
master and the slave shall use a procedure response timeout timer, TPRT.
Upon the initiation of a procedure, the procedure response timeout timer shall
be reset and started.
Each LL Control PDU that is queued for transmission resets the procedure
response timeout timer.
When the procedure completes, the procedure response timeout timer shall be
stopped.
If the procedure response timeout timer reaches 40 seconds, the connection is
considered lost. The Link Layer exits the Connection State and shall transition
to the Standby State. The Host shall be notified of the loss of connection.

--------------------------------------------------------------------------------------------------------------------------

This brings me to my question, why do we encounter such a case? I have been checking all the HCI traces and all the messages seem to be somehow acknowledged. Moreover, when doing this operation with another smartphone which uses the TI WG7311-0AA chipset, this does not occur.

Another issue I have noticed in the HCI traces which does not seem related is that after receiving a LE Connection complete event, the stack tries to send Set Advertising Enable with 0 as argument, which should not be done and receives a Command Complete Event with an error argument 0x0C = Command Disallowed.

Thank you for your support.

  • Hi,

    Please share the hci traces that you're referring to. Please also share the logger logs.

    Regards,
    Gigi Joseph.
  • Hi Joseph,

    Our traces being confidential, is there a way I can contact you privately?
    My managers are currently checking that our NDA with TI is still valid and I will have the answer on Monday.

    Best regards,
    Matthieu Tardivon
  • Hi Joseph,

    After some exchanges, we have been able to renew our NDA with TI.
    Could you send me your professional email so that I can send you the different traces and appropriate details?

    Best regards,
    Matthieu Tardivon
  • Hi,

    I have been given the contact of Mr Vihang Parmar and sent him the traces around 3 weeks ago.
    As I did not get any feedback since then, I was wondering if my email arrived to destination. Could you tell me if Mr Parmar did receive my email? If yes, did he have the opportunity to take a look at it?

    I remain at your disposal for any further information you might need for your analysis.
    Thank you in advance for your support.

    Best regards,
    Matthieu Tardivon
  • Hi,

    After doing some new tests, I might have found the origin of the issue. When sniffing, I noticed that the 46s (40s LL Response Timeout + 6s supervision timeout) connection timeout timer was started at connection parameters update procedure. This is independent from getting away to trigger a disconnection, actually the device disconnects after 46s even after first connection.

    When I removed the call to the function GAP_LE_Connection_Parameter_Update_Request and kept the connection parameters imposed by the master, the connection remained active.

    Therefore, I dived into the Bluetooth Core Spec and found the following in Vol 3, Part C, Section 9.3.12.2:

    "After the Peripheral device has no further pending actions to perform and the
    Central device has not initiated any other actions within
    TGAP(conn_pause_central), then the Peripheral device may perform a
    Connection Parameter Update procedure (see Section 9.3.9). The Peripheral
    device should not perform a Connection Parameter Update procedure within
    TGAP(conn_pause_peripheral) after establishing a connection."


    As the call to GAP_LE_Connection_Parameter_Update_Request was made inside the GattConnectionEventCallback on receiving the event etGATT_Connection_Device_Connection, the request was thus performed only a few tens of milliseconds after the connection. I guess Samsung devices are less tolerant than others on this point, but this is a wild guess...

    Appendix A of the same chapter mentions a TGAP(conn_pause_peripheral) recommended value of 5s. When delaying the connection parameters update procedure of 10s after a connection, it seems to work.

    My questions are the following:

    - Do you think my analysis is correct?

    - What are the TGAP(conn_pause_central) & TGAP(conn_pause_peripheral) used in Bluetopia? (Could not find it)

    - Could you provide the typical use case of the function GAP_LE_Connection_Parameter_Update_Request for a slave device? (This is absent either in documentation or examples)


    Best regards,

    Matthieu Tardivon

  • Hi TI folks,

    Please give me a feedback on my latest analysis. I am kind of stuck here...

    Best regards,
    Matthieu Tardivon
  • Matthieu,

    let me check to solve this. Come back asap.

    Regards,
    Bernd
  • Hello Bernd,

    Either me or Vihang will go over the FW logs and get back to you in the next couple of days.
    I'm not sure if i was on the original email.

    So i will appreciate the following:

    1. Please resend the FW log files so we can go over them
    2. If you have a BLE air sniffer capture please send it.

    Thanks,
    Chen
  • Dear Bernd & Chen,

    I have sent all the data to Bernd to his professional email. I am sorry Chen, I did not have your email, perhaps Bernd can forward it to you.

    Best regards,
    Matthieu Tardivon
  • Dear Chen,

    As I got an automatic reply that Bernd was on vacation, I knod of guessed your email and forwarded it to you. I hope you received it.

    Best regards,
    Matthieu Tardivon