Closed theGENreel closed 3 years ago
I do not think Bleak will support Windows 11 until it has been released for public use. I appreciate you raising the issue and making us aware of it, but solution to this will have to wait.
That said, you are free to delve deeper into the changes into the Bluetooth API of Windows 11 and make pull requests to fix the inevitably approaching problems. That would be much appreciated, since I am in no position to install the W11 preview on any of my systems!
I don't think this has anything to do with Win 11. It should be calling write_value_with_result_async()
to return a GattWriteResult
instead of write_value_async()
which returns GattStatus
(which is enum with base type of int).
@theGENreel can you please test #616?
@hbldh @dlech Thanks for answers. Checked at #616, write_gatt_descriptor works.
Great, thanks for testing.
Ah, I see. I should stop making comments on issues without checking the code first...
Good work!
Description
I'm trying to control my Mi Band 4. It seems that other people do not have this error. Therefore, I think that the problem is in the changes in the API. Perhaps the API is now returning int.
What I Did
I have a function that writes data to descriptor.
And here write_gatt_descriptor throws AttributeError.
I have verified that descriptor.obj.write_value_async in code below returns 0 (backends/winrt/client.py on 686 line).
And if you remove ".status" in the code below, the error goes away (line 690).
It looks like there are some changes in the Windows 11 API, so the lib is not working now.