Open legraphista opened 1 year ago
hey @legraphista
I'm also dealing with the same issue; apparently, the permissions (GATTAttributePermissions
) are not used at all on the bluezdbus
backend, used by 'linux'; they're only used on macOS and windows. If you run the sample code you provided on a non-linux machine, it should work as expected. I think the characteristic permissions on the bluezdbus
backend are determined by the properties (GATTCharacteristicProperties
) (maintainers, correct me if I'm wrong).
What worked for me was changing the property GATTCharacteristicProperties.write
to
GATTCharacteristicProperties.authenticated_signed_writes
. In this case, you'll need to bond with the device first to be able to write to the characteristic. Not sure about 'protected reads'...
@jcapona You have saved me endless agony. ❤️
The problem I tested a quick example where I have a GATT service with 1 characteristic, where it has READ/WRITE properties, but does not have read permissions (just to test)
I was able to read/write without any issues to that characteristic.
This test stemmed from trying out
{read,write}_encryption_required
permissions but being able to manipulate the field without pairing the devices.Reproduction
Expected behavior I should not be able to write unless the devices are paired and should not be able to read at all
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context