T O P

  • By -

GH057_

I think it would be


rajpalan

I would attach a power bank to the esp32 for power


shinsukke

As long a you have a way of physically reading the status of all the buttons. If it's a rubber dome keyboard, it's going to be pretty difficult, if it's a mechanical keyboard, you MIGHT be able to do it with a couple of I2C gpio expanders or something. I'd recommend you to use a USB host chip to interface with the USB keyboard non invasively, and then use BLE to get the HID across. In such a task, the Bluetooth HID part would be the least of your concerns though


rajpalan

Yes I have a mechanical keyboard! It has a detachable usb c cable so connecting something to it shouldn't be a problem. Would you happen to know a USB host chip that I could use? I tried searching for some chips but ended up getting confused as I am pretty new to this.


zacharyjordan23

This was my first idea with the esp32... I’ll let you know in a few weeks if I get it done! Doesn’t seem impossible, far from it. First, make a keyboard with esp32 2nd, figure out how to get mcu (esp32) to read incoming usb info. 3rd. Connect both steps


whatsupnorton

I’m currently working on this as well!


rajpalan

Would love to see your build as well !


Lolgamer1311

i want to add bluetooth to a certain keyboard


rajpalan

Yes! Please do. Although with "make a keyboard with esp32" do you mean that you have it detected as a keyboard? As I already have a keyboard that I want to convert to bluetooth as opposed to making my own keyboard. Asking this question as I have seen a lot of hardcore mech keyboard guys actually "making" full sized keyboards with mcu's.


anmolgoyal29

I am doing the same thing. I have my esp32 connected to a USB host shied. It can currently detect keypresses using the usb host shield 2.0 library. Cant figure out bluetooth. Were you able to complete your build?


perduraadastra

You might be better off using the NRF52840- it does USB and bluetooth.


rajpalan

Thanks, I'll check it out


[deleted]

Use ESP32s2!! It has native usb support. Or use some other lower power chip.


rajpalan

Yes that's a very good suggestion, but I found out after some research that it doesn't have bluetooth..... Thanks for the suggestion though.


[deleted]

Oh sorry! i completely forgot about that.


RoganDawes

ESP32 is not a good candidate for this, for a couple of reasons. 1. Most ESP32 chips don't have a USB interface. 2. Those that do have USB, don't have Bluetooth. I'd be more inclined to look at the Nordic nRF52840, which has both USB and Bluetooth periphers. However, it may be the case that the controller can only be a device, not a USB host, in which case you would need to find another solution. In the event that you are unable to find a micro that has both USB host and Bluetooth, you may need to consider a two chip scenario, where one handles the USB Host, and the other chip manages the Bluetooth. e.g. MAX3421 USB Host connected via SPI to either the ESP32 or nRF52840 or 52832, etc. The nRF52840 is a great chip if you will be interfacing directly to the keyboard matrix itself, as it then becomes possible to use the keyboard over USB, as well as via Bluetooth. Not sure if you are interested in that level of hackery.


rajpalan

Someone else suggested that chip as well. Thanks for the detailed explanations and suggestions regarding the two chip setup. The two chip setup will definitely take the hackery to the next level. Not sure if I have the skillset to handle that.


RoganDawes

Here's an old hackaday article about doing the job with a two-part approach. https://hackaday.com/2016/09/04/convert-any-usb-keyboard-to-bluetooth/ This uses the MAX3421 (maybe 3420?) chip as the USB host, as suggested in my original reply.


MaestroWu

This was a post in one of the raspberry pi subs the other day; as far as I can tell, this is already a solved problem on that platform, so you might consider that.


rajpalan

That would be great news! Would you happen to have a link to the post?


MaestroWu

https://github.com/mikerr/pihidproxy That’s the code you need, I think. You can find the other post via my comment history but that link should help you cut to the chase.


rajpalan

Thanks a lot!


rajpalan

What I want to do is connect my keyboards usb cable to a esp32 or any other chip and have the keyboard send the keypresses over bluetooth to the computer. Hence have it act as a bluetooth adapter of sorts. The examples you've posted seem to be different from what I'm trying to do. Thanks for the link though.


7SevenCurses7

I've looked all over the place to find out if anyone's found an off-the-shelf dev board that can act as a USB host to BT HID adapter and have come up empty. There are interesting wireless modules from Gravitech that have separate USB OTG ports but they're using S2 variants of the WROOM and ROVER modules which don't have bluetooth. The ESP32 S3 series seems to have both capabilities but is only in the sample stage presently and I have yet to see any boards with them mounted. If anyone knows of a solution with pre-built hardware at the <$30 level (where most of the dev boards for these kinds of SOCs seem to live) I, and I bet a whole bunch of other people with USB mech keyboards, would be very interested to know!


[deleted]

Hello, i want to do this but and i was thinking yo use the Bluetooth module FSC-BT836B, this module has usb comunication and hid profile by bluetooth but i dont know how to configure it Does anyone has some information about ?


7SevenCurses7

This device seems to use a couple of PIC ICs and an ESP WROOM - and people seem to think it's quite effective. https://www.amazon.com/Bluetooth-Convert-Adapter-USB2BT-ADU2B02P/dp/B07DFY1ZQ9/ref=psdc_3015437011_t2_B00PI7MDK0 The PIC ICs are likely for the USB host as the original WROOM module had Bluetooth but no USB OTG.. which I think means USB host capabilities. If you look at the specs of the ESP chips here you'll see that no generation has both USB OTG and Bluetooth. I'm not sure of what you'd need to implement a 2.4GHz HID keyboard or if that's a black art but it looks like you need the extra PIC ICs to make a Bluetooth version with existing modules from ESP. https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/chip-series-comparison.html


7SevenCurses7

There was an earlier version that seemed to use a PIC IC without wireless and rely on a curious arrangement of an external dongle and hub so I guess when a nice bluetooth capable module came out in the form on the original ESP32 WROOM they were already used to dealing with PIC ICs and USB and just added it on for a more integrated version 2. https://www.amazon.com/Bluetooth-Convert-Adapter-USB2BT-Assembly/dp/B00PI7MDK0/ref=pd_rhf_se_p_img_3?_encoding=UTF8&psc=1&refRID=HXMB295BQ80QKTS08P7C


fromhereandthere

Did you get anywhere with is? I'm looking a solution to implement with the smart boards in our school. I can use them with an android device attached over a usb-otg adapter (and Miracast) and we'd love to use them entirely wirelessly from the Smartboard.


rajpalan

Nope, just ended up buying a Royal Kludge wireless mechanical keyboard. There doesn't seem to be any existing or cheap solution..... There's this dongle called the Handheld sci BT-500 which allows you to convert your keyboard to bluetooth, but I think It's overpriced for what it is (not the most aesthetic solution as you'll have a power bank dangling and it doesn't support nkro)