Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ESP32 #2

Open
leopck opened this issue Jan 12, 2022 · 12 comments
Open

Support for ESP32 #2

leopck opened this issue Jan 12, 2022 · 12 comments

Comments

@leopck
Copy link

leopck commented Jan 12, 2022

Great project, I love this project as this has been my pain point for sometime now and there's no solution in the market that is able to resolve this.

Is there any plans to adopt ESP32 with USB HID and Bluetooth as a single package solution for this? This would make it much leaner and smaller in package and if we turn off Wi-Fi, potentially it would be relatively low power as well.

@leopck leopck changed the title Support for ESP32-S2 Support for ESP32 Jan 12, 2022
@Jerther
Copy link

Jerther commented Jan 12, 2022

Hi!

Just my 2 cents. From what I gathered about the ESP32, only the ESP32-S2 supports Bluetooth HID Host. Can the S3 do that?

@leopck
Copy link
Author

leopck commented Jan 13, 2022

Actually ESP32-S2 doesn't come with Bluetooth while it does have WiFi and USB but not the Bluetooth hardware itself. ESP nowadays has many various hardware, so it's easy to get confused. I've provided some hardware table here to give a better idea on their hardware capabilities.

name type wifi bluetooth
ESP32-S3 SoC IEEE 802.11 b/g/n; 2.4 GHz; HT20/40; up to 150 Mbps Bluetooth LE v5.0
ESP32-C3 SoC IEEE 802.11 b/g/n; 2.4 GHz; HT20/40; up to 150 Mbps Bluetooth LE v5.0
ESP32-S2 SoC IEEE 802.11 b/g/n; 2.4 GHz; HT20/40; up to 150 Mbps N/A
ESP32 SoC IEEE 802.11 b/g/n; 2.4 GHz; HT20/40; up to 150 Mbps BR/EDR + Bluetooth LE v4.2
ESP8266EX SoC IEEE 802.11 b/g/n; 2.4 GHz; HT20; up to 75 Mbps N/A

Actually they have over 144 variants of this, for the full list of capabilities, you can see from here: https://products.espressif.com/#/product-selector?language=en&names=

Regarding the ESP32-Sx series supporting USB HID, yes, ESP32-S2 and ESP32-S3 both supports USB HID, there's a good examples and documentation using TinyUSB with ESP32-S2 and ESP32-S3 here: https://github.com/espressif/esp-iot-solution/tree/usb/add_usb_solutions/examples/usb/device/usb_hid_device

From their example:
image

Makes me wonder if they support USB HID composite device (mouse + keyboard) example so that we can support both mouse and keyboard at the same time.

Seeing that this project is more focused on Bluetooth HID proxy, I would say ESP32-S3 would be most suitable with USB OTG with HID examples and Bluetooth capabilities available as well.

@Jerther
Copy link

Jerther commented Jan 13, 2022

Sounds very promising then! Should you or @houkanshan make an all-on-one solution with an ESP32, I'll be happy go get my hand on one and do some tests with my two bluetooth keyboards (Logitech K810 and K380). If mouse support is added, I also have a Logitech M535 Bluetooth mouse.

@leopck
Copy link
Author

leopck commented Jan 14, 2022

@Jerther I just realized that you were also asking about the BT HID host mode which is required to pair the keyboard/mouse into the ESP32, but doesn't seem like there's an existing example on BT HID host mode, but there's an example of using BT HID client mode (to act as a keyboard) https://gist.github.com/manuelbl/66f059effc8a7be148adb1f104666467

@houkanshan
Copy link
Owner

Hi @leopck @Jerther , thanks a lot! ESP32-S3 looks really cool. I just ordered one, when it arrives I'll play with it and see what I can get.

@fkahhaleh
Copy link

Please keep us updated, I am also interested in using the ESP32.
Ordered the missing components for the ARDUINO version to play around with it but for sure would like a miniaturized ESP32 :).

Will keep an eye on this thread and maybe I can help with as well.

@leopck
Copy link
Author

leopck commented Feb 2, 2022

@houkanshan @Jerther I found a code that has implemented a Bluetooth HID Host mode accepting keyboard as input into ESP32. It might be worth a look at their implementation.

bozont/Duke3D@51f1ce4

Demo video: https://www.reddit.com/r/esp32/comments/mtcpug/duke_nukem_3d_with_bluetooth_keyboard_control/?utm_medium=android_app&utm_source=share

@Jerther
Copy link

Jerther commented Apr 15, 2022

@houkanshan Did you get your S3? How is it? I hope you have some good news ;)

@houkanshan
Copy link
Owner

Hey @Jerther , I got it. But unfortunately I was not able to connect it to my Magic Keyboard (Bluetooth 3.0) so I did not continue at that time. I might try again later.

@Jerther
Copy link

Jerther commented Jun 23, 2022

@houkanshan I'd like to contribute but my knowledge and most of all my spare time are fairly limited. I'm still willing to get my hand on a proper ESP32 and do some tests for you, but I would need some directions. I have access to a logitech K810 and a K380.

If you're interrested, could you point me to the exact ESP32 make and model I should look for?

@bam80
Copy link

bam80 commented Jan 29, 2024

Any progress?

If you're interrested, could you point me to the exact ESP32 make and model I should look for?

I think Wemos S3 MINI or C3 Boards are good candidates for this:
https://www.wemos.cc/en/latest/c3/index.html
https://www.wemos.cc/en/latest/s3/s3_mini.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants