Skip to content

bleak.exc.BleakError: Multiple Characteristics with this UUID, refer to your desired characteristic by the handle attribute instead. #659

Answered by dlech
Andrei-Iosifescu123 asked this question in Q&A
Discussion options

You must be logged in to vote

Maybe something like this?

async with BleakClient(device) as client:
    my_service, = (s for s in client.get_services() if s.uuid == MY_SERVICE_UUID)
    my_char = my service.get_characteristic(MY_CHAR_UUID)
    client.write_gatt_char(my_char, MY_VALUE)
    ...

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Andrei-Iosifescu123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Request for help on how to use Bleak (consider starting a discussion instead of opening an issue)
2 participants
Converted from issue

This discussion was converted from issue #624 on October 06, 2021 22:37.