sago35 / tinygo-keyboard

USB HID keyboard firmware for tinygo
MIT License
78 stars 15 forks source link

Want to add BLE support #15

Open sago35 opened 1 year ago

sago35 commented 1 year ago

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.

sago35 commented 1 year ago

I have tried the following so far

F5f70FrboAAIiq-

funkycode commented 1 year ago

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:

sago35 commented 1 year ago

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.

sunxkui commented 9 months ago

Maybe it helps here https://github.com/bgould/tinygo-model-m

sago35 commented 9 months ago

Thank you for the information. This is an example using a device that can be connected via SPI to BLE.

sago35 commented 9 months ago

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.