You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class AnyDevice(gatt.Device):
def services_resolved(self):
super().services_resolved()
device_information_service = next(
s for s in self.services
if s.uuid == '0000180a-0000-1000-8000-00805f9b34fb')
firmware_version_characteristic = next(
c for c in device_information_service.characteristics
if c.uuid == '00002a26-0000-1000-8000-00805f9b34fb')
firmware_version_characteristic.read_value()
def characteristic_value_updated(self, characteristic, value):
print("Firmware version:", value.decode("utf-8"))
**def characteristic_enable_notification_failed(self)**
pass
def characteristic_enable_notification_succeeded(self)
pass
import gatt
manager = gatt.DeviceManager(adapter_name='hci0')
class AnyDevice(gatt.Device):
def services_resolved(self):
super().services_resolved()
device = AnyDevice(mac_address='AA:BB:CC:DD:EE:FF', manager=manager)
device.connect()
manager.run()
I don't know how to write to the device. I have been confused for many days. Is there anyone who can help me?
Thank you
The text was updated successfully, but these errors were encountered: