I am using GAPRole_TerminateConnection() to terminate the BLE connection in my code. But the BLE connection is not disconnecting. I am testing it with a phone and still I can write and read characteristics after calling that API.
I debugged the code and found that the GAPRole_TerminateConnection() returning a value of 2 which is an INVALID_PARAMETER error I think.
I tried the other option HCI_EXT_DisconnectImmedCmd() and this also didnt work.
Can any one figure out what is wrong?