I am building an Android app ( BLE central) to connect to a CC2541 peripheral application.
After making the connection, I do a pairing/bonding. This works fine. The smartphone asks for a password the first time.
At the peripheral side, I use the following settings for the GAP bond manager:
uint8 pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
uint8 mitm = TRUE;
uint8 ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
uint8 bonding = TRUE;
My question is: how can I prevent that another app, like a BLE scanner, makes a connection to the peripheral and read or write the characteristics ?
With the above settings, this seems to be possible without giving a password.
I have tried to use GATT_PERMIT_AUTHEN_READ on the characteristics, but then my app asks for a password on every connect. This is not what I want.