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
sudo gatttool -t random -b D2:C5:26:66:6C:7D --char-write-req -a 0x2f -n 03170101
So far in python I have, I am struggling with the handle and value, I know 0x2f=47, so I passed that (would rather pass 0x2f, no big deal) but I am stumped for the value setting. It doesn't want to accept a string
YOUR_DEVICE_ADDRESS = "D2:C5:26:66:6C:7D"
# Many devices, e.g. Fitbit, use random addressing - this is required to
# connect.
ADDRESS_TYPE = pygatt.BLEAddressType.random
adapter = pygatt.GATTToolBackend()
adapter.start()
device = adapter.connect(YOUR_DEVICE_ADDRESS, address_type=ADDRESS_TYPE)
device.char_write_handle(handle=47, value = '03170101')
I also tried with device.char_write(characteristic, bytearray([0x2f, 03170101]), wait_for_response=True)
But I just can't seem to pass that value...
The text was updated successfully, but these errors were encountered:
@karl0ss unfortunately I don't think I ever got around this. I think I ended up just popping the command in a shell script and then running that script from python... This is what I did
What would be the pygatt equivalent to running:
So far in python I have, I am struggling with the handle and value, I know 0x2f=47, so I passed that (would rather pass 0x2f, no big deal) but I am stumped for the value setting. It doesn't want to accept a string
I also tried with
device.char_write(characteristic, bytearray([0x2f, 03170101]), wait_for_response=True)
But I just can't seem to pass that value...
The text was updated successfully, but these errors were encountered: