embeddedgo / nrf5

Support for Nordic nRF5 microcontrollers with builtin radio (Bluetooth 5, Thread, Zigbee, 802.15.4, ANT)
BSD 3-Clause "New" or "Revised" License
16 stars 0 forks source link

Ble/USB HID Keyboard functionality #1

Open geoah opened 4 years ago

geoah commented 4 years ago

Hey there,

First of all, embeddedgo looks amazing, thank you for all your hard work.

I've been playing around with using the nrf52840 for building custom mechanical keyboards. There are couple of options for the software but they are all written c/cpp which for a person that is writing go day in day out is an absolute nightmare.

When I bumped into embeddedgo and the nrf5 repo, I was really excited. I easily got the ble_blinky example working on a pca10059 dongle which worked like a charm. Managed to hook up some more switches and leds and based on the buttons and leds packages was able to get them to work.

Unfortunately that's the extent of my achievements. Spent some time looking into the nordic docs and the nrf5 package, but I wasn't even able to advertise the HID Keyboard appearance. Let alone actually figuring out how to get the device to work as a HID keyboard.

Have you ever by any chance looked at what it would the bare minimum be to get hid keyboard support on top of embeddedgo/nrf51? If not, do you happen to have any pointers on what the best places to start looking on how this would be done? Would that be the nordic's SDK libs for ble hid support?

Thank you very much in advance. ~ geoah

embeddedgo commented 4 years ago

Nice to hear that you were able to follow the tutorial and play with the code.

If you have any thoughts or comments to the tutorial or simply you would like to describe the subject from a slightly different angle, any write up or link to the blog post will be welcome. We've to little success stories from people who tried Embedded Go.

Regarding nRF52 and BLE the Nordic SDK sources are definitely the only available documentation.

The Nordic's C code is horrible to read, I known, but I have no any other advice to you.

I've never worked with BLE HID profile. My advice is to start from some simple and working C example and try to translate it to Go.

Be aware that for now the support for BLE in Embedded Go is minimal (only few things in nrf5/softdevice/sdutil). You talk almost directly to the SoftDevice. Nordic SDK provides high level interface which it's difficult to break through to see how it talks to the SoftDevice (all things are forcibly event driven). I think its doable but requires much work.

I can try to help you, but you need to start this work. Please select some simple C HID example and send a link to me. Preferable something that exposes the onboard dongle button as one key HID keyboard.

Feel free to ask any further questions.

On Fri, 12 Jun 2020 15:45:28 -0700 George Antoniadis notifications@github.com wrote:

Hey there,

First of all, embeddedgo looks amazing, thank you for all your hard work.

I've been playing around with using the nrf52840 for building custom mechanical keyboards. There are couple of options for the software but they are all written c/cpp which for a person that is writing go day in day out is an absolute nightmare.

When I bumped into embeddedgo and the nrf5 repo, I was really excited. I easily got the ble_blinky example working on a pca10059 dongle which worked like a charm. Managed to hook up some more switches and leds and based on the buttons and leds packages was able to get them to work.

Unfortunately that's the extent of my achievements. Spent some time looking into the nordic docs and the nrf5 package, but I wasn't even able to advertise the HID Keyboard appearance. Let alone actually figuring out how to get the device to work as a HID keyboard.

Have you ever by any chance looked at what it would the bare minimum be to get hid keyboard support on top of embeddedgo/nrf51? If not, do you happen to have any pointers on what the best places to start looking on how this would be done? Would that be the nordic's SDK libs for ble hid support?

Thank you very much in advance. ~ geoah