I am using nRF52840 with the compontents described in the title.
I have secure connection with JUST_WORKS pairing. The connection succeeds, and bonding also works. With most phones we've tried all works well and the connection remains active for as long as is desired. Earlier we had a problem with some devices disconnecting randomly with the reason BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT, but updating softdevice from 6.1.0 to 6.1.1 seemed to fix that.
Now the connection works with most phones, but with Nokia 5 manufactured by HMD Global the mobile phone disconnects after appr. 60 seconds with the reason BLE_HCI_DIFFERENT_TRANSACTION_COLLISION. This happens regardless of the software used to initiate the connection.
Do you have any insight on how this could be fixed?
It is difficult to be sure without a sniffer log, but based on the timing it may be because the phone sends two consecutive LL_PING_REQ without waiting for PING_RSP, this violate BLE spec and cause LL procedure collision, and disconnect.
You can find a workaround highlighted below by calling sd_ble_opt_set(BLE_GAP_OPT_AUTH_PAYLOAD_TIMEOUT, &opt); to trigger a LL_PING_REQ from the peripheral side instead.
this seems to fix the problem, thank you so much!