'Bleak read arduino data?

I was trying to implement bleak with arduino. The write command works fine but in the read command Im not able to ``` try: async with bleak.BleakClient(device) as client: paired = await client.pair(protection_level=2) print(f"Paired: {paired}")
COLOR_CHARACTERISTIC_R="0000dfb2-0000-1000-8000-00805f9b34fb"
value = bytes(await client.read_gatt_char(COLOR_CHARACTERISTIC_R)) print(value)

                    except bleak.exc.BleakError as e:
                        self.line(f"  error {e}")
                        asyncio.sleep(10)
                     ```

The value only returns bytes like ox01 or 0x02 as per the eight digit of the UUID. Anything Im doing wrong? Checked from the arduino side everything is working there.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source