tinygo-keyboard
tinygo-keyboard copied to clipboard
Want to add BLE support
I would like to add an implementation of the nRF52840 with BLE HID. However, I do not have much knowledge of BLE and do not know how to tackle this issue.
I have tried the following so far
- Run blehid_keyboard example from Arduino and check with WireShark
- Adafruit Bluefruit nRF52 Libraries > Peripheral > blehid_keyboard
- Probably using a different version of this : https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/master/libraries/Bluefruit52Lib/examples/Peripheral/blehid_keyboard/blehid_keyboard.ino
- But maybe it was encrypted and could not be read properly
- https://x.com/sago35tk/status/1700104654464627148?s=20
- Adafruit Bluefruit nRF52 Libraries > Peripheral > blehid_keyboard
i tried to implement it, but i doubt it is possible, as per tinygo bluetooth lib bonding/pairing is still not implemented and i would assume it would be impossible to act as a keyboard on device if you are not paired (at least from my understanding)
i opened meanwhile PR that does implement communication between two halves though, would like some feedback and maybe direction on how to improve it :pray:
Oops, tinygo-org/bluetooth did not support bonding. Now, how should we proceed?
https://github.com/tinygo-org/bluetooth#api-stability
This package will probably remain unstable until the following has been implemented:
Scan filters. For example, to filter on service UUID. Bonding and private addresses. Full support for all features at least two desktop operating systems. Maybe some Bluetooth Classic support, such as A2DP.
Maybe it helps here https://github.com/bgould/tinygo-model-m
Thank you for the information. This is an example using a device that can be connected via SPI to BLE.
BLE HID Keyboard support has started to work a bit in #22. At least it worked on Android. However, pairing did not work well on Windows. We need to investigate this further in the future.