Hey,
I have a few BLE sensor devices based on the CC2650MODA.
Since the sensor information might be considered personal, I've opted to apply a PIN-code based pairing process and did so by setting the permissions of the relevant characteristics to GATT_PERMIT_AUTHEN_READ / GATT_PERMIT_AUTHEN_WRITE.
I've noticed that ever since making this change, my devices are frequently disconnecting (at random intervals) from the central device.
The sensor application is running on a CC2650MODA with an application based on the SimpleBLEPeripheral from version 2.02.01.18.
The central is a Raspberry Pi 3 with its built-in Bluetooth, BlueZ 5.47 and running an application based on the Bluez D-Bus API.
When the application attempts to read/write a characteristic that requires authentication, Bluez automatically starts the pairing process (using a 6-digit PIN code) which seems to work as expected.
The devices are paired and reading/writing characteristics work as expected and notifications do as well but the connection drops from time-to-time.
I've recently tried to use an ESP32 as the central and it too behaves similarly. When pairing isn't needed the connection stays active for very long periods (weeks) but when pairing was applied connections drop after ~80 seconds.
Is there anything else I'm missing and need to change in my BLE application for the secured connection to remain alive?
Thanks in advance,
Assaf