geekhack
geekhack Projects => Making Stuff Together! => Topic started by: yangdigi on Mon, 12 October 2015, 00:23:40
-
Many thanks to hasu for https://geekhack.org/index.php?topic=69169
sorry for my poor English.
I have zero experience to hardware or software exploration. But I still decided to build one and share it.
As it was my first USB to USB Keyboard Converter, I get USB Host Shield 2.0 and Arduino Leonardo. This two look bigger but they are simple to combine.
I'm in China and bought them from taobao at a very low price about 80rmb including shipping fee(a little less than $13). 2 days later I got them.
My OS is Window 10. So I install Cygwin first. Then install dfu-programmer in cygwin by simply follow the instruction "Simple install procedure for Unix/Linux/MAC". Last step is downloading avr8-gnu-toolchain-installer-3.5.0.84-win32.any.x86 and unzip it to cygwin folder.
All is ready for building firmware.
$ git clone git://github.com/tmk/tmk_keyboard.git
$ cd tmk_keyboard
$ git submodule init
$ git submodule update
$ cd converter/usb_usb
$ make
No error, I succeed to get a hex file "usb_usb.hex".
I didn't know how to flash hex files in Windows. I installed Arduino IDE but I still didn't know how to do with it. Luckly I got a simple tool “arduloader" and with it I uploaded usb_usb.hex to Arduino Leonardo.
[attachimg=1]
I did some modifications to keymap.c to add my functions keys and layers. After uploading to Arduino Leonardo it works well with usb keyboard. What's more? I have tested it with a wireless keyboard(Fuhlen MK650 full size) and it works as well(but mouse doesn't work).
[attachimg=2]
Now I plan to buy USB Host Shield 2.0 mini and Pro Micro to build a smaller one. I want to use it to build a wireless ergonomic keyboard like ergodox by use one Logitech Unifying receiver and two separated keyboard masters.
Thx for reading.
-
connect a usb hub to usb2usb converter and plug two keyboard to the hub. Only one keyboard can work.
-
connect a usb hub to usb2usb converter and plug two keyboard to the hub. Only one keyboard can work.
This is a known limitation. It just means you have to build more converters!
-
I didn't test with two keyboards at all.
I'm not sure but you may need to two keyboard object instances to support two.
https://github.com/tmk/tmk_keyboard/blob/master/converter/usb_usb/main.cpp#L72