geekhack

geekhack Projects => Making Stuff Together! => Topic started by: steinerlein on Mon, 15 January 2018, 07:50:50

Title: QMK BLE support for Bluefruit LE UART?
Post by: steinerlein on Mon, 15 January 2018, 07:50:50
Hey all,

after looking at the bluetooth option in QMK I am unsure whether it is possible to use this:https://www.adafruit.com/product/2479 (https://www.adafruit.com/product/2479) with a pro micro?
I'd be thankful for a comment on this, because I am led to believe that it should be possible. Unfortunately, adding BLUETOOTH_ENABLE=yes to my rules.mk file has not resultet in any output over the serial pins.

Title: Re: QMK BLE support for Bluefruit LE UART?
Post by: ramon0xff on Tue, 16 January 2018, 10:53:10
I might be wrong, but this seems to enable the EZ-Key UART based protocol (a custom binary protocol), while the Bluefruit LE UART uses an AT command based one (e.g. "AT+BLEKEYBOARDCODE=00-32-32....".

There is code in the tmk_core/protocol/lufa/ folder for the Adafruit BLE based protocol, but over SPI instead of UART.
Title: Re: QMK BLE support for Bluefruit LE UART?
Post by: MajorKoos on Tue, 16 January 2018, 11:21:53
I've only managed to get it working with an Adafruit Feather 32u4 Bluefruit LE - https://www.adafruit.com/product/2829
It uses SPI to communicate with the BLE controller.
Title: Re: QMK BLE support for Bluefruit LE UART?
Post by: steinerlein on Wed, 17 January 2018, 04:56:18
I've only managed to get it working with an Adafruit Feather 32u4 Bluefruit LE - https://www.adafruit.com/product/2829
It uses SPI to communicate with the BLE controller.
You're absolutely right. That is what I found out after digging some more, too. I have got it kinda working now, here: https://github.com/qmk/qmk_firmware/issues/2274 (https://github.com/qmk/qmk_firmware/issues/2274) you will find a general summary of what I did. I basically turned the UART BLE module into an SPI one via a firmware change of the nrf module and then hooked it up to a pro micro.
Somehow, I have some problems when I press more than one key at a time. But I guess, that's an issue with qmk...
Title: Re: QMK BLE support for Bluefruit LE UART?
Post by: ramon0xff on Wed, 17 January 2018, 06:13:10
Beware if you enable NKRO. The AT protocol only does "6KRO" at a time.
The AT command:
AT+BLEKEYBOARDCODE=MM-00-K1-K2-K3-K4-K5-K6
where: MModifiers, 00-reserved, and 6 keycodes pressed
and then AT+BLEKEYBOARDCODE=00-00-00...00
to release them.