Does nrf5 ble support hid?
There is no ready to use BLE package in Emgo.
Is it easy to add? And I can help if you could give me a bit of guidance.
No, it isn't easy... at least for me.
The problem isn't higher layers but lowest layer: BLE controller.
You need to read:
-
Bluetooth Core Specification (at least 4.0): https://www.bluetooth.com/specifications/bluetooth-core-specification/archived-specifications
-
nRF51822 (preferably also nRF52832) Reference Manual: http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.1.pdf
The problem insist in strict timing. You have to design a state machine that properly handles all cases and you need to write it cleanly in Go. You need a deep understanding of the protocol and hardware. Debuging is difficult, especially if your only tool is Android phone with its HCI logging.
There are open source implementations in: MyNewt and Zephyr. The last one has some support from Nordic: https://devzone.nordicsemi.com/b/blog/posts/nrf5x-support-within-the-zephyr-project-rtos
I didn't studied their code but it's probably worth doing.
There is my proof of concept code in nrf5/blec and an example that almost works. But everything must be be thought over and rewritten.