I have a nRF51822 and I want to disconnect it from a peripheral for a time. I'm using mbed. I'm trying with ble.disconnect() but it doesn't work.
I have a nRF51822 and I want to disconnect it from a peripheral for a time. I'm using mbed. I'm trying with ble.disconnect() but it doesn't work.
I implemented it and it gives the next error: No instance of overloaded function "Gap::Disconnect" matches the argument list "ble.gap().disconnect(reason);"
What value did you use as "reason" ? You should use LOCAL_HOST_TERMINATED_CONNECTION
.
I used 0x13 (REMOTE_USER_TERMINATED_CONNECTION)
Take a look at this post.