Hello Nordic experts,
I am working on NRF52840 DK with nRF5_SDK_15.2.0_9412b96 and facing an issue with sd_ble_gap_conn_param_update. I connect to a paired peripheral by resolving address/IRK and start the discovery of a service. If the service's not available, I drop the connection. At this very moment, I receive the following error caused by sd_ble_gap_conn_param_update:
<error> app: ERROR 8 [NRF_ERROR_INVALID_STATE] at C:\xxx\main.c:709 PC at: 0x00028889
<error> app: End of error report
I found that some other people have reported the same problem for old SKDs and their solution was to check if the connection handle is valid. However, since sd_ble_gap_conn_param_update belongs to the library in SDK 15.2.0, that solution won't work for me. Notice that I check the connection handle right before calling sd_ble_gap_conn_param_update but I guess that the connection is dropped sometime after I call this API.
I then removed APP_ERROR_CHECK(err_code) called after sd_ble_gap_conn_param_update to let the code execute. I also received NRF_ERROR_BUSY.
I appreciate your help to find a solution for my case.
Thanks