which ESP32 can read from BT HID keyboard (e.g., scanf(), gets(), std::cin ) ?

dsyleixa
Posts: 12
Joined: Mon May 20, 2019 8:33 pm

which ESP32 can read from BT HID keyboard (e.g., scanf(), gets(), std::cin ) ?

Postby dsyleixa » Sun Nov 12, 2023 8:38 pm

is there a ESP32 version which can connect to a BT HID keyboard and then read user input via stdin (e.g., scanf(), gets(), std::cin ) ?

lbernstone
Posts: 793
Joined: Mon Jul 22, 2019 3:20 pm

Re: which ESP32 can read from BT HID keyboard (e.g., scanf(), gets(), std::cin ) ?

Postby lbernstone » Sun Nov 12, 2023 9:02 pm

https://products.espressif.com

ESP32 has BT + BLE
ESP32-S2 has no bluetooth
All other variants are BLE only

dsyleixa
Posts: 12
Joined: Mon May 20, 2019 8:33 pm

Re: which ESP32 can read from BT HID keyboard (e.g., scanf(), gets(), std::cin ) ?

Postby dsyleixa » Sun Nov 12, 2023 9:06 pm

what means BLE?
now which one can detect and connect to a BT HID keyboard and then read input?
which BT (or whatever) keyboards are supported?
Where can keyboard ino examples be found for Arduino IDE?

dsyleixa
Posts: 12
Joined: Mon May 20, 2019 8:33 pm

Re: which ESP32 can read from BT HID keyboard (e.g., scanf(), gets(), std::cin ) ?

Postby dsyleixa » Mon Nov 13, 2023 11:02 am

no ideas?
or HID keyboards not possible?

ESP_Sprite
Posts: 9579
Joined: Thu Nov 26, 2015 4:08 am

Re: which ESP32 can read from BT HID keyboard (e.g., scanf(), gets(), std::cin ) ?

Postby ESP_Sprite » Mon Nov 13, 2023 12:48 pm

It's certainly possible, e.g. https://github.com/Spritetm/esp32c3-doo ... nimble-hid is an ESP-IDF project that talks to a BTLE keyboard (or other HID device). It uses an event interface, but you could code it up to a newlib file descriptor to use sscanf etc on it. I don't think anyone did that, however, and I'm not sure if there's an Arduino equivalent either.

dsyleixa
Posts: 12
Joined: Mon May 20, 2019 8:33 pm

Re: which ESP32 can read from BT HID keyboard (e.g., scanf(), gets(), std::cin ) ?

Postby dsyleixa » Mon Nov 13, 2023 1:19 pm

thank you, but I do not understand.
1st, there are no demo pictures and no explanations in your link,
2nd, I need Arduino IDE/API for it, no IDF, and
3rd, I cannot see how this linked lib would work with exactly which BT HID keyboard types (all types? e.g. this one?
https://www.amazon.de/Rii-Bluetooth-Mul ... 3%95%C3%91,
beginning with stand-allone BT-pairing after board-boot/startup.

OTOH, for general programming usage I would need it for standard C or C++ libs (stdio.h/cstdio, std::cin) to work out of the box.

ESP_Sprite
Posts: 9579
Joined: Thu Nov 26, 2015 4:08 am

Re: which ESP32 can read from BT HID keyboard (e.g., scanf(), gets(), std::cin ) ?

Postby ESP_Sprite » Tue Nov 14, 2023 3:33 am

Okay, let me be clearer: it certainly is *possible* to do what you need, and the parts that a competent programmer can use to implement this are there, but if you need an out-of-the-box solution that does exactly what you want, you're out of luck as to my knowledge that does not exist.

dsyleixa
Posts: 12
Joined: Mon May 20, 2019 8:33 pm

Re: which ESP32 can read from BT HID keyboard (e.g., scanf(), gets(), std::cin ) ?

Postby dsyleixa » Tue Nov 14, 2023 8:30 am

Thank you for your reply.
I actually had expected the ESP32-Arduino API to have more such features meanwhile, tbh...

Who is online

Users browsing this forum: Baidu [Spider], ESP_Sprite and 179 guests