Author Topic: TMK USB to USB keyboard converter  (Read 428200 times)

0 Members and 1 Guest are viewing this topic.

Offline nug

  • Posts: 83
Re: USB to USB keyboard converter
« Reply #700 on: Fri, 06 August 2021, 00:42:22 »
I have a weird issue with the converter and a Matrix Vita keyboard. If I plug in the keyboard into the converter and then the converter into the computer, no input is detected on the computer from the converter. If I then flash the converter, it will detect input. I think it may have something to do with the Matrix Vita booting up as the keyboard has a screen which takes some time to load.

I installed the debug hex onto the converter and when plugging in the converter into the computer I get the following output (please click ""MORE" for an image):
More


At point (1) I have plugged in the converter with the keyboard connected to the converter. No input from the keyboard is detected by the converter.
At (2), I press the reset switch on the converter and re-flash the debug hex. After re-flashing, the keyboard is detected and input is read.

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #701 on: Fri, 06 August 2021, 08:48:00 »
Yes, it looks like slow startup after bus reset and the keyboard seems to fail to reply a request.
And rare CRC errors(crIN:0B) are shown in the log, I never seen the error so far. This is unusual at least.

Can you try this debug firmware and share debug log? It may give something helpful.
* usb_usb_debug.hex (78.6 kB - downloaded 113 times.)


Also try this firmware on the converter to get USB descriptors of the keyboard.
https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_desc_dump

Please share debug log as text format.

Offline nug

  • Posts: 83
Re: USB to USB keyboard converter
« Reply #702 on: Fri, 06 August 2021, 09:08:49 »
Thanks hasu, I've attached the output using the debug hex you shared. I'm not sure how to use the other firmware to get the USB descriptors, could you please let me know what I should do for that?

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #703 on: Fri, 06 August 2021, 09:35:59 »
Just flash firmware under 'binary' firmware, and then plug the keyboard.
It should show hex dump of USB descriptors in hid_listen console.

Offline nug

  • Posts: 83
Re: USB to USB keyboard converter
« Reply #704 on: Fri, 06 August 2021, 09:48:56 »
Got it, thanks. Attached is the desc dump log. The input is shown twice as I reflashed it while keeping the keyboard plugged in.

Offline nug

  • Posts: 83
Re: USB to USB keyboard converter
« Reply #705 on: Fri, 06 August 2021, 17:31:51 »
Yes, it looks like slow startup after bus reset and the keyboard seems to fail to reply a request.
And rare CRC errors(crIN:0B) are shown in the log, I never seen the error so far. This is unusual at least.

Is it possible to add some sort of delay to the converter so that the keyboard can power on before the converter starts up?

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #706 on: Fri, 06 August 2021, 19:00:10 »
Yes, You can increase this value to 100 for example. Try this if you can build firmware on your site. This may show display different behaviour with the keyboard.
The file is located at tmk_keyboard/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0-tmk/Usb.cpp of your working repository.
https://github.com/tmk/USB_Host_Shield_2.0/blob/96112d43858b5c5327565c36bd8ea2192ec77d1b/Usb.cpp#L535


But I guess the delay value is not root cause of the problem now, after seeing 'desc_dump.txt'. The log shows 'USB Descriptor Dumper' worked with the keyboard without the problem.
Both the dumper and the converter use same library and basically equivalent process to handle USB keyboards. I'll look into code to find difference between them.


Offline nug

  • Posts: 83
Re: USB to USB keyboard converter
« Reply #707 on: Fri, 06 August 2021, 23:36:20 »
Sorry I just tested it again and the USB descriptor dumper does not work with the keyboard similar to the debug hex. I've attached another log file, the first time the converter is already plugged in and then I plug in the keyboard into the converter. I then reflash the converter with the dump hex (from Line 11 onwards) while keeping the keyboard plugged in and the descriptor then detects the board.

Offline nug

  • Posts: 83
Re: USB to USB keyboard converter
« Reply #708 on: Fri, 06 August 2021, 23:54:32 »
I managed to compile a hex with
Code: [Select]
delay = millis() + 5000; and it seems to be working. I'll do a few more tests to check. Lowering down to 500 also seems to work.
« Last Edit: Sat, 07 August 2021, 00:07:18 by nug »

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #709 on: Sun, 08 August 2021, 05:12:52 »
Thanks for the explanation and the test.

Adding 500ms delay to default firmware is acceptable workaround but lower value would be preferable if possible.
Doesn't 100ms delay work perhaps?


Can you test attached firmware to see what shows in debug log?
This firmware uses 500ms delay instead of 20ms.
* usb_usb_debug.hex (78.6 kB - downloaded 102 times.)

I like to know more about what happens with the keyboard in fact.

Offline nug

  • Posts: 83
Re: USB to USB keyboard converter
« Reply #710 on: Sun, 08 August 2021, 08:15:11 »
I've attached 2 logs, one where the converter was already plugged in after flashing, and then the keyboard was connected, and the other where the keyboard was plugged into the converter before plugging the converter into the computer.

I also tested changing the delay, it seems to work with 400ms, but it failed on 100/200/300ms.

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #711 on: Mon, 09 August 2021, 22:21:32 »
500ms delay seems to work well without any errors in the both logs.
OK. Confirmed that increasing bus rest delay to 400 or 500ms is a workaround for the problem.
I'll fix it when next binary firmware update if I don't find other good solution. Thanks

Offline poly dactyl

  • Posts: 4
Re: USB to USB keyboard converter
« Reply #712 on: Sun, 15 August 2021, 00:07:13 »
I'm trying to use a Truly Ergonomic Cleave,  which is on the known-good list. But I'm having the same slow startup problem as nug - works after flashing firmware & MCU reset, does not work after being unplugged.
I have two hasu USB2 USB adapters (thank you). Both work with other keyboards. I've updated the cleave to the latest firmware (001). I also tried modifying the delay to 2 seconds, but no change.

Debug log attached.

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #713 on: Sun, 15 August 2021, 03:55:58 »
Thank you for the debug log.


Code: [Select]
### unplug usb2usb & re-insert.
Device disconnected.
Waiting for new device:..
Listening:

TMK:44ee4f/LUFA:d6a7df/UHS2:8b8cde

USB configured.

Loop start.
usb_state: 12


It seems that the converter doesn't recognize the keyboard at all after re-plug.
It fails to prove USB bus and to detect keyboard insertion for some reason.


I just worked on improvent of bus probe a few week ago. It may help.
Try attached debug firmware. * usb_usb_debug_ee3e6b.hex (77.82 kB - downloaded 111 times.)



Offline poly dactyl

  • Posts: 4
Re: USB to USB keyboard converter
« Reply #714 on: Sun, 15 August 2021, 10:28:13 »
the ee3e6b firmware worked (log attached). Where can I find that version of the source?

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #715 on: Sun, 15 August 2021, 22:15:56 »
Great.
The related fix is located here.  You will have to check out 'master' branch under tmk_keyboard/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0-tmk.

https://github.com/tmk/USB_Host_Shield_2.0/commit/3e831605d058c2c7d209167acd804653699fddc9


Offline the_marsbar

  • Posts: 193
Re: USB to USB keyboard converter
« Reply #716 on: Fri, 03 September 2021, 02:13:14 »
It seems to work with the HHKB Hybrid too (donít have a Classic) :)

Very cool.
 

Offline Draconian

  • Posts: 18
Re: USB to USB keyboard converter
« Reply #717 on: Sun, 05 September 2021, 05:48:06 »
I have a HHKB Hybrid too a can confirm it works perfectly.

I flashed QMK onto the converter and have got that working. I cannot successfully build the QMK firmware if I enable VIA though. The error states:

ďdynamic keymaps are configured to use more EEPROM than is availableĒ

Iíve tried all the standard tweaks to reduce the size of the firmware, but to no avail.

Has anyone else tried this and had any success?


Offline the_marsbar

  • Posts: 193
Re: USB to USB keyboard converter
« Reply #718 on: Sun, 05 September 2021, 06:23:26 »
What is VIA and whatís it good for? I realize this might be a stupid question.
 

Offline Draconian

  • Posts: 18
Re: USB to USB keyboard converter
« Reply #719 on: Sun, 05 September 2021, 07:00:04 »
Not a silly question at all, and Iím only just learning about it myself.

https://caniusevia.com/

VIA is an extension to QMK that lets you modify key mappings on the fly, without having to flash the firmware each time. You run an app on your computer and that updates the QMK mappings behind the scenes. The mappings are still stored with the keyboard.

Iíve read lots of comments about people finding QMK intimidating, and this looks like a more accessible way to program your keyboard.

I have an HHKB Hybrid plugged into HASUís controller which is in turn plugged into a KVM switch to move between my work laptop and my Mac.

I donít really want to modify the HHKB, and donít believe that HASU has released a controller for the Hybrid yet anyway. But I do like the additional functionality of QMK - hence the USB-USB adapter.

When I couldnít get VIA to compile, I trawled through loads of documentation and managed to configure a Tap Dance combination where a double-left-ALT sends ALT+CTRL+1 to the KVM, which switches to my work laptop, abd double-right-ALT sends ALT+CTRL+3 to switch to the Mac.

When it worked, I punched the air with delight!

Iíd just like to see if I can enable the VIA support, as I think it would be easier.

Sorry for the long and rambling answer!

Offline the_marsbar

  • Posts: 193
Re: USB to USB keyboard converter
« Reply #720 on: Sun, 05 September 2021, 07:11:17 »
That sounds cool indeed - thanks for the explanation.

Iíd like to know if you get it working - it sounds like a handy feature.
 

Offline qk6339zmdm

  • Posts: 18
Re: USB to USB keyboard converter
« Reply #721 on: Mon, 06 September 2021, 08:46:18 »
Thanks Hasu!  These 60% models work with your converter with TMK or QMK:

HyperX Alloy Origins 60
Redragon Dragonborn K630 RGB
Womier K61

These work with TMK but not QMK:

Razer Huntsman Mini
Redragon Anivia K614 RGB
Zopsc-1/Bajeal (https://www.amazon.ca/Mechanical-Keyboard-Percent-Rainbow-Backlit/dp/B08RXW3NSW)
Stoga MK22 (https://www.amazon.ca/Mechanical-Keyboard-STOGA-Portable-Computer/dp/B08MDPDX39)
Vimukun/Magic-Refiner MK21 (https://www.amazon.ca/Mechanical-Keyboard-Percent-Rainbow-Backlit/dp/B08RXW3NSW)

I'll test a Corsair K65 RGB Mini and will post the results.

Offline qk6339zmdm

  • Posts: 18
Re: USB to USB keyboard converter
« Reply #722 on: Mon, 06 September 2021, 17:32:27 »
The Corsair K65 RGB Mini doesn't work, here are some debug logs:

This sequence repeats:

Waiting for device:
Listening:
usb_state: 20
usb_state: 40
usb_state: 50
usb_state: 12
usb_state: 20
usb_state: 40
usb_state: 50
usb_state: 12

With the descriptor dump firmware, this is the repeating sequence:

Waiting for device:
Listening:
usb_state: 20
usb_state: 40
usb_state: 50
usb_state: 51
usb_state: 12
usb_state: 20
usb_state: 40
usb_state: 50
usb_state: 51
usb_state: 12

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #723 on: Mon, 06 September 2021, 21:35:39 »
qk6339zmdm, thanks for the report.

As for Corsair K65 RGB, can you try this debug firmware to get more debug info?
https://github.com/tmk/tmk_keyboard/blob/usb_usb_test/converter/usb_usb/binary/usb_usb_debug.hex

Offline qk6339zmdm

  • Posts: 18
Re: USB to USB keyboard converter
« Reply #724 on: Mon, 06 September 2021, 23:05:31 »
Hasu,

This is the debug output after plugging in the converter:

Waiting for device:......
Listening:

TMK:1ef45c/LUFA:d6a7df/UHS2:8dc3c8

USB configured.

Loop start.
usb_state: 12

This sequence loops when the Corsair is plugged in:

usb_state: 20
usb_state: 40
usb_state: 50
usb_state: 12
usb_state: 20
usb_state: 40
usb_state: 50
usb_state: 12

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #725 on: Tue, 07 September 2021, 02:17:00 »
It seems to fail at very early stage of enumeration.

Can you try this instead?
https://gist.github.com/tmk/f24c3773935afdd110e346097265508b


Offline qk6339zmdm

  • Posts: 18
Re: USB to USB keyboard converter
« Reply #726 on: Tue, 07 September 2021, 10:07:17 »
Waiting for device:.............
Listening:

TMK:39273d/LUFA:d6a7df/UHS2:8dc3c8
se0
USB configured.

Loop start.
usb_state: 12


After Corsair inserted, loop:

fs DET usb_state: 20
usb_state: 40
usb_state: 50
se0 SE0 usb_state: 12
fs DET usb_state: 20
usb_state: 40
usb_state: 50
se0 SE0 usb_state: 12

Offline the_marsbar

  • Posts: 193
Re: USB to USB keyboard converter
« Reply #727 on: Wed, 08 September 2021, 06:49:50 »
I can't seem to figure out how to do this...

I have a HHKB. I'd like to map Esc to Fn (tap) and Esc (hold). I know how to do this with the alternative controller, but could someone give me a hint how to do it with the USB-USB converter?

Any help is greatly appreciated :)
 

Offline JPAU401

  • Posts: 1
Re: USB to USB keyboard converter
« Reply #728 on: Wed, 08 September 2021, 08:09:33 »
Hi, I'm currently considering pairing an IKBC MF108 V3 with the converter. Would the backlighting and top right keys be supported using QMK?

Website: https://www.ikbckeyboard.com/product-page/copy-of-ikbc-mf108-v-3

Manual: https://63a1a1b2-30f3-45a3-bacb-ff53fe2e8743.filesusr.com/ugd/d98a68_44bfb7d814f245a8b43b03a38da8ec49.pdf

Offline Draconian

  • Posts: 18
Re: USB to USB keyboard converter
« Reply #729 on: Wed, 08 September 2021, 08:24:08 »

I have a HHKB. I'd like to map Esc to Fn (tap) and Esc (hold). I know how to do this with the alternative controller, but could someone give me a hint how to do it with the USB-USB converter?


I've set up some similar mappings using the "Tap Dance" feature in QMK:

https://beta.docs.qmk.fm/using-qmk/software-features/feature_tap_dance

There's a specific example for TD_SINGLE_HOLD which I think should provide that functionality.

Offline the_marsbar

  • Posts: 193
Re: USB to USB keyboard converter
« Reply #730 on: Thu, 09 September 2021, 13:34:27 »

I have a HHKB. I'd like to map Esc to Fn (tap) and Esc (hold). I know how to do this with the alternative controller, but could someone give me a hint how to do it with the USB-USB converter?


I've set up some similar mappings using the "Tap Dance" feature in QMK:

https://beta.docs.qmk.fm/using-qmk/software-features/feature_tap_dance

There's a specific example for TD_SINGLE_HOLD which I think should provide that functionality.

Awesome! That definitely looks relevant. Thanks a lot :)
 

Offline dxlr8r

  • Posts: 14
Re: USB to USB keyboard converter
« Reply #731 on: Thu, 16 September 2021, 12:38:54 »
Thank you for this project. I just recieved my Hasu converter. I am starting to learn. And some findings.

hid_listen linked to in wiki, is really old. And do not work on most Macs nowadays (non PPC, and non Rosetta MacOS). But I found this project: https://github.com/PaulStoffregen/hid_listen

It is a fork, and it compiles and runs. You can also use "QMK Toolbox.app" for the same functionality.

Also, to get it to work, I had to disable some features to slim down the firmware:

Makefile:


Code: [Select]
#MOUSEKEY_ENABLE ?= yes # Mouse keys
#EXTRAKEY_ENABLE ?= yes # Media control and System control
CONSOLE_ENABLE ?= yes # Console for debug
COMMAND_ENABLE ?= yes    # Commands for debug and configuration
#NKRO_ENABLE ?= yes # USB Nkey Rollover

This bearly fits it, with no keyboard customisation.

Just thought I would share in case some other noob stumbles a cross this project.

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #732 on: Thu, 16 September 2021, 17:20:19 »
Thanks for headsup.

I don't have Mac and can build the tool and test it. I'll update github wiki if needed.

You mean that hid_listen.mac64 here wouldn't work on recent Macs?
https://github.com/tmk/tmk_keyboard/wiki#debug-console

Can you attach or send me binary of the tool you build? Binary built on the lates macOS would be helpful.

QMK Toolbox can be used to flash firmware but I can't recommend it for debug, because it can lost debug outputs sometime at least on WIndows. You need to use hid_listen tool direclty when debuging.

Offline dxlr8r

  • Posts: 14
Re: USB to USB keyboard converter
« Reply #733 on: Fri, 17 September 2021, 11:09:31 »
Seems like I did missed that you hosted the binaries as well. I was looking at:

https://github.com/tmk/tmk_keyboard#debugging

And then the page linked to there, https://www.pjrc.com/teensy/hid_listen.html and that one only works for PPC.

Offline ismaelyork

  • Posts: 1
Re: USB to USB keyboard converter
« Reply #734 on: Fri, 17 September 2021, 16:47:59 »
I always liked to order different accessories online. I needed a USB to connect the keyboard to the computer, and usually, mom, when she comes from outside, walks past my room. She looks at what I look at on the computer and for a while see that I keep looking at something to give my order and the next day https://www.dontpayfull.com/page/sweepstakes he bought me a gift 100$ card with credit so I could buy what I wanted from Amazon and I'm thrilled that I got what I needed.
« Last Edit: Sat, 18 September 2021, 15:19:33 by ismaelyork »

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #735 on: Fri, 17 September 2021, 17:39:15 »
dxlr8r,
Ah, I'll fix the README and link to wiki.
https://github.com/tmk/tmk_keyboard#debugging

The binary hosted on the wiki was built on Catalina(10.15.3) before release of M1 Mac.
It would be appreciated if you can build hid_listen with the latest Xcode on BIg Sur.

Offline dxlr8r

  • Posts: 14
Re: USB to USB keyboard converter
« Reply #736 on: Sat, 18 September 2021, 08:11:45 »
I am still on Catalina myself, and my Mac runs on x86. Your binary, from where did you compile it?

I can compile with Big Sur when update in the future, and hopefully get the new ARM MBP 16".

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #737 on: Sun, 19 September 2021, 00:10:32 »
I see.  The current mac binary(hid_listen.mac64) was contributed by some user.

I believe 'hid_listen.mac64' contains only executable for x86 64-bit architecture and it should work well on current Intel macs.
And I think it works on M1 mac with bnianry translation probably, but it would be great to support M1 ARM natively.

Offline Horsebadorties

  • Posts: 6
  • Location: Eastern Seaboard
Re: USB to USB keyboard converter
« Reply #738 on: Wed, 22 September 2021, 20:24:29 »
Hi Hasu,
I received the USB to USB converter from you this week, only 10 days after placing my order from the US East Coast. It's a very elegant, well-built gadget. Thanks!

I have not modified the default firmware yet. So, as I understand it, the converter is simply passing the keystroke data unchanged. With that caveat, the converter works perfectly with these three keyboards. All keystrokes are faithfully transmitted, with no noticeable lag at all.
If it matters, both Hexgears keyboards have soldered switches. I bought them before Hexgears released new versions with hot-swap PCBs.

My positive results are with the converter plugged into my computer's USB port.  But the converter works very poorly when it is plugged into the dedicated keyboard port of my KVM switch. Then, I get constant lagging. Some keystrokes are missed, others are rapidly repeated. There are no problems when the converter is plugged into the KVM's generic USB port, but then I lose some key features of the KVM, including hotkey switching.

Can you suggest any firmware settings I might experiment with, to better sync the converter to the KVM switch?

Offline qk6339zmdm

  • Posts: 18
Re: USB to USB keyboard converter
« Reply #739 on: Wed, 22 September 2021, 20:51:56 »

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #740 on: Wed, 22 September 2021, 20:56:32 »
Horsebadorties, qk6339zmdm,
Thanks for your feedback.

Horsebadorties,
To be honest I don't know much about modern KVM technology and what 'dedicated' and generic port mean exactly.
But I know some users with KVM had trouble like that.

What's your KVM model number actually?
Do the three keyboards work well on the 'dedicated' port?
Do you have any other keyboard which doesn't works well on the 'dedicated' port?

It may be helpful to see difference between USB descriptors of the converter and those keyboards.

You can get USB descriptor of device using 'USB Descriptor Dumper'.
Flash the Dumpr firmware on your converter and just plug the device into the converter, you shoulld get USB descriptors on 'hid_listen'.
https://github.com/tmk/tmk_keyboard/wiki/USB:-Descriptor#usb-descriptor-dumper
https://github.com/tmk/tmk_keyboard/wiki#hid_listen

EDIT: And let me know what OS you are using.
As for firmware build options what is worth trying would be:
Code: [Select]
MOUSEKEY_ENABLE = no  # Mouse keys
EXTRAKEY_ENABLE = no  # Media control and System control
CONSOLE_ENABLE = no   # Console for debug
« Last Edit: Wed, 22 September 2021, 21:49:50 by hasu »

Offline mi0

  • Posts: 2
Re: USB to USB keyboard converter
« Reply #741 on: Sat, 25 September 2021, 07:57:17 »
Hi Hasu,
I bought one of your converters about a year ago for a leopold FC750R on a Windows machine. It works well, I can flash my device with my custom layout. The only problem is that I am flashing the Atmel chip using Atmel's FLIP application every time I power off my device... as I understand it such chips will loose their flash-memory after they power down, but I'm not sure if this is the way your device was designed to function. I don't understand much about hardware programming/electronics.

So my question is: is it possible to program the device persistently, instead of flashing to volatile memory?

Steps I usually take after I turn on the computer:
Code: [Select]
1. click the button on the USB-to-USB converter device.
2. launch FLIP
3. ctrl+U to select USB device
4. select "Load HEX File" to select my custom payload
5. click "run" with all checkmarks checked: "Erase [+]", "Blank Check [+]", "Program [+]",  "Verify [+]"
6. click "start Application" with the reset option unchecked: "Reset [ ]".
7. plug in my keyboard into the USB-to-USB converter.







Online suicidal_orange

  • * Global Moderator
  • Posts: 4722
  • Location: England
Re: USB to USB keyboard converter
« Reply #742 on: Sat, 25 September 2021, 08:43:47 »
The Atmel chip doesn't lose it's memory - did you actually try or just assume it didn't work after a boot?
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #743 on: Sat, 25 September 2021, 08:52:52 »
I'm not sure what your problem is exactly.
Can you rephrase the problem and describe its details more?

Check this wiki entry if not yet. Also trying other flash tool may be helpful.
https://github.com/tmk/tmk_keyboard/wiki#flash-firmware

What if you use default firmware instead of your custom one?
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?usb_usb

Offline mi0

  • Posts: 2
Re: USB to USB keyboard converter
« Reply #744 on: Mon, 27 September 2021, 13:08:57 »
Thanks for the replies, it seems to be working just fine, which is sort of embaressing since I've been using it at work for many months now, without realizing that I didn't have to flash the device every time I unplugged it or powered-off my computer.

When I set up the device, I might've forgotten to uncheck the "[ ] reset" checkmark box, next to the "Start Application" button. Whatever it was, I was convinced that the flash memory was being reset.

Thanks for your guy'ses help again.

Offline Horsebadorties

  • Posts: 6
  • Location: Eastern Seaboard
Re: USB to USB keyboard converter
« Reply #745 on: Sat, 02 October 2021, 15:45:18 »
Hi Hasu,

Sorry for the late reply, but I've been trying out your suggestions, and I keep getting stuck.

Horsebadorties,
To be honest I don't know much about modern KVM technology and what 'dedicated' and generic port mean exactly.
But I know some users with KVM had trouble like that.

The dedicated USB ports on a KVM are for HID devices only. Some KVMs, including mine, use Dynamic Device Mapping (DDM) to emulate a connection between those ports and the computer (or computers) that are not actively connected. Many KVMs also monitor the dedicated keyboard port for a "hotkey" sequence that tells the KVM to switch active computers.

A generic USB port on the KVM can accept any device: another HID, or a printer, webcam, etc. With those ports, the KVM doesn't use DDM, or watch for hotkeys. The KVM deals with those ports the same way an ordinary USB switch does. I usually don't use these ports, because the computers "beep" when being switched.

What's your KVM model number actually?
Do the three keyboards work well on the 'dedicated' port?
Do you have any other keyboard which doesn't works well on the 'dedicated' port?

I have two KVMs:
Yes, all three of my current keyboards (GMMK TKL, Hexgears Impulse and Hexgears Nova) work well when connected directly to the KVM's dedicated port. I had another keyboard that would not work at all on that port: a Realforce R2 TKL. I discussed this with you in June (https://geekhack.org/index.php?topic=72052.msg3062182#msg3062182), but then I returned the board.

It may be helpful to see difference between USB descriptors of the converter and those keyboards.

You can get USB descriptor of device using 'USB Descriptor Dumper'.
Flash the Dumpr firmware on your converter and just plug the device into the converter, you shoulld get USB descriptors on 'hid_listen'.
https://github.com/tmk/tmk_keyboard/wiki/USB:-Descriptor#usb-descriptor-dumper
https://github.com/tmk/tmk_keyboard/wiki#hid_listen

EDIT: And let me know what OS you are using.
As for firmware build options what is worth trying would be:
Code: [Select]
MOUSEKEY_ENABLE = no  # Mouse keys
EXTRAKEY_ENABLE = no  # Media control and System control
CONSOLE_ENABLE = no   # Console for debug


I'm using Windows 10. I built TMP on a ubuntu VirtualBox (https://github.com/tmk/tmk_keyboard/wiki/Build-on-VirtualBox), changed the options in the Makefile, ran 'make' and then 'make dfu'. When finished, this appeared on the console:
Code: [Select]
27104 bytes used (94.53%)

The modified firmware makes no difference. When the converter is between my keyboard and my KVM, I get missed and repeated keystrokes and delays, just like before. Unfortunately, I was unable to get the Dumper firmware and flash it on my converter. I just could not figure out how to do that. I'll try again later, when time permits.

Thanks for your help, Hasu!



Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #746 on: Sat, 02 October 2021, 23:18:17 »
Horsebadorties,
Thanks for the detailed explanation. And I just revisited the another thread to recall the last discussion.

OK.  I think I understand the problem and situation now.

- Realforce R2 TKL does not work on the KVM 'dedicated' port. It doesn't send even a single keystroke there.
- USB-USB converter has constant lagging, missing keystrokes and repeated key problem on the KVM 'dedicated' port.
- Both the Realforce and the converter works withouth problem on the KVM 'generic' port.
- GMMK TKL, Hexgears Impulse and Hexgears Nova work well on the KVM 'dedicated' port.

Try this firmware instead, this firmware has keyboard interface only and makes it as simple as possible.
* usb_usb_unimap.hex

And thanks for your offer about the KVM. It would be very helpful to debug if we can't find any clue to fix the problem.

Offline Horsebadorties

  • Posts: 6
  • Location: Eastern Seaboard
Re: USB to USB keyboard converter
« Reply #747 on: Sun, 03 October 2021, 16:01:51 »
Hasu,

OK.  I think I understand the problem and situation now.

Yes, your description is absolutely correct. But I no longer have the Realforce R2 TKL, just the GMMK TKL, Hexgears Impulse and Hexgears Nova.

Try this firmware instead, this firmware has keyboard interface only and makes it as simple as possible.
* usb_usb_unimap.hex

I flashed this firmware to the converter. Now, with the converter inline between my GMMK TKL keyboard and the KVM 'dedicated' port, everything works. No more lagging, missed or repeated keystrokes. It even passes through the hotkey sequences to switch computers.

What can I do with the converter now? Is TKL installed? Can I use the TMK Keymap Editor, or re-build firmware from C source?

Once I get your address, I'll ship my spare KVM to you.

Thanks!

Offline hasu

  • Thread Starter
  • Posts: 3418
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #748 on: Sun, 03 October 2021, 22:38:08 »
Great.
The last firmware was built from the latest code repo without media key, mouse key and debug feature.
I guess that debug feature is the cause probably. To confirm that, can you try attached firmares?

This is firmware with debug feature and it will cause the problem, I guess.
* usb_usb_w_debug.hex (67.68 kB - downloaded 58 times.)

This firmware with  media key and mouse key will work without the problem.
* usb_usb_w_extra_mouse.hex (68.56 kB - downloaded 55 times.)

I'll DM for the KVM. Thank you.



The firmwares I attached in this and the last post can be used in Keymap Editor.
https://github.com/tmk/tmk_keyboard/wiki/Keymap-Editor#edit-your-firmware-file

If you want to built firmware yourself  see this.
More
Edit Makefile.unimap as below and run make command with it.

    make -f Makefile.unimap

Code: [Select]
TARGET = usb_usb_unimap
UNIMAP_ENABLE = yes
KEYMAP_SECTION_ENABLE = yes
#TMK_LUFA_DEBUG = yes
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = no
CONSOLE_ENABLE = no
NO_DEBUG = yes
include Makefile

And to change keymap edit unimap.c.

Offline tko2007

  • Posts: 1
Re: USB to USB keyboard converter
« Reply #749 on: Mon, 04 October 2021, 15:51:33 »
Maybe stupid question, but can I use this Converter to switch from French AZERTI Lay-out to German ISO?

Many thanks t