←back to thread

233 points bahaaador | 1 comments | | HN request time: 0.212s | source

Hi HN! I built Bluetooth USB Peripheral Relay, a tool that lets Bluetooth devices (like keyboards and mice) connect to USB-only hosts using a Raspberry Pi Zero W.

Why? My friend needed a way to use his Bluetooth mouse and keyboard on a PC with Bluetooth disabled due to policy restrictions. This tool acts as a bridge, relaying Bluetooth input over USB. It also lets you use Bluetooth peripherals with older devices that only support USB input.

Tech: Written in Go, optimized for Raspberry Pi Zero W.

I love HN’s community and often lurk here—I’m hoping this project is useful or at least sparks some interesting discussions. Feedback and contributions are welcome!

Show context
reeddavid ◴[] No.42128036[source]
This solves a huge annoyance I've had: swap a Bluetooth keyboard/mouse between multiple laptops, without manually un0paring / re-pairing. I have a personal "hot desk" at home. I want to be able to plug in any laptop to the large monitor, and have the wireless keyboard/mouse on that desk instantly work. And when I leave the desk with my laptop, I don't want that keyboard/mouse connected anymore.

This has been impossible so far, because even USB bluetooth dongles still require each host computer to pair (and un-pair) with the keyboard/mouse.

I am going to try your solution, and I will plug the USB input into the large monitor on my desk. Then any laptop that plugs into that monitor should have access to the wireless keyboard/mouse. Thank you for creating and sharing this!

replies(6): >>42128135 #>>42128230 #>>42128587 #>>42128744 #>>42129328 #>>42130139 #
1. jauntywundrkind ◴[] No.42129328[source]
Fun & cursed fact, the ArchWiki has a rather long section on dual boot pairing. Pair in Windows or Mac then painstakingly extract various bits of pairing info from the OS and toss it into Linux, so you can dual-boot & keep the pairing. https://wiki.archlinux.org/title/Bluetooth#Dual_boot_pairing

I've always wondered how feasible it would be to copy Bluetooth pairing information. This particular series of hacks seems to rest at least somewhat on it being the same Bluetooth host adapter. (But maybe the host side can spoof, trade IDs with the other device?)

Ideally I'd love to centrally and dynically manage what devices of mine are paired with what system... I think that might be technically feasible, as long as I'm not trying to pair multiple things with a single bt adapter.