Live data from Hacker News

Show HN: Bluetooth USB Peripheral Relay – Bridge Bluetooth Devices to USB

github.com

1–10 of 119 posts

Show HN: Bluetooth USB Peripheral Relay – Bridge Bluetooth Devices to USB

#1
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 HN: Bluetooth USB Peripheral Relay – Bridge Bluetooth Devices to USB
github.com

Re: Show HN: Bluetooth USB Peripheral Relay – Bridge Bluetooth Devices to USB

#5
This is brilliant! It just shows what can be done with the raspberry pi and other small computers, and some time! I love seeing stuff like this and the like. BlueSCSI is another example. If you think outside the box, the pi can act as a DPU, to an extent, for machines. It can already act as a KVM… and the PiKVM project has the option of mounting storage to the host, and even networking. Very cool stuff!

Re: Show HN: Bluetooth USB Peripheral Relay – Bridge Bluetooth Devices to USB

#8
Cool project!

Out of curiosity, do you think this concept could be extended to other common bluetooth use cases, such as wireless headphones/speakers, or file transfers over bluetooth to mobile devices, or are the audio/file transfer/etc stacks too far removed from the HID stack for that to cleanly translate?

Re: Show HN: Bluetooth USB Peripheral Relay – Bridge Bluetooth Devices to USB

#10
post #6

I just miss the dual mode HID/HCI bluetooth adapters.

What could those do special?

Exactly the same as what this device is doing, plus more. You would put it in HCI mode, pair whichever Bluetooth devices you wanted to pair with it (keyboards, mice, etc.). Then on the next reboot it would put itself back into HID mode, where all the paired devices would appear as USB HID devices. And therefore your keyboard would be available even during pre-boot, at the BIOS setup program.

Once the operating system finished loading, it would send the adapter the command to switch to HCI mode, and the adapter would then re-appear as a normal bluetooth adapter. Under BlueZ, this operation was done by a command called hid2hci.

I have several (even Apple used to do this), but they stopped being a thing during the 2.0 EDR era (therefore zero support for LE keyboards).

In fact, if you google these keywords ("HID proxy", "HID2HCI", ...) you will find that there are several much older projects to also replicate this using RPi Zeros. I personally would like one which extends the concept to audio devices, serial ports, etc. so that I can use them from OSes without BT stack.

Post reply on HN