erjiang / usbscale

Reads weight data from USB scales.
GNU General Public License v3.0
90 stars 22 forks source link

PS-10USB doesn't work #9

Closed alexandr-kriptonov closed 9 years ago

alexandr-kriptonov commented 9 years ago

lsusb -v -d 04d9:8010

Bus 001 Device 010: ID 04d9:8010 Holtek Semiconductor, Inc. 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x04d9 Holtek Semiconductor, Inc.
  idProduct          0x8010 
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      53
         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

I'm added {0x04d9, 0x8010} to scales.h,

make

and run

sudo ./usbscale

and getting error

Error in USB transfer
erjiang commented 9 years ago

Can you try using the Perl script found here: https://gist.github.com/erjiang/503896

It accesses the device through the kernel-provided hidraw interface and doesn't use a whitelist.

alexandr-kriptonov commented 9 years ago

I'm trying perl script and it doesn't work :(

erjiang commented 9 years ago

Hard for me to debug but it's possible that this device does not use the standard protocol or has some other problem. Sorry that I don't know more about it.

alexandr-kriptonov commented 9 years ago

It' so bad. Your software is very attractive.