Hasu USB-USB Converter

User avatar
Hypersphere

12 Jun 2016, 23:24

As many here already know, Hasu has developed converters to enable various classic keyboards to be used with USB. These include Apple ADB, Apple M0110, IBM 4704, Next, Sun, IBM XT, and others.

More recently, he has made a USB to USB converter that is programmable, so that virtually any USB keyboard can be programmed to any layout. It includes up to 7 layers and up to 32 Fn keys. I have found this converter so extraordinary and helpful that I decided to post my impressions of it.
Hasu_USB-USB_Converter.jpg
Hasu_USB-USB_Converter.jpg (59.35 KiB) Viewed 28394 times
Hasu USB-USB Converter; image from Hasu. https://geekhack.org/index.php?topic=72052.0

Once you program the converter to your liking, you can plug any USB keyboard into it to get the layout you have programmed into the converter. Moreover, if you decide to change your layout, you can reprogram the converter. You do this by flashing the firmware, so you could save collections of hex files with various layouts. This would save you the bother of re-entering the key assignments.

Hasu provides instructions for building the converter yourself from a Circuit@Home USB Host Shield and Arduino Leonardo chip, or, for a mere $55, you can buy a fully assembled converter directly from Hasu.

There is a really nice review of the converter on GH:

https://geekhack.org/index.php?topic=74708.0

Here are links to Hasu's thread on the USB-USB and other converters:

https://geekhack.org/index.php?topic=69169.0

workshop-f7/tmk-keyboard-firmware-colle ... 0converter

Here is the link to the TMK firmware:

https://github.com/tmk/tmk_keyboard/tre ... er/usb_usb

And here is the link to the online configurator:

http://www.tmk-kbd.com/tmk_keyboard/editor/usb_usb/

Looking at the configurator, you can see how generic and all-encompassing it is. You could even program a 122-key IBM keyboard as long as it had first been converted to USB (See "Soarer's Converter"). The generic layout also includes European ISO and Japanese layouts. You can simply ignore the keys that aren't on your keyboard, or you can label them with the "NO" code.

There are a few limitations. For example, the converter can only work with keys that send scan codes, so hardwired Fn and Pn keys, like on the Pok3r, could not themselves be remapped in this way. However, any key with a scan code could be assigned a role as Fn (and you could have up to 32 such keys if you wanted to do so). In addition, the converter cannot do NKRO, but it can handle 6KRO, which is more than enough for me.

Hasu is also extremely helpful, answering questions posted on the forums in a timely fashion.

I have programmed the converter for a HHKB-like layout. Thus far, I have found that it works on the following keyboards:

+ CM QFS TKL

+ KBP V60MTS-C

+ IBM SSK with Orihalcon's SDL to USB converter cable

Moreover, it works with an Iogear DVI 4-port KVM and powered USB Hub.

It also works on Windows 10 and Linux (Linux Mint 17.3 64-bit Xfce).

Finally, it works with Synergy software between Windows and Linux computers.

At present, I am using the converter in my home office. I have ordered a second one for work, and I am considering a third for travel.

Because I switch keyboards frequently, one concern I have is how well the converter will withstand repeated connections and disconnections. It looks fairly durable, but I am considering putting it into an enclosure with strain-relief cables to panel-mount connectors. Alternatively, KHAANNN suggested simply using some coiled USB cables and connecting the keyboard to the coiled cable instead of directly to the converter. It might be nice to encapsulate it in a USB cable, such as Orihalcon has done with a variety of converters.

User avatar
t!ng
Awake Sheep

13 Jun 2016, 01:22

This is so... brilliant...

User avatar
Hypersphere

15 Jun 2016, 18:18

t!ng wrote: This is so... brilliant...
Yes, I quite agree that Hasu is a genius. He and Soarer have made it possible for the rest of us to use vintage keyboards with modern computers and to remap them to our liking.

I have been doing some additional tests with the Hasu USB-USB converter, and I find that it works with a KVM and two tandem hubs. I added the second 4-port hub that has a switch for each port. This way, I can keep several keyboards connected and switch among them. Alternatively, I can keep different types of USB cables attached, such as a mini-USB for most of my keyboards and a micro-USB for a few of them, such as my Novatouch. In addition, the extra hub provides another level of mechanical protection for the converter.

Comp1, Comp2, Comp3 --- KVM --- pHub --- USB-USB-C --- npsHub --- Kbd1, Kb2, Kb3, Kb4

Comp1 = Computer1, etc.
KVM = 4-port KVM switch
pHub = Powered USB 2.0 hub
USB-USC-C = Hasu USB-USB converter
nps = Non-powered USB 2.0 hub with a switch for each port
Kbd1 = Keyboard1, etc.

My setup has 1 Windows computer and 2 Linux computers sharing a keyboard and mouse and each connected to 3 monitors. The monitors can switch inputs so that any of the computers can use 1, 2, or all 3 monitors. The computers are also running Synergy with the host on Windows and the clients on linux. The Hasu USB-USB converter works fine across all computers. This is more reliable and consistent than using keyboard remapping software.

I have programmed the converter to a HHKB layout. I used Hasu's online configurator to produce the hex file, and I used Atmel FLIP to flash the converter. It was not necessary to use any code or to compile anything.

BTW, I learned the hard way not to use WinAVR (or if you do use this, not to allow the program to modify your Path. I was not careful, and WinAVR overwrote my Path, leaving only the path to WinAVR. Luckily, I was able to retrieve my previous Path by using regedit.

I heard from Hasu today, and he is working on modifications to the firmware for multiple hubs and multiple keyboards attached to the USB-USB converter. However, for me, it is already working with a KVM and two tandem hubs. My second hub has switchable ports, so I can keep multiple keyboards physically attached if desired and switch to the one that I wish to have active. The switchable hub I am using is the Sabrent 4-Port USB 2.0 Hub with Individual Power Switches and LEDs (HB-UMLS):

https://www.amazon.com/Sabrent-4-Port-I ... B00BWF5U0M
Last edited by Hypersphere on 16 Jun 2016, 15:18, edited 1 time in total.

User avatar
t!ng
Awake Sheep

16 Jun 2016, 14:51

Thanks for the amazon link. One question remains here:

Laptop/PC --- USBUSBConverter --- SabrentUSBHub --- Kbd1, USB3.0Stick

Would the USB3.0Stick just ignore the Converter so the Laptop/PC could read/write on it?

User avatar
Hypersphere

16 Jun 2016, 15:14

@t!ng: With my current setup, I think it would be necessary to switch between the keyboard and the USB stick. Note also that the Sabrent hub I am using is USB 2.0, but I think that a USB 3.0 version is available. I would suggest putting a hub between the PC and the converter instead of the way you have it in your diagram. However, Hasu is working on an update to the firmware that should enable attaching more devices after the converter.

EDIT: I edited my previous post -- I had omitted the USB-USB converter!

User avatar
matt3o
-[°_°]-

16 Jun 2016, 19:56

I purchased one. I'll post my impressions as soon as I get it.

User avatar
Hypersphere

16 Jun 2016, 22:38

Great, matt3o! Looking forward to your impressions.

I am typing this on my Novatouch, remapped to a HHKB-layout via the Hasu USB-USB converter. It works perfectly.

EDIT: Thus far, I have only used the online configurator to make my hex file. This works okay for some of my keyboards. However, I have run into problems with the CapsLock indicator light on some keyboards -- it behaves in the opposite way to what is expected. That is, the CapsLock LED is on when the CapsLock is off, and conversely, the CapsLock LED is off when the CapsLock is on. What should I do to make the CapsLock indicator LED function correctly with the USB-USB converter? BTW, I have remapped CapsLock to L_Ctrl, and I use Fn+Tab ---> CapsLock.

In addition, on my Realforce 87U, the situation gets very confused with the NumLock and CapsLock LEDs and controls. To avoid major problems, I have had to disable the NumLock using a DIP switch setting. However, I have not explicitly assigned a NumLock key using the online configurator. I might try this, make a new hex file, and reflash the USB-USB converter.

UPDATE: I erased the USB-USB converter, used the online configurator to generate a new hex file, and reflashed the converter. This time, the CapsLock and its indicator LED worked as expected.

In addition, this time, I remapped Scroll Lock in the nav island on my RF87U to NumLock. With all 4 DIP switches set to Off, the CapsLock and NumLock together with their indicator LEDs now work as expected.

themightymolar

11 Feb 2019, 17:54

matt3o wrote:
16 Jun 2016, 19:56
I purchased one. I'll post my impressions as soon as I get it.
I'm getting one as soon as it is in stock. How long does the process to get one take? I'm told they are handmade in Japan and I kinda need it yesterday--for work.

User avatar
Muirium
µ

11 Feb 2019, 22:07

Hasu ships this stuff himself. When I ordered my HHKB BT controller from him, he dispatched it quickly but with the distance it took several days to arrive. Maybe a week, if I recall. I was in California at the time.

User avatar
Hypersphere

11 Feb 2019, 23:30

You can order direct from Hasu or buy the converter from 1up keyboards.

https://www.1upkeyboards.com/shop/contr ... converter/

Iup keyboards is currently out of stock, but they say they will be back in stock soon. You can sign up for their newsletter to get notifications.

User avatar
matt3o
-[°_°]-

12 Feb 2019, 08:41

themightymolar wrote:
11 Feb 2019, 17:54
I'm getting one as soon as it is in stock. How long does the process to get one take? I'm told they are handmade in Japan and I kinda need it yesterday--for work.
it took mine almost one month to arrive from order to doorstep

apastuszak

30 Jul 2022, 18:00

I'm considering ordering this and was hoping people could answer some questions:

1. I see that this runs TMK. Can this be flashed to run QMK? If so, can it use with VIA?
2. I'm concerned about the available memory. I'd like to program a LOT of Macros and I'm worried I am going to run out of memory.

BuGless

31 Jul 2022, 01:56

I have one of those converters.
I asked Hasu about it; he said he didn't know.

Checking the QMK source, I see references to the usb-usb converter, so maybe it will work. I haven't tried it yet, though.

User avatar
Muirium
µ

31 Jul 2022, 15:07

You should be able to design your own layout and layers and build straight from QMK Configurator using this preset:

https://config.qmk.fm/#/converter/usb_u ... LAYOUT_all

Macros, however, need to be done in source code, which you'd need to build locally. But you can at least give QMK a test drive on your hardware to check that it works.

BuGless

01 Aug 2022, 00:38

I'm now typing this from my freshly flashed QMK-hasu-usb-usb converter.
Works like a charm.

User avatar
depletedvespene

01 Aug 2022, 01:49

Muirium wrote:
31 Jul 2022, 15:07
You should be able to design your own layout and layers and build straight from QMK Configurator using this preset:

https://config.qmk.fm/#/converter/usb_u ... LAYOUT_all

Macros, however, need to be done in source code, which you'd need to build locally. But you can at least give QMK a test drive on your hardware to check that it works.
That layout has everything except the split numpad0. Who should we sue now? :mrgreen:

BuGless

01 Aug 2022, 23:47

depletedvespene wrote:
01 Aug 2022, 01:49
That layout has everything except the split numpad0. Who should we sue now? :mrgreen:
Indeed, I didn't know, but as it turns out, the USB-HID standard ( https://www.usb.org/sites/default/files ... 1_12v2.pdf ) actually defines keycodes for 00 and 000:
- 176 = 0xb0 for Keypad 00
- 177 = 0xb1 for Keypad 000

User avatar
depletedvespene

02 Aug 2022, 00:10

BuGless wrote:
01 Aug 2022, 23:47
depletedvespene wrote:
01 Aug 2022, 01:49
That layout has everything except the split numpad0. Who should we sue now? :mrgreen:
Indeed, I didn't know, but as it turns out, the USB-HID standard ( https://www.usb.org/sites/default/files ... 1_12v2.pdf ) actually defines keycodes for 00 and 000:
- 176 = 0xb0 for Keypad 00
- 177 = 0xb1 for Keypad 000
Model M keyboards can have their numpad0 key split (just like numpad+ and numpadEnter). The right side produces the 0x62 (PAD_0) scan code and the leftside outputs 0xB6 (EXTRA_INSERT). I already have successfully used this with a Soarer Converter, so I don't see any reason why hasu (and QMK, by extension) wouldn't be able to include splitting numpad0 — perhaps it slipped under hasu's radar because most keyboard manufacturers cheapened out on the switch and it just wasn't there on whatever he tried on.

User avatar
Muirium
µ

02 Aug 2022, 00:27

Hasu will certainly appreciate you blaming QMK’s (Configurator’s contributor’s) feature shortfalls on him.

TMK. That’s his one. Confusing, I know. :P

User avatar
depletedvespene

02 Aug 2022, 01:04

Muirium wrote:
02 Aug 2022, 00:27
Hasu will certainly appreciate you blaming QMK’s (Configurator’s contributor’s) feature shortfalls on him.

TMK. That’s his one. Confusing, I know. :P
Discovering a slight oversight in TMK gives me the Sacred Right and Saintly Duty of slightly trolling hasu for it. :mrgreen:

AFTER TMK has been corrected, I'll go to pest the QMK guys for falling behind. :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen:

User avatar
Muirium
µ

02 Aug 2022, 12:37

Loads TMK's USB to USB keymap (which doesn't update the Unimap url when selecting?) and sees you are correct. Fair enough. Good luck with your request.

Post Reply

Return to “Workshop”