UrbanskiDawid / usb2lin06-HID-in-linux-for-LINAK-Desk-Control-Cable

Basic functionality of usb2lin06 device implemented for use in linux
40 stars 11 forks source link

Cannot get it to work. #3

Closed Biont closed 7 years ago

Biont commented 7 years ago

Hello.

Thank you so much for creating this tool. I cannot get it to work, though. The tool does not seem to successfully communicate with my cable/table:

It compiled without issues and all commands do something, but it seems there is no data sent or received.

# ./example-moveTo 6000
current height:     0 target height:  6000 distance:    0
current height:     0 target height:  6000 distance:    0
current height:     0 target height:  6000 distance:    0
failed
# ./example-getStatus 10 2.0
14:03:33:095 [01/10]  header:3804 u1:0000 H:0000 moveDir:00 mi:00 targetHeight:0000 u5:000000 key:0000 u8:00    ?? STOP  height:     0 =   0.0cm
14:03:35:095 [02/10]  header:3804 u1:0000 H:0000 moveDir:00 mi:00 targetHeight:0000 u5:000000 key:0000 u8:00    ?? STOP  height:     0 =   0.0cm
14:03:37:096 [03/10]  header:3804 u1:0000 H:0000 moveDir:00 mi:00 targetHeight:0000 u5:000000 key:0000 u8:00    ?? STOP  height:     0 =   0.0cm
# ./example-getHeight
current height: 0.0cm

If it helps, this is the output of lsusb -v -d 12d3:0002

# lsusb -v -d 12d3:0002

Bus 002 Device 004: ID 12d3:0002  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00                                                                  
  bDeviceClass            0                                                                  
  bDeviceSubClass         0                                                                  
  bDeviceProtocol         0                                                                  
  bMaxPacketSize0        64                                                                  
  idVendor           0x12d3                                                                  
  idProduct          0x0002                                                                  
  bcdDevice            1.66                                                                  
  iManufacturer           1 Linak DeskLine A/S
  iProduct                2 USB Control Link
  iSerial                 3 Љ
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          1 Linak DeskLine A/S
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              3 Љ
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     217
          Report Descriptor: (length is 217)
            Item(Global): Usage Page, data= [ 0x00 0xff ] 65280
                            (null)
            Item(Local ): Usage, data= [ 0x01 ] 1
                            (null)
            Item(Main  ): Collection, data= [ 0x01 ] 1
                            Application
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x08 ] 8
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0xff ] 65535
            Item(Global): Unit, data= [ 0x11 ] 17
                            System: SI Linear, Unit: Centimeter
            Item(Global): Unit Exponent, data= [ 0x0e ] 14
                            Unit Exponent: 14
            Item(Global): Report Size, data= [ 0x10 ] 16
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x02 ] 2
                            (null)
            Item(Main  ): Input, data= [ 0x22 ] 34
                            Data Variable Absolute No_Wrap Linear
                            No_Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x07 ] 7
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x04 ] 4
                            (null)
            Item(Main  ): Output, data= [ 0x80 ] 128
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x06 ] 6
            Item(Global): Logical Minimum, data= [ 0x01 ] 1
            Item(Global): Logical Maximum, data= [ 0xff ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x03 ] 3
                            (null)
            Item(Main  ): Output, data= [ 0x80 ] 128
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x02 ] 2
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Feature, data= [ 0x80 ] 128
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x01 ] 1
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Feature, data= [ 0x80 ] 128
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x03 ] 3
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Feature, data= [ 0x80 ] 128
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x04 ] 4
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Feature, data= [ 0x80 ] 128
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x05 ] 5
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Feature, data= [ 0x80 ] 128
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x06 ] 6
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Feature, data= [ 0x80 ] 128
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x07 ] 7
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Feature, data= [ 0x80 ] 128
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x08 ] 8
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Feature, data= [ 0x80 ] 128
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile Bitfield
            Item(Main  ): End Collection, data=none
            Item(Main  ): Collection, data= [ 0x03 ] 3
                            Report
            Item(Global): Report ID, data= [ 0x09 ] 9
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x00 ] 0
                            (null)
            Item(Main  ): Feature, data= [ 0x80 ] 128
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Volatile Bitfield
            Item(Main  ): End Collection, data=none
            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     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered

Do you have any tips on how to get it to work?

Biont commented 7 years ago

Just to make sure, I tested the official software on a Windows setup and that worked.

UrbanskiDawid commented 7 years ago

thanks for this issue/report! I think I know what's causing this problem and I will investigate it

Biont commented 7 years ago

Thanks! Let me know if I can provide further information

UrbanskiDawid commented 7 years ago

fixed, please check it out and let me know if this resolves your issue

Biont commented 7 years ago

It works beautifully now. This is so awesome, thank you.

I've been working on a GUI and can now start wiring it up