Hi,
does the SDK support BT HCI, so that I could connect a regular BT Keyboard in order to capture keypresses?
I'm new to Bluetooth, are there samples available anywhere?
Thanks,
- pit
Pairing a Bluetooth Keyboard?
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: Pairing a Bluetooth Keyboard?
It does support a HCI, but esp-idf does not have the layers to easily interface with a HID-device yet. You can theoretically do this, but you'll have to come up with the code for the layers between it and the HCI yourself.
-
- Posts: 6
- Joined: Mon Feb 13, 2017 1:07 pm
Re: Pairing a Bluetooth Keyboard?
The USB shield for Arduino has code for Bluetooth dongles, and some implementation for layers, including HID keyboard and mouse.
Cutting out the part needed, throw out USB dongle behaviour, change HCI command sending/receiving with the ESP32 functions and callbacks and there you go.
Easy-peasy
Cutting out the part needed, throw out USB dongle behaviour, change HCI command sending/receiving with the ESP32 functions and callbacks and there you go.
Easy-peasy
Re: Pairing a Bluetooth Keyboard?
Thanks for clarifying.
I guess this is going to be a case of `effort > freeTime`.
Plus, the USB Host shield's code is GPL, I prefer not to touch GPLed stuff anymore.
Cheers
- pit
I guess this is going to be a case of `effort > freeTime`.
Plus, the USB Host shield's code is GPL, I prefer not to touch GPLed stuff anymore.
Cheers
- pit
-
- Posts: 6
- Joined: Mon Feb 13, 2017 1:07 pm
Re: Pairing a Bluetooth Keyboard?
Yeah, I've scratched my head because of the GPL, but I intend to make an attempt at porting it anyway, as an intermediate step.
Then based on that, make a proper C only adaptation with my own approach.
That library is nice and stuff, but has lots of "what the hell man?!"
I mean, tons of magic numbers, inconvenient coding style, Wii and other controllers' code in generic Bluetooth code, etc.
Gonna make it proper idf-style. I like it, way more clean and understandable. Also,if for example I do the SPP, and it will be then available in idf, just change to that.
Only question left is freeTime.
Then based on that, make a proper C only adaptation with my own approach.
That library is nice and stuff, but has lots of "what the hell man?!"
I mean, tons of magic numbers, inconvenient coding style, Wii and other controllers' code in generic Bluetooth code, etc.
Gonna make it proper idf-style. I like it, way more clean and understandable. Also,if for example I do the SPP, and it will be then available in idf, just change to that.
Only question left is freeTime.
Re: Pairing a Bluetooth Keyboard?
As I am planning to pair it with a Bluetooth mouse and receive movement data, I'm quiet interested in this! Did you manage to pair the ESP32 with the Bluetooth keyboard and receive key presses?
Who is online
Users browsing this forum: MicroController and 234 guests