I struggled with this myself and the jgrant comment really helped. I would like to share my decision if this can help anyone.
Note that I need an indication, therefore, x02, not x01.
If you could read the descriptors using bluepy, I would do it, but it does not work (bluepy v 1.0.5). The method in the service class seems to be missing, and the method in the peripheral class gets stuck when I try to use it.
from bluepy import btle class MyDelegate(btle.DefaultDelegate): def __init__(self): btle.DefaultDelegate.__init__(self) def handleNotification(self, cHandle, data): print("A notification was received: %s" %data) p = btle.Peripheral(<MAC ADDRESS>, btle.ADDR_TYPE_RANDOM) p.setDelegate( MyDelegate() )
source share