The Bluetooth USB HID Relay project enables you to connect Bluetooth keyboards and mice to computers without Bluetooth support, using a Raspberry Pi Zero as a bridge. This unique solution works seamlessly across Windows, Mac, and Linux, making it easier to use your favorite devices in a broader range of environments.
The Bluetooth USB HID Relay project is a powerful and innovative solution that enables you to connect Bluetooth peripherals like keyboards and mice to computers that lack Bluetooth capabilities, using a Raspberry Pi Zero or similar OTG-enabled single-board computer. Designed for users who encounter limitations with Bluetooth devices, this relay offers a seamless way to bridge the gap between Bluetooth technology and any device requiring USB input.
Key Features:
- Bluetooth Connection: Effortlessly connects to Bluetooth keyboards and mice.
- Composite USB HID Device: Presents itself as both keyboard and mouse to the host computer, ensuring compatibility with Windows, macOS, and Linux systems.
- Automatic Relay Service: Automatically starts the relay service upon boot for hassle-free functionality.
- Lightweight Operation: Utilizes a diet-friendly Linux distribution, such as DietPi, to optimize performance.
- Setup Scripts Included: Simplified scripts to facilitate easy pairing and configuration of Bluetooth devices.
How It Works:
This project utilizes a Raspberry Pi Zero to act as a conduit, transforming Bluetooth signals from your peripherals into USB inputs for your computer. The following diagram illustrates the setup:
graph TD
B(Keyboard) -- Bluetooth --> A{"HID <br> (Raspberry Pi Zero)"}
C(Mouse) -- Bluetooth --> A
A -- USB--> D(Host Computer)
Development Insights:
The initial motivation behind this project arose from a personal challenge — helping a friend who couldn’t use beloved Bluetooth devices with a Bluetooth-disabled work laptop. This initiative propelled a journey into learning about Linux internals, USB gadgets, and Go programming, culminating in a fun, educational project with real-world applications.
Diagnostic Tools:
To aid users in troubleshooting and testing, this project offers diagnostic tools:
- I/O Doctor: Run
task doctor
to verify connections and monitor Bluetooth input events. - Input Simulation: Use
task simulate
to ensure the USB HID output operates accurately without needing physical devices connected.
Compatibility and Performance:
The project has been tested on various platforms, including DietPi, Windows 10, and macOS, achieving consistent performance without latency or input lags.
Community Engagement:
We encourage feedback! If you encounter issues, have suggestions, or wish to contribute, please open an issue on GitHub. Community involvement significantly enhances the project's reliability and functionality.
For those wanting to delve deeper into USB gadgets and Raspberry Pi applications, this project serves as a robust learning resource, providing insights into hardware interfacing and systemd service management.
Explore the possibilities of using your favorite Bluetooth peripherals with any USB-enabled system through this clever solution! Start your journey with the Bluetooth USB HID Relay and transform your computing experience.