keyboard driver problem?

From: ti bugmenot <ti.bugmenot_at_gmail.com>
Date: Fri, 1 Jul 2011 17:21:35 +0600
I met with the same problem. I do not know how to solve this problem:

http://lists.freebsd.org/pipermail/freebsd-current/2011-January/022022.html


% uname -a

FreeBSD td.local 9.0-CURRENT FreeBSD 9.0-CURRENT #3 r223706M: Fri Jul
1 16:50:12 YEKT 2011     root_at_td.local:/usr/obj/usr/src/sys/TI  amd64



% dmesg

ugen5.2: <A4Tech> at usbus5
ugen6.2: <A4TECH> at usbus6
ukbd0: <A4Tech RF USB Receiver, class 0/0, rev 1.10/0.01, addr 2> on usbus5
kbd2 at ukbd0
ukbd2: <A4TECH USB Device, class 0/0, rev 1.10/1.02, addr 2> on usbus6
ums0: <A4Tech RF USB Receiver, class 0/0, rev 1.10/0.01, addr 2> on usbus5
kbd3 at ukbd2
ums0: 8 buttons and [XYZT] coordinates ID=1
ums1: <A4TECH USB Device, class 0/0, rev 1.10/1.02, addr 2> on usbus6
ums1: 16 buttons and [XYZT] coordinates ID=0



% usbconfig -u 6 -a 2 dump_device_desc dump_curr_config_desc

ugen6.2: <USB Device A4TECH> at usbus6, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0110
  bDeviceClass = 0x0000
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0008
  idVendor = 0x09da
  idProduct = 0x054f
  bcdDevice = 0x0102
  iManufacturer = 0x0001  <A4TECH>
  iProduct = 0x0002  <USB Device>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001


 Configuration index 0

    bLength = 0x0009
    bDescriptorType = 0x0002
    wTotalLength = 0x003b
    bNumInterfaces = 0x0002
    bConfigurationValue = 0x0001
    iConfiguration = 0x0000  <no string>
    bmAttributes = 0x00a0
    bMaxPower = 0x0032

    Interface 0
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0000
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x0003
      bInterfaceSubClass = 0x0001
      bInterfaceProtocol = 0x0001
      iInterface = 0x0000  <no string>

      Additional Descriptor

      bLength = 0x09
      bDescriptorType = 0x21
      bDescriptorSubType = 0x11
       RAW dump:
       0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x84,
       0x08 | 0x00

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x000c
        bInterval = 0x0001
        bRefresh = 0x0000
        bSynchAddress = 0x0000


    Interface 1
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0001
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x0003
      bInterfaceSubClass = 0x0001
      bInterfaceProtocol = 0x0002
      iInterface = 0x0000  <no string>

      Additional Descriptor

      bLength = 0x09
      bDescriptorType = 0x21
      bDescriptorSubType = 0x11
       RAW dump:
       0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x57,
       0x08 | 0x00

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0082  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0008
        bInterval = 0x0001
        bRefresh = 0x0000
        bSynchAddress = 0x0000


----------

Not work:

#define UKBD_NKEYCODE                 8


----------

Not work:

                if (sc->sc_kbd_id != 0) {
                        /* check and remove HID ID byte */
                        usbd_copy_out(pc, 0, &id, 1);
                        if (id != sc->sc_kbd_id) {
                                DPRINTF("wrong HID ID\n");
                                goto tr_setup;
                        }
                        offset = 1;
                        len--;
                } else {
                        offset = 0;
                }

+	if (len == 12) {
+		offset += 2;
+		len -= 2;
+	}
+	if (len == 11) {
+		offset += 1;
+		len -= 1;
+	}
Received on Fri Jul 01 2011 - 09:52:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:15 UTC