Conversation
|
@deric This work looks great :) But I'm still busy on other works... I will try to find my time slots to take a look, hopefully next month. |
|
I gave the @deric 's bleak implementation a try. I used my microbit, and tried to connect scratch microbit extension. The bleak implementation missed a couple of points for microbit below:
I quickly changed the code to support these two, but still I faced a failure at the startNotification step. Bleak reported "BleakDBusError: [org.bluez.Error.NotPermitted] Write not permitted". I'm not sure how to resolve it, and will need time for it. If anyone has advice, it will be appreciated. |
|
I was able to avoid the error "Write not permitted" by changing self.client.write_gatt_char() argument "response" value from "True" to "False". With this, I was able to connect to microbit with Scratch :) However, while I was operating my microbit from scratch, the connection between the microbit and Scratch suddenly got lost. The debug log indicates that the notifications from microbit suddenly stops, then Scratch shutdown the connection (the microbit extension does it when it does not receive notifications from microbit for 4500 ms). Then next challenge is this sudden notification stop. The Bleak debug log with BLEAK_LOGGING=1 does not look providing any clues. It might be required to dig into Bleak, D-bus and bluetoothd to solve this. |
Use bleak for Bluetooth communication, which seems to be maintained (unlike
bluepy).Moreover this PR adds Intelino support.
In order to test this, you can use:
Beta testers welcomed 🙂