Bridge Bluetooth keyboard to wired USB. (i.e. Bluetooth HID Proxy Mode). Works like a Logitech Unifying Receiver but for bluetooth devices.
(Image idea from pihidproxy)
[!NOTE] If you are looking for a project that turns a wired keyboard into a wireless keyboard. This is not the right project. This project does the reverse.
It can be useful in two scenarios:
Previously, I used MikerR's pihidproxy but it's not transparency enough and I don't like the start-up time of RPi. So I made this one with Arduino.
Follow this guide to connect Micro Pro and USB Host Shield. Or tl;dr:
[!NOTE] if you are NOT using an Apple Magic Keyboard, make sure to finish step 5
Tools -> Manage Libraries
, search and install USB Host Shield Library 2.0
, HID-Project
File -> Examples -> USB Host Shield Library 2.0 -> board_qc
Tools -> Serial Monitor
All tests passed.
git clone https://github.com/houkanshan/arduino-bt-hid-proxy.git
KeyboardParser.h
, comment #define APPLE_MAGIC_KBD
(adding //
to the beginning) if you're not using an Apple Magic Keyboard.Tools -> Serial Monitor
The current code will try to re-pair every time after power on. Let's stop it.
BTHID.ino
, comment BTHID bthid(&Btd, PAIR, "0000");
and uncomment BTHID bthid(&Btd);
Documents/Arduino/libraries/USB_Host_Shield_2.0/settings.h
, change #define ENABLE_UHS_DEBUGGING 0
to 1
.
It will display detailed log in serial monitor#define EXTRADEBUG
in *.cpp
file you want to inspect.