Using Bluetooth on a desktop computer is now such a seamless process; it’s something built-in and just works. Behind that ubiquity is a protocol layer called HCI, or Host Controller Interface, a set of commands allowing a host computer to talk to a Bluetooth interface. That interface doesn’t have to be special, and [Dakhnod] is here to show us that it can be done with an ESP32 microcontroller through its USB interface.
The linked repository doesn’t tell us which of the ESP32 variants it works with, but since not all of them have a USB peripheral we’re guessing one of the newer variety. It works with Linux computers, and we’re told it should work with Windows too if a HCI driver is present. We might ask ourselves why such a project is necessary given the ubiquity of Bluetooth interfaces, but for us it’s provided the impetus to read up on how it all works.
We can’t find anyone else in our archive who’s made a Bluetooth dongle in this way, but we’ve certainly seen sniffing of HCI commands to reverse engineer a speaker’s communications.
It says USB but it’s UART to USB and newer ESP32s only have BLE capabilities so I think it’s for the original ESP32.
Jenny, it’s right there in the first section:
> It works by running the ESP32 as an HCI controller and exposing its _UART_ interface to the computer.
It uses the USB-to-UART bundled with the ESP32 for the “USB” part. And then implements the serial HCI for the “Bluetooth dongle” part. It’s not your typical plug-and-play USB Bluetooth dongle, as you need to tell the system to start talking to a Bluetooth controller connected to a specific serial port.
But if you need a Bluetooth host for your Raspberry Pi Zero project this thing looks like a perfect match.
It looks like this runs on an original ESP32 board using the main hardware serial port connected through the board’s USB UART chip. It’s really just running the Espressif Bluetooth HCI library and telling it to use the main UART.
bingo!
I have been searching for a reason to do this. However, apart from the toilet, there is no room in my house where there *isn’t* a BT dongle lying somewhere in a drawer. :D
Check on the floor to the left, one may have fallen out of a pocket.
I want the other end of the connection. USB host, BLE HID. Something I can plug a wired keyboard into that will turn it into a Bluetooth one. It must be possible, and I’ve seen similar with a raspberry pi zero doing the job, but I’ve not seen anyone do it with an esp32 before to make it low power enough to be worth making battery-powered.
Anyone know if there is something like the esp-open-sdk for esp32?