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

0 Members and 1 Guest 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: 2217
  • 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.
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

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: 2217
  • 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.
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline 00zeRO

  • mechanicalkeyboards.com
  • * Commercial Vendor
  • Posts: 2876
  • 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: BIVOUAC-92 | Clear MX (found while prospecting in Vault 59)

Offline hasu

  • Thread Starter
  • Posts: 2217
  • 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.
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline 00zeRO

  • mechanicalkeyboards.com
  • * Commercial Vendor
  • Posts: 2876
  • 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: BIVOUAC-92 | Clear MX (found while prospecting in Vault 59)

Offline hasu

  • Thread Starter
  • Posts: 2217
  • 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.
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline DreymaR

  • Posts: 290
  • 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: 2217
  • 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.
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline DreymaR

  • Posts: 290
  • 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

Online testplsignore

  • Posts: 66
  • 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 55g    HHKB BT & Type-S    Realforce RGB Hype-S    FC980C    FC660C    Filco BT TKL

Offline hasu

  • Thread Starter
  • Posts: 2217
  • 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.

⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Online testplsignore

  • Posts: 66
  • 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 55g    HHKB BT & Type-S    Realforce RGB Hype-S    FC980C    FC660C    Filco BT TKL

Offline tofgerl

  • Posts: 852
  • 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: 2217
  • 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
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline tofgerl

  • Posts: 852
  • 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: 84
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: 2217
  • 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

⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline xauser

  • Posts: 84
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: 84
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: 852
  • 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: 2217
  • 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.
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

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: 2217
  • 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
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

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

Online fine_italian_leather

  • Posts: 64
  • 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: 2217
  • 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.
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

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. :)