Author Topic: USB to USB keyboard converter  (Read 92777 times)

0 Members and 2 Guests are viewing this topic.

Offline Salt Peanuts

  • Posts: 39
Re: USB to USB keyboard converter
« Reply #200 on: Thu, 20 October 2016, 13:47:30 »
If you can share USB descriptor of the keyboard it would be useful to track this issue deep.
https://github.com/tmk/tmk_keyboard/wiki/HID-Report-Descriptor

Code: [Select]
Information for device Advantage2 Keyboard (VID=0x29EA PID=0x0103):

Connection Information:
------------------------------
Connection status: Device connected
Device actual bus speed: FullSpeed
Device supports USB 1.1 specification
Device supports USB 2.0 specification
Device is hub: No
Device address: 0x0006
Current configuration value: 0x01
Number of open pipes: 3

Device Descriptor:
------------------------------
0x12 bLength
0x01 bDescriptorType
0x0200 bcdUSB
0x00 bDeviceClass   
0x00 bDeviceSubClass   
0x00 bDeviceProtocol   
0x40 bMaxPacketSize0   (64 Bytes)
0x29EA idVendor
0x0103 idProduct
0x0100 bcdDevice
0x01 iManufacturer   "Kinesis"
0x02 iProduct   "Advantage2 Keyboard"
0x03 iSerialNumber   "----------"
0x01 bNumConfigurations

Configuration Descriptor:
------------------------------
0x09 bLength
0x02 bDescriptorType
0x0039 wTotalLength   (57 Bytes)
0x02 bNumInterfaces
0x01 bConfigurationValue
0x00 iConfiguration
0xA0 bmAttributes   (Bus-powered Device, Remote-Wakeup)
0x32 bMaxPower   (100 mA)

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x00 bInterfaceNumber
0x00 bAlternateSetting
0x02 bNumEndPoints
0x08 bInterfaceClass   (Mass Storage Device Class)
0x06 bInterfaceSubClass   (Transparent SCSI subclass)
0x50 bInterfaceProtocol   (Bulk only transport)
0x00 iInterface

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x81 bEndpointAddress   (IN Endpoint)
0x02 bmAttributes (Transfer: Bulk / Synch: None / Usage: Data)
0x0040 wMaxPacketSize   (64 Bytes)
0x00 bInterval

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x02 bEndpointAddress   (OUT Endpoint)
0x02 bmAttributes (Transfer: Bulk / Synch: None / Usage: Data)
0x0040 wMaxPacketSize   (64 Bytes)
0x00 bInterval

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x01 bInterfaceNumber
0x00 bAlternateSetting
0x01 bNumEndPoints
0x03 bInterfaceClass   (Human Interface Device Class)
0x01 bInterfaceSubClass   
0x01 bInterfaceProtocol   
0x00 iInterface

HID Descriptor:
------------------------------
0x09 bLength
0x21 bDescriptorType
0x0111 bcdHID
0x00 bCountryCode
0x01 bNumDescriptors
0x22 bDescriptorType   (Report descriptor)
0x0041 bDescriptorLength

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x84 bEndpointAddress   (IN Endpoint)
0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data)
0x0008 wMaxPacketSize   (8 Bytes)
0x02 bInterval

Microsoft OS Descriptor is not available. Error code: 0x0000001F

String Descriptor Table
--------------------------------
Index  LANGID  String
0x00   0x0000  0x0409
0x01   0x0409  "Kinesis"
0x02   0x0409  "Advantage2 Keyboard"
0x03   0x0409  "----------"
« Last Edit: Thu, 20 October 2016, 16:09:10 by Salt Peanuts »

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #201 on: Sun, 23 October 2016, 13:46:49 »
If you can share USB descriptor of the keyboard it would be useful to track this issue deep.
https://github.com/tmk/tmk_keyboard/wiki/HID-Report-Descriptor

Code: [Select]
Information for device Advantage2 Keyboard (VID=0x29EA PID=0x0103):

Connection Information:
------------------------------
Connection status: Device connected
Device actual bus speed: FullSpeed
Device supports USB 1.1 specification
Device supports USB 2.0 specification
Device is hub: No
Device address: 0x0006
Current configuration value: 0x01
Number of open pipes: 3

Device Descriptor:
------------------------------
0x12 bLength
0x01 bDescriptorType
0x0200 bcdUSB
0x00 bDeviceClass   
0x00 bDeviceSubClass   
0x00 bDeviceProtocol   
0x40 bMaxPacketSize0   (64 Bytes)
0x29EA idVendor
0x0103 idProduct
0x0100 bcdDevice
0x01 iManufacturer   "Kinesis"
0x02 iProduct   "Advantage2 Keyboard"
0x03 iSerialNumber   "----------"
0x01 bNumConfigurations

Configuration Descriptor:
------------------------------
0x09 bLength
0x02 bDescriptorType
0x0039 wTotalLength   (57 Bytes)
0x02 bNumInterfaces
0x01 bConfigurationValue
0x00 iConfiguration
0xA0 bmAttributes   (Bus-powered Device, Remote-Wakeup)
0x32 bMaxPower   (100 mA)

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x00 bInterfaceNumber
0x00 bAlternateSetting
0x02 bNumEndPoints
0x08 bInterfaceClass   (Mass Storage Device Class)
0x06 bInterfaceSubClass   (Transparent SCSI subclass)
0x50 bInterfaceProtocol   (Bulk only transport)
0x00 iInterface

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x81 bEndpointAddress   (IN Endpoint)
0x02 bmAttributes (Transfer: Bulk / Synch: None / Usage: Data)
0x0040 wMaxPacketSize   (64 Bytes)
0x00 bInterval

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x02 bEndpointAddress   (OUT Endpoint)
0x02 bmAttributes (Transfer: Bulk / Synch: None / Usage: Data)
0x0040 wMaxPacketSize   (64 Bytes)
0x00 bInterval

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x01 bInterfaceNumber
0x00 bAlternateSetting
0x01 bNumEndPoints
0x03 bInterfaceClass   (Human Interface Device Class)
0x01 bInterfaceSubClass   
0x01 bInterfaceProtocol   
0x00 iInterface

HID Descriptor:
------------------------------
0x09 bLength
0x21 bDescriptorType
0x0111 bcdHID
0x00 bCountryCode
0x01 bNumDescriptors
0x22 bDescriptorType   (Report descriptor)
0x0041 bDescriptorLength

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x84 bEndpointAddress   (IN Endpoint)
0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data)
0x0008 wMaxPacketSize   (8 Bytes)
0x02 bInterval

Microsoft OS Descriptor is not available. Error code: 0x0000001F

String Descriptor Table
--------------------------------
Index  LANGID  String
0x00   0x0000  0x0409
0x01   0x0409  "Kinesis"
0x02   0x0409  "Advantage2 Keyboard"
0x03   0x0409  "----------"

Thanks for the info.
In Advantage2 keyboard is located in second interface while first interface is keyboard role in most cases. I guess this causes the problem with Host Shield library. I'll look into this later.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline adreamer

  • Posts: 14
Mouse/Trackball passthrough?
« Reply #202 on: Thu, 17 November 2016, 10:35:14 »
I have Kinesis advantage 1 keyboard and would like to try this converter.

However, I have plugged in a trackball into one of the USB ports in the keyboard. If I use this converter, can it just passthrough the mouse commands? Or the trackball won't work at all correctly?

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #203 on: Thu, 17 November 2016, 12:06:51 »
Unfortunately no, this cannot pass through mouse or anything except for keyboard.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline 00zeRO

  • mechanicalkeyboards.com
  • * Commercial Vendor
  • Posts: 2302
  • Location: Tennessee
  • The 00verseer of Vault 77
    • Mechanical Keyboards
Re: USB to USB keyboard converter
« Reply #204 on: Thu, 17 November 2016, 13:58:45 »
I just tried using mine with a Keycool 22 Key keypad. It works, but for some reason the function layer is disabled. Does this mean I can program it as I see fit?
Daily Driver: Typist A w/Midnight Dawn | Kailh BOX Clicks

           
Junktown 2 Extras Orders Open Now!

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #205 on: Thu, 17 November 2016, 14:11:48 »
I just tried using mine with a Keycool 22 Key keypad. It works, but for some reason the function layer is disabled. Does this mean I can program it as I see fit?

what's do you mean with "the function layer"? Keymap on USB-USB converter or the keypad has layer itself?
If you have your own keymap on the converter sharing it would be helpful.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline 00zeRO

  • mechanicalkeyboards.com
  • * Commercial Vendor
  • Posts: 2302
  • Location: Tennessee
  • The 00verseer of Vault 77
    • Mechanical Keyboards
Re: USB to USB keyboard converter
« Reply #206 on: Thu, 17 November 2016, 14:16:45 »
I just tried using mine with a Keycool 22 Key keypad. It works, but for some reason the function layer is disabled. Does this mean I can program it as I see fit?

what's do you mean with "the function layer"? Keymap on USB-USB converter or the keypad has layer itself?
If you have your own keymap on the converter sharing it would be helpful.

Oh sorry. The keypad has its own built in function layer, meaning it has a Fn key when pressed allows for multimedia, hotkeys, and led functions to be used. But, when I plug it into my USB converter, only the first layer of each key is available, it appears that I cannot use the Fn layer from the original hardware while plugged into the converter. Does this make sense?
Daily Driver: Typist A w/Midnight Dawn | Kailh BOX Clicks

           
Junktown 2 Extras Orders Open Now!

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #207 on: Thu, 17 November 2016, 14:24:38 »
I just tried using mine with a Keycool 22 Key keypad. It works, but for some reason the function layer is disabled. Does this mean I can program it as I see fit?

what's do you mean with "the function layer"? Keymap on USB-USB converter or the keypad has layer itself?
If you have your own keymap on the converter sharing it would be helpful.

Oh sorry. The keypad has its own built in function layer, meaning it has a Fn key when pressed allows for multimedia, hotkeys, and led functions to be used. But, when I plug it into my USB converter, only the first layer of each key is available, it appears that I cannot use the Fn layer from the original hardware while plugged into the converter. Does this make sense?

OK. Media keys are not recognized as described in 'Limitation' section but other normal keys on function layer should be useful. Led functions should work because it handled completely inside the keypad. I'm not sure what "hotkey" is and whether it may work or not. And "Fn" key on keypad cannot be remap with the converter from its 'Limitation' also.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline DreymaR

  • Posts: 184
  • Location: Norway
  • Colemak forum guy
    • DreymaR's Big Bag of Kbd Tricks
Re: USB to USB keyboard converter
« Reply #208 on: Mon, 28 November 2016, 08:56:30 »
Hasu: How hard would it be for the converter to just pass through anything it doesn't recognize? Like Multimedia keys, etc etc.
Better burden you cannot carry than man-wisdom much ~ Hávamál

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #209 on: Mon, 28 November 2016, 15:48:56 »
It seems to me like very very hard, almost impossible.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline DreymaR

  • Posts: 184
  • Location: Norway
  • Colemak forum guy
    • DreymaR's Big Bag of Kbd Tricks
Re: USB to USB keyboard converter
« Reply #210 on: Tue, 29 November 2016, 03:29:59 »
Oh. Sounds simple, is hard.

"In the mind of the beginner, there are many possibilities. In the mind of the master, there are few."
Better burden you cannot carry than man-wisdom much ~ Hávamál

Offline testplsignore

  • Posts: 81
  • Location: 'Straya M8
  • I am one with the Cup Rubber...
Re: USB to USB keyboard converter
« Reply #211 on: Mon, 23 January 2017, 03:31:55 »
Hey Hasu, how hard would it be to create a version of this that could be used internally in a Novatouch?

This is the header that the novatouch uses internally for USB:


I'm thinking this might even be possible with adaptors maybe? I'm not sure what that connector type is.

A programmable Novatouch with internal converter would be incredible.
                   
Realforce 10AE 45g Type-S & 55g    HHKB BT & Type-S    Realforce RGB Hype-S    FC980C    FC660C    Filco BT TKL

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #212 on: Mon, 23 January 2017, 08:09:00 »
I would be easy if the keyboard has enough space to place the converter inside.
You can remove USB connectors on the converter in order to solder those USB wires instead.

The connector of the pic looks to me JST PH.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline testplsignore

  • Posts: 81
  • Location: 'Straya M8
  • I am one with the Cup Rubber...
Re: USB to USB keyboard converter
« Reply #213 on: Mon, 23 January 2017, 10:18:45 »
I'll try and get some more detailed pictures once I get my Novatouch from Originative, I think it might be the same connector Filco uses for their wired boards.

I'll also get some detailed measurements of the space inside and the exact dimensions of the connector using some calipers.

As always, props for the awesome work hasu!
                   
Realforce 10AE 45g Type-S & 55g    HHKB BT & Type-S    Realforce RGB Hype-S    FC980C    FC660C    Filco BT TKL

Offline tofgerl

  • Posts: 880
  • Location: Norway
Re: USB to USB keyboard converter
« Reply #214 on: Sat, 28 January 2017, 13:25:20 »
I've been trying to backport my QMK Satan GH60 keymap to a TMK usb_usb keymap, but I can't find a way to replace KC_HYPER. Should I just make a function...?

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #215 on: Sat, 28 January 2017, 15:06:02 »
I've been trying to backport my QMK Satan GH60 keymap to a TMK usb_usb keymap, but I can't find a way to replace KC_HYPER. Should I just make a function...?

Now that QMK is very different from TMK now, so you would have to explain the "HYPER" to me first :p You mean KC_HYPR? I didn't know about what Hyper is and I think many don't know about Hyper as well so I'll have to place this quote from QMK.
https://github.com/qmk/qmk_firmware/wiki#fun-with-modifier-keys
Quote
HYPR(kc) - applies Hyper (all modifiers) to kc

OK. You will able to use ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT | MOD_LGUI, KC_NO) in TMK.

See right most key on bottom raw in "Code Edit" tab if you are using keymap editor.
https://goo.gl/ZkD71y
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline tofgerl

  • Posts: 880
  • Location: Norway
Re: USB to USB keyboard converter
« Reply #216 on: Sun, 29 January 2017, 06:01:40 »
Cool, thanks!
Yeah, QMK is rapidly leaving the TMK solar system...

Offline xauser

  • Posts: 96
Re: USB to USB keyboard converter
« Reply #217 on: Mon, 30 January 2017, 11:54:20 »
I just tested usb-usb converter with a fc660c and it does not work. Not a single key is working :(

Any hardware/software instructions to debug this issue? I think I can't work with a keyboard that isn't tmk enabled anymore.

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #218 on: Mon, 30 January 2017, 14:04:29 »
Hmm, fc660c seems to be 6kro and work with the converter.
First you have to know hid descriptor, tmk wiki has how to get it.

Sent from my Nexus 5X

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline xauser

  • Posts: 96
Re: USB to USB keyboard converter
« Reply #219 on: Tue, 31 January 2017, 11:45:16 »
This is what I got...

Code: [Select]
Bus 001 Device 013: ID 0853:0134 Topre Corporation
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0853 Topre Corporation
  idProduct          0x0134
  bcdDevice            0.01
  iManufacturer           1 LEOPOLD
  iProduct                2 Mini Keyboard
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              4 Keyboard
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      65
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)

Offline xauser

  • Posts: 96
Re: USB to USB keyboard converter
« Reply #220 on: Wed, 01 February 2017, 12:58:38 »
I did some more tests with the connector and the fc660c and have some strange results. I've found a setup that gets the fc660c working.

I'm using a 50cm extension cable between usb3 port and the connector and that seems to help a lot.
Hitting keys on the keyboard during usb connect phase helps a lot.

Having the adapter with keyboard directly connected to usb3 port without hitting any keys on usb connect results in a not working fc660c for me. I have no issues with an other keyboard I tested the other day.

I hope the converter gets more robust with further patches.


Offline tofgerl

  • Posts: 880
  • Location: Norway
Re: USB to USB keyboard converter
« Reply #221 on: Wed, 01 February 2017, 15:02:13 »
Usb is weird... We should have stuck with the PS/2...

Offline stepardo

  • Posts: 4
Re: USB to USB keyboard converter
« Reply #222 on: Thu, 02 February 2017, 10:19:52 »
Hello hackers!

I registered to ask these questions...

First of all I want to thank Hasu for his tremendous work of creating the tmk firmware and making it open source! This is an impressive accomplishment.

So I do have your usb to usb converter here and it works really well with a number of my keyboards. It doesn't work with two of my keyboards however, and I need a hint on how to debug this. So the symptoms are like this:
- keyboard is plugged in, and its leds flash, are off for a second and then num lock led lights up
- the keyboard does not emit any keycodes
- hid_listen shows this:
Code: [Select]
usb_state: 12
usb_state: 20
usb_state: 40
usb_state: 50
usb_state: 51
host.Task: 2709
usb_state: 90

Here are the usb descriptors of the keyboards that do not work.
Code: [Select]
Bus 005 Device 112: ID 04b4:2001 Cypress Semiconductor Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x04b4 Cypress Semiconductor Corp.
  idProduct          0x2001
  bcdDevice            1.02
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           66
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          2 Game_Keyboard
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              2 Game_Keyboard
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      63
          Report Descriptor: (length is 63)
            Item(Global): Usage Page, data= [ 0x01 ] 1
                            Generic Desktop Controls
            Item(Local ): Usage, data= [ 0x06 ] 6
                            Keyboard
            Item(Main  ): Collection, data= [ 0x01 ] 1
                            Application
            Item(Global): Usage Page, data= [ 0x07 ] 7
                            Keyboard
            Item(Local ): Usage Minimum, data= [ 0xe0 ] 224
                            Control Left
            Item(Local ): Usage Maximum, data= [ 0xe7 ] 231
                            GUI Right
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0x01 ] 1
            Item(Global): Report Size, data= [ 0x01 ] 1
            Item(Global): Report Count, data= [ 0x08 ] 8
            Item(Main  ): Input, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report Count, data= [ 0x01 ] 1
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Main  ): Input, data= [ 0x01 ] 1
                            Constant Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report Count, data= [ 0x05 ] 5
            Item(Global): Report Size, data= [ 0x01 ] 1
            Item(Global): Usage Page, data= [ 0x08 ] 8
                            LEDs
            Item(Local ): Usage Minimum, data= [ 0x01 ] 1
                            NumLock
            Item(Local ): Usage Maximum, data= [ 0x05 ] 5
                            Kana
            Item(Main  ): Output, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report Count, data= [ 0x01 ] 1
            Item(Global): Report Size, data= [ 0x03 ] 3
            Item(Main  ): Output, data= [ 0x01 ] 1
                            Constant Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report Count, data= [ 0x06 ] 6
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0x65 ] 101
            Item(Global): Usage Page, data= [ 0x07 ] 7
                            Keyboard
            Item(Local ): Usage Minimum, data= [ 0x00 ] 0
                            No Event
            Item(Local ): Usage Maximum, data= [ 0x65 ] 101
                            Keyboard Application (Windows Key for Win95 or Compose)
            Item(Main  ): Input, data= [ 0x00 ] 0
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Main  ): End Collection, data=none
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              4 Function_Device
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     176
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)

and

Code: [Select]
Bus 005 Device 106: ID 0744:0030 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0744
  idProduct          0x0030
  bcdDevice            1.00
  iManufacturer           1 GMK electronic design GmbH
  iProduct                2 Cardreader Keyboar
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          2 Cardreader Keyboar
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               50mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      66
          Report Descriptor: (length is 66)
            Item(Global): Usage Page, data= [ 0x01 ] 1
                            Generic Desktop Controls
            Item(Local ): Usage, data= [ 0x06 ] 6
                            Keyboard
            Item(Main  ): Collection, data= [ 0x01 ] 1
                            Application
            Item(Global): Report Size, data= [ 0x01 ] 1
            Item(Global): Report Count, data= [ 0x08 ] 8
            Item(Global): Usage Page, data= [ 0x07 ] 7
                            Keyboard
            Item(Local ): Usage Minimum, data= [ 0xe0 ] 224
                            Control Left
            Item(Local ): Usage Maximum, data= [ 0xe7 ] 231
                            GUI Right
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0x01 ] 1
            Item(Main  ): Input, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Report Count, data= [ 0x01 ] 1
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Main  ): Input, data= [ 0x01 ] 1
                            Constant Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report Count, data= [ 0x05 ] 5
            Item(Global): Report Size, data= [ 0x01 ] 1
            Item(Global): Usage Page, data= [ 0x08 ] 8
                            LEDs
            Item(Local ): Usage Minimum, data= [ 0x01 ] 1
                            NumLock
            Item(Local ): Usage Maximum, data= [ 0x05 ] 5
                            Kana
            Item(Main  ): Output, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report Count, data= [ 0x01 ] 1
            Item(Global): Report Size, data= [ 0x03 ] 3
            Item(Main  ): Output, data= [ 0x01 ] 1
                            Constant Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report Count, data= [ 0x06 ] 6
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0x8b 0x00 ] 139
            Item(Global): Usage Page, data= [ 0x07 ] 7
                            Keyboard
            Item(Local ): Usage Minimum, data= [ 0x00 ] 0
                            No Event
            Item(Local ): Usage Maximum, data= [ 0x8b ] 139
                            International 5 (PC98)
            Item(Main  ): Input, data= [ 0x00 ] 0
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Main  ): End Collection, data=none
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
Device Status:     0x0002
  (Bus Powered)
  Remote Wakeup Enabled

Both keyboards should be HID BOOT compatible, I think.

So it would be cool if you could give me some hints on where and how to debug this. Thanks.

Best,
stepardo

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #223 on: Fri, 03 February 2017, 07:29:37 »
xauser, stepardo,
Thanks for the info. Seems to me those keyboards should work with the converter judging from looking the descriptors. Something goes wrong in enumeration or somewhere else. I don't have any clear idea at this point. I'll have to check recent updates of USB Host Shield Library and learn its API thoroughly again.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline stepardo

  • Posts: 4
Re: USB to USB keyboard converter
« Reply #224 on: Fri, 03 February 2017, 15:15:55 »
I investigated further.

So both keyboards are successfully enumerated and HIDBoot<BOOT_PROTOCOL>::Init runs through to the end where it enabled polling. However, in HIDBOOT::Poll, pUsb->inTransfer always returns hrNAK, which means the keyboards tells us that there is no data.

One of the keyboards works if I do not call SetIdle in Init.

Now I will have to read some more about USB to get further with this, or do you have any idea what could go wrong?

A note about the Kinesis Advantage 2: If it insists on using an EP > 0 for HIB_BOOT, then this is a bug because HID_BOOT specifies EP0. But I haven't tested it because I don't have the keyboard here.

Offline stepardo

  • Posts: 4
Re: USB to USB keyboard converter
« Reply #225 on: Sun, 05 February 2017, 12:35:07 »
Update on my investigations.

So one keyboard that is not working sets lowspeed = false, which is different from all the keyboards that work. I have no idea why that could be a problem though.

Secondly, I could get the GMK keyboard to work reliably by increasing bInterval to 15 milliseconds (the board requests 10).

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #226 on: Mon, 06 February 2017, 18:41:07 »
Update on my investigations.

So one keyboard that is not working sets lowspeed = false, which is different from all the keyboards that work. I have no idea why that could be a problem though.

Secondly, I could get the GMK keyboard to work reliably by increasing bInterval to 15 milliseconds (the board requests 10).

Thank you for your investigations.

I updated repository onto the latest library in this test branch. Could you try this and see if there is any difference?
https://github.com/tmk/tmk_keyboard/tree/usbhostlib_update
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline stepardo

  • Posts: 4
Re: USB to USB keyboard converter
« Reply #227 on: Tue, 07 February 2017, 02:16:07 »
Hi Hasu,

thank you for updating the shield lib. I tested it immediately.

I have good and bad news. The good: The keyboards that previously worked still work. The bad: The non-working keyboards remain not working.

Best, Steffen

Offline fine_italian_leather

  • Posts: 104
  • Location: Sweden
Re: USB to USB keyboard converter
« Reply #228 on: Thu, 09 March 2017, 18:28:25 »
Got the converter today and flashed my keymap onto it, was very easy to get started. Really happy with my purchase, thank you!

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #229 on: Sat, 25 March 2017, 20:12:17 »
I did some more tests with the connector and the fc660c and have some strange results. I've found a setup that gets the fc660c working.

I'm using a 50cm extension cable between usb3 port and the connector and that seems to help a lot.
Hitting keys on the keyboard during usb connect phase helps a lot.

Having the adapter with keyboard directly connected to usb3 port without hitting any keys on usb connect results in a not working fc660c for me. I have no issues with an other keyboard I tested the other day.

I hope the converter gets more robust with further patches.



I got FC660C the other day and confirmed this weirdness on my PC with USB2 ports. I'll look into this later.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline moparisthebest

  • Posts: 4
Re: USB to USB keyboard converter
« Reply #230 on: Fri, 31 March 2017, 12:30:21 »
Has anyone tried to get this working with the new Teensy 3.6 ?

https://www.kickstarter.com/projects/paulstoffregen/teensy-35-and-36/description

It has a USB host port built-in, so that should *just work* without additional components right?  I just got one in the mail, just have to solder the USB leads on and I can start playing with it.

Much later, as of today, the usb host library with I quote "preliminary keyboard support" has been released for the teensy 3.6:

https://www.pjrc.com/teensy/td_download.html

Hopefully that's one step closer to tmk running on this. :)

Online clorex

  • Posts: 22
Re: USB to USB keyboard converter
« Reply #231 on: Sun, 30 April 2017, 06:19:14 »
I did some more tests with the connector and the fc660c and have some strange results. I've found a setup that gets the fc660c working.

I'm using a 50cm extension cable between usb3 port and the connector and that seems to help a lot.
Hitting keys on the keyboard during usb connect phase helps a lot.

Having the adapter with keyboard directly connected to usb3 port without hitting any keys on usb connect results in a not working fc660c for me. I have no issues with an other keyboard I tested the other day.

I hope the converter gets more robust with further patches.



I got FC660C the other day and confirmed this weirdness on my PC with USB2 ports. I'll look into this later.


Did you ever manage to get the FC660C to work with the USB-USB Converter? I was going to order this Converter to use with my 660C, instead of the new Alt Controller, so as to tide me over while I wait for a possible bluetooth version of the controller.
« Last Edit: Sun, 30 April 2017, 06:21:30 by clorex »

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #232 on: Sun, 30 April 2017, 06:41:23 »
I have not had time to look into this problem yet.

Tapatalk を使用して私の Nexus 5 から送信

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline tofgerl

  • Posts: 880
  • Location: Norway
Re: USB to USB keyboard converter
« Reply #233 on: Sun, 30 April 2017, 14:27:03 »
So my USB_USB converter won't work with my Realforce RGB if I plug the keyboard into the converter before I plug the converter into the laptop.

It's really just an issue because I have the keyboard and converter plugged into a USB Hub at work, so this means I have to first plug the hub into my computer, then nothing works because I'm sleepy and have forgotten about the problem... Then I have to pull the converter out, pull the keyboard out, and then plug everything in the right way.

Is this a known issue? Is there a workaround besides my very manual workaround?

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #234 on: Sun, 30 April 2017, 17:38:19 »
So my USB_USB converter won't work with my Realforce RGB if I plug the keyboard into the converter before I plug the converter into the laptop.

It's really just an issue because I have the keyboard and converter plugged into a USB Hub at work, so this means I have to first plug the hub into my computer, then nothing works because I'm sleepy and have forgotten about the problem... Then I have to pull the converter out, pull the keyboard out, and then plug everything in the right way.

Is this a known issue? Is there a workaround besides my very manual workaround?


It sounds to me like rush current or temporary low voltage of power due to the keyboard drawing relatively much current at plugin. And it will delay starupt of chips on converters and may prevent USB emumeration process.

Chaning value of capacitors on converter may help or it may be possible to circumvent with firmware but not sure.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline tofgerl

  • Posts: 880
  • Location: Norway
Re: USB to USB keyboard converter
« Reply #235 on: Mon, 01 May 2017, 08:48:01 »
I assume it does grab a lot of power, though I never use the RGB lighting. Unfortunately it's an adapter I bought from you, so I wouldn't even know how to change out the parts...

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #236 on: Mon, 01 May 2017, 16:22:51 »
I'm not sure if changing caps resolves the problem, perhaps fixing firmware may be needed.
I would try changing these two capacitors below if rush current is one of culprits.
1) right one of 1uF capacitors(1608metric size) on bottom side and


2) 4.7uF capacitor(3216metric size) on top side.


You will have to try conbination of some values like 1u, 4.7u, 10u or more.
I would try combinations below to see if the problem changes.
1) 4.7u and  2) 4.7u
1) 10u  and  2) 4.7u
1) 10u  and  2) 10u
1) 1u    and  2) 22u
1) 1u    and  2) 10u
1) 1u    and  2) 1u

EDIT: fixed the combinations.
« Last Edit: Mon, 01 May 2017, 21:10:34 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline apanzerj

  • Posts: 6
Re: USB to USB keyboard converter
« Reply #237 on: Mon, 01 May 2017, 18:31:39 »
QQ: I'm thinking I might be able to use the hid_listen executable as a template so I can build a driver that would tell me what layer I am on (or what layers are active). Is there anything already like this? If there isn't, is there a better to communicate between the host and the keyboard besides print messages? My thought was to just send print messages with current layer status and other stuff.

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #238 on: Mon, 01 May 2017, 19:15:23 »
Yes, it is possible to convey currently layer to host with current implementaion, you will be able to modify hid_listen. With current firmware it is oneway communication of keyboard to host but I think you can extend it to both way. Or virtual serial communication is another option as other firmwares like kiibohd uses.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline tofgerl

  • Posts: 880
  • Location: Norway
Re: USB to USB keyboard converter
« Reply #239 on: Tue, 02 May 2017, 03:35:01 »
I'm not sure if changing caps resolves the problem, perhaps fixing firmware may be needed.
I would try changing these two capacitors below if rush current is one of culprits.


EDIT: fixed the combinations.
Sorry, that's greek to me :)
It's not that big of an issue, I'll try to update the firmware in a few months and see if that changes anything...

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #240 on: Wed, 10 May 2017, 11:18:28 »
I did some more tests with the connector and the fc660c and have some strange results. I've found a setup that gets the fc660c working.

I'm using a 50cm extension cable between usb3 port and the connector and that seems to help a lot.
Hitting keys on the keyboard during usb connect phase helps a lot.

Having the adapter with keyboard directly connected to usb3 port without hitting any keys on usb connect results in a not working fc660c for me. I have no issues with an other keyboard I tested the other day.

I hope the converter gets more robust with further patches.



I got FC660C the other day and confirmed this weirdness on my PC with USB2 ports. I'll look into this later.

Fixed at this commit: https://github.com/tmk/tmk_keyboard/commit/3eae475f8b98152b466f8f3763a74f0ef2330d9d and update keymap editor.
FC660C seems to boot up quickly at early stage comparing to other keyboards and converter missed it at enumeration. Removed delay code from converter startup code.
Now the converter works well with FC660C.

tofgerl, new firmware may work with your Realforce RGB,  give it a try!
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline tofgerl

  • Posts: 880
  • Location: Norway
Re: USB to USB keyboard converter
« Reply #241 on: Wed, 10 May 2017, 13:34:27 »
I will!

Offline spacemonkey001

  • Posts: 5
Re: USB to USB keyboard converter
« Reply #242 on: Fri, 12 May 2017, 13:11:44 »
Is it possible to run QMK on this converter?

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #243 on: Fri, 12 May 2017, 14:27:25 »
Is it possible to run QMK on this converter?

I think so. I find no reason why it is not possible.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline tofgerl

  • Posts: 880
  • Location: Norway
Re: USB to USB keyboard converter
« Reply #244 on: Mon, 15 May 2017, 12:27:35 »
tofgerl, new firmware may work with your Realforce RGB,  give it a try!

No, didn't work...

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #245 on: Mon, 15 May 2017, 20:17:46 »
tofgerl, new firmware may work with your Realforce RGB,  give it a try!

No, didn't work...

hmm,  it smells like its NKRO or USB interface for configuration causes :(

Can you post USB descriptors of the keyboard?
https://github.com/tmk/tmk_keyboard/wiki/HID-Report-Descriptor

its price is going down fairly threse recent days here, it is time to get one finally :D
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline xauser

  • Posts: 96
Re: USB to USB keyboard converter
« Reply #246 on: Tue, 16 May 2017, 12:51:45 »
fc660c works now with latest tmk changes.

Thanks hasu!

Offline tofgerl

  • Posts: 880
  • Location: Norway
Re: USB to USB keyboard converter
« Reply #247 on: Tue, 16 May 2017, 14:16:23 »
tofgerl, new firmware may work with your Realforce RGB,  give it a try!

No, didn't work...

hmm,  it smells like its NKRO or USB interface for configuration causes :(

Can you post USB descriptors of the keyboard?
https://github.com/tmk/tmk_keyboard/wiki/HID-Report-Descriptor

its price is going down fairly threse recent days here, it is time to get one finally :D
It'll have to wait a couple of days, bank holiday tomorrow.

Yeah, it's the best keyboard I've ever owned, with one minor exception: RGB :)

Offline UncleGary

  • Posts: 9
Re: USB to USB keyboard converter
« Reply #248 on: Fri, 26 May 2017, 23:46:05 »
I have a JS realforce that I love but don't really use because it's not programmable. If I use one of these USB to USB converters, I can just pass it through and use a TMK keymap?

Offline hasu

  • Thread Starter
  • Posts: 2726
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #249 on: Fri, 26 May 2017, 23:48:28 »
I have a JS realforce that I love but don't really use because it's not programmable. If I use one of these USB to USB converters, I can just pass it through and use a TMK keymap?

Hi,
What is JS realforce? can you post a link or something?
If it is a classic normal Realforce I thinik it works with the converter.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt