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

About the "BLE_GAP_EVT_DISCONNECTED" event nRF52832

Hello.

After pairing with a tablet or computer, if you leave it for a few seconds without operating it

I wrote out the cause of the disconnection by debugging.

"Error 34 (0x22): GATT CONN LMP TIMEOUT"

What are the possible causes and countermeasures?

Parents Reply
  • Einar san
    
    We become indebted to.
    
    I recognized that the table model is the model number of the tablet, so
    I will answer as follows.
    
    Model: PC-TE507 JAW
    
    Also, since it was reproduced on a Windows 10 notebook PC,
    I will send you the log.
    No3754: Pairing
    No4646: Disconnect

    Disconnect_Win10.pcapng


    We have another question.
    nRF Connect v3.6.1 --I am writing software using Programmer.
    Is it possible to get and display "CRC" or "checksum"?
    I would like to use it at the time of production to check whether the software can be written normally.

    I'm sorry, but please tell me.
Children
  • Hi,

    The sniffer trace with the Windows 10 master shows that the computer disconnects two times first at #3802, then at #4546. In both cases the disconnect reason is 0x13 (remote user terminated connection), which in itself is not an error. Did you get an error on the nRF side in this case as well?

    Can you share your code which causes this behavior? Is it possible to reproduce this on a DK?

    Regarding programming there is no support for calculating and displaying a checksum of the flash of using the programmer app in the programmer app. The closest you get with Nordic tools is the --verify option of nrfjprog, where you must supply a hex file and the flash of the target is compared with the hex file.

    Einar

  • Einar san

    We become indebted to.
    Thank you for your contact.

    For 0x13 disconnection
    I understand that it is not an error in itself.

    If you check it again,
    BLE_GAP_EVT_DISCONNECTED occurred in Reason22.
    This phenomenon is caused by connecting another company's application on our board and tablet.
    It is occurring. (Not reproduced in DK)

    We will send you the following, so please give us your opinion.

    1. 1. BLEControl.c source code
    (Excerpt so as not to include product information)
    2. 2. BLEControl_log.txt Soft log (disconnection occurred at L53)
    3. 3. Disconnect.pcapng Wireshark packet capture (disconnection occurred in No3592)

    When the source code L50 is enabled, the above phenomenon does not occur.

    Thank you fDisconnect_log.zipor your cooperation.

  • Hi,

    Thank for these files. They were much more informative. Here I see from the sniffer trace (Disconnect.pcapng) that the nRF disconnects with reason BLE_HCI_CONN_INTERVAL_UNACCEPTABLE (0x3B) in #1977, #2783 and #3592.

    You write that you do not see this if you include line 50, which delays the next connection parameter a very long time (24 hours, which I assume is longer than the time you test). Therefore my first assumption was that the conn_params module disconnected, but that is not the case as you have set disconnect_on_fail = false.

    The actual reason this fails is that you explicitly disconnect on the BLE_CONN_PARAMS_EVT_FAILED event in your ConnectParamsEventHandler() function, with the reason BLE_HCI_CONN_INTERVAL_UNACCEPTABLE. So the nRF is doing exactly as you would expect with this code. If you do not want to disconnect even when you do not get the connection parameters you request, you should remove line 670 - 678 in your BLEControl.c.

    Einar

  • We become indebted to.


    Let me ask you an additional question about advertise.

    ・ Question

     After starting the advertisement and passing "APP_ADV_DURATION (180s)",

     Advertise will stop and sleep.

    If you want to continue advertising without going to sleep

    Should I resume advertising when the BLE_ADV_EVT_IDLE event occurs?

    In that case, the function to call is


    "Ble_advertising_start"

    "Ble_advertising_restart_without_whitelist"

    Which one?

    We apologize for the inconvenience, but thank you.

Related