I'm using https://github.com/edrosten/libblepp for communicating with BLE devices from C++.
Until now I've successfully connected to a few devices but now there is a device which fails when I try to read some GATT characteristic with this error:
Attribute requires authentication before read/write
When I try with gatttool, it is working:
# gatttool -t random -b MAC --char-read --handle=0x0001
Characteristic value/descriptor: a b c d
I've then found this question: Attribute requires authentication before read/write which holds the answer (at least I think).
gatttool by default uses 'low' as security level based on the help:
# gatttool --help-all
...
-l, --sec-level=[low | medium | high] Set security level. Default: low
(How) is it possible to change security level with libblepp? (Is this security level setting just some basic binary command flag, or something more complex?)