Skip to content(if available)orjump to list(if available)

Show HN: I wrote a small lib to turn a USB gamepad into a Bluetooth one

Show HN: I wrote a small lib to turn a USB gamepad into a Bluetooth one

28 comments

·December 17, 2025

I had two old USB gamepads lying around that I wanted to use, but my computer is too far from the couch, so I wrote a little ESP32-S3 firmware that turns USB gamepads into Bluetooth ones.

You connect your gamepad to the ESP32-S3 with an OTG cable, power the ESP32 with either 5V somehow or a powered USB hub, and now you can pair the controller via Bluetooth to your PC!

gkhartman

I had a quick thought to do something like this a while back, but never got around to the experimental phase. I ended up buying a new controller instead (whilst grumbling about making an adapter). Thanks for making it happen, and being kind enough to open source it. Looking forward to giving it a try later.

stavros

Yeah, I was between buying a new controller or making this too, but I figure it's a perfectly fine controller and I had the hardware lying around.

It doesn't work perfectly, as there are some HID intricacies that need to be remapped, and I don't have a second controller to see whether the intricacies are general or just specific to mine, but let me know if it works for you!

p2detar

Awesome project. With the current price of DRAM, I've been looking at the possibility to do some side projects with ESP32 as opposed to RPi. As a complete newbie, could you help me by recommending where I could start from, i.e., Software, tools, docs? Thanks.

stavros

I use the Arduino framework and PlatformIO to make the flashing/dependency management part easier. Other than that, the Arduino docs are great, and LLMs can help you with learning anything specific, so it's really a great time to get started!

Tade0

I like how readable the code is. I don't write anything in C++ nowadays, but it's clear enough for me to follow.

stavros

Ah, I can't really take credit for that, it was mostly multiple LLMs.

latexr

So did you really write this, as claimed in the title, or did you vibe code it? If the latter, how much of the code did you review? How much of it do you understand and could rewrite by hand if necessary? How much of it are you confident you can find and fix bugs and exploits in?

schappim

This is a clever and practical hack!

Love the decoupled arch / making it easy to tweak for different controllers.

Nice work!

stavros

Thanks! I liked how the hardware is really easy to make, I just soldered a USB port to an ESP32-S3 and that was it!

atmanactive

... and the latency is?

stavros

I didn't notice any higher latency than with my Xbox one controller!

atmanactive

I guess the easiest way to measure this would be to run some gamepad test program on the target device, and then to record a video from your phone close to the gamepad but still with the screen visible. Then flick a button hard with your finger so that the gamepad button makes a click sound. Then load the video into a video editing software, zoom-in, and measure the number of video frames between the click sound and the reaction on the screen.

stavros

I agree this is the way to do it, but for an old cheapo gamepad, "it feels fine" was good enough for me at this stage.