Difference between revisions of "UNI-T UT61D/Info"
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
Uwe Hermann (talk | contribs)  (lsusb)  | 
				Uwe Hermann (talk | contribs)   (Fix bogus HID parts of the lsusb.)  | 
				||
| Line 1: | Line 1: | ||
== How to get a proper lsusb ==  | |||
As [http://erste.de/UT61/index.html documented by Ralf Burger] the [[Multimeter_cables#UNI-T_UT-D04|UT-D04]] USBHID-to-serial cable (at least the one with WCH CH9325 chip) that comes with the UT61D multimeter has some issues on Linux. Apparently you need to [http://www.lesswatts.org/projects/devices-power-management/usb.php put it into a (auto)suspend first], before you can properly use it.  | |||
Here's a script (written by Ralf Burger) which you can run before using the chip and/or doing an lsusb:  | |||
<small>  | |||
 $ '''cat suspend.HE2325U.sh'''  | |||
 #!/bin/bash  | |||
 for dat in /sys/bus/usb/devices/*; do  | |||
   if test -e $dat/manufacturer; then  | |||
     grep "WCH.CN" $dat/manufacturer > /dev/null && echo auto > ${dat}/power/level && echo 0 > ${dat}/power/autosuspend  | |||
   fi  | |||
 done  | |||
</small>  | |||
== lsusb ==  | == lsusb ==  | ||
| Line 5: | Line 21: | ||
<small>  | <small>  | ||
  $ '''lsusb -vvv'''  |   $ '''lsusb -vvv'''  | ||
  Bus 003 Device   |   Bus 003 Device 023: ID '''1a86:e008 QinHeng Electronics HID-based serial adapater'''  | ||
  Device Descriptor:  |   Device Descriptor:  | ||
    bLength                18  |     bLength                18  | ||
| Line 17: | Line 33: | ||
    idProduct          0xe008 '''HID-based serial adapater'''  |     idProduct          0xe008 '''HID-based serial adapater'''  | ||
    bcdDevice           11.00  |     bcdDevice           11.00  | ||
    iManufacturer           1    |     iManufacturer           1 '''WCH.CN �'''  | ||
    iProduct                2    |     iProduct                2 '''USB to Serial'''  | ||
    iSerial                 0    |     iSerial                 0    | ||
    bNumConfigurations      1  |     bNumConfigurations      1  | ||
| Line 38: | Line 54: | ||
        bNumEndpoints           2  |         bNumEndpoints           2  | ||
        bInterfaceClass         3 '''Human Interface Device'''  |         bInterfaceClass         3 '''Human Interface Device'''  | ||
        bInterfaceSubClass      0 No Subclass  |         bInterfaceSubClass      0 '''No Subclass'''  | ||
        bInterfaceProtocol      0 None  |         bInterfaceProtocol      0 '''None'''  | ||
        iInterface              0    |         iInterface              0    | ||
          HID Device Descriptor:  |           HID Device Descriptor:  | ||
| Line 49: | Line 65: | ||
            bDescriptorType        34 Report  |             bDescriptorType        34 Report  | ||
            wDescriptorLength      37  |             wDescriptorLength      37  | ||
            Report Descriptor: (length is   |             Report Descriptor: (length is 37)  | ||
              Item(  |               Item(Global): Usage Page, data= [ 0xa0 0xff ] 65440  | ||
                             (null)  | |||
              Item(  |               Item(Local ): Usage, data= [ 0x01 ] 1  | ||
                             (null)  | |||
              Item(Main  ):   |               Item(Main  ): Collection, data= [ 0x01 ] 1  | ||
              Item(  |                              Application  | ||
              Item(Local ): Usage, data= [ 0x01 ] 1  | |||
              Item(  |                              (null)  | ||
              Item(  |               Item(Global): Logical Minimum, data= [ 0x00 ] 0  | ||
              Item(  |               Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255  | ||
              Item(  |               Item(Global): Report Size, data= [ 0x08 ] '''8'''  | ||
              Item(Main  ):   |               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(Local ): Usage, data= [ 0x02 ] 2  | |||
              Item(Local ):   |                              (null)  | ||
              Item(Global): Report Size, data= [ 0x08 ] '''8'''  | |||
              Item(Global): Report Count, data= [ 0x08 ] '''8'''  | |||
              Item(  |               Item(Main  ): '''Output''', data= [ 0x02 ] 2  | ||
              Item(  |                              Data Variable Absolute No_Wrap Linear  | ||
              Item(Main  ):   |                              Preferred_State No_Null_Position Non_Volatile Bitfield  | ||
              Item(Local ): Usage, data= [ 0x03 ] 3  | |||
              Item(  |                              (null)  | ||
              Item(Global): Report Size, data= [ 0x08 ] '''8'''  | |||
              Item(  |               Item(Global): Report Count, data= [ 0x05 ] '''5'''  | ||
              Item(  |               Item(Main  ): '''Feature''', data= [ 0x02 ] 2  | ||
              Item(Main  ):   |                              Data Variable Absolute No_Wrap Linear  | ||
                             Preferred_State No_Null_Position Non_Volatile Bitfield  | |||
              Item(Main  ): End Collection, data=none  | |||
              Item(Main  ):   | |||
        Endpoint Descriptor:  |         Endpoint Descriptor:  | ||
          bLength                 7  |           bLength                 7  | ||
          bDescriptorType         5  |           bDescriptorType         5  | ||
          bEndpointAddress     0x82  EP 2 IN  |           bEndpointAddress     0x82  '''EP 2 IN'''  | ||
          bmAttributes            3  |           bmAttributes            3  | ||
            Transfer Type            Interrupt  |             Transfer Type            '''Interrupt'''  | ||
            Synch Type               None  |             Synch Type               None  | ||
            Usage Type               Data  |             Usage Type               Data  | ||
| Line 95: | Line 109: | ||
          bLength                 7  |           bLength                 7  | ||
          bDescriptorType         5  |           bDescriptorType         5  | ||
          bEndpointAddress     0x02  EP 2 OUT  |           bEndpointAddress     0x02  '''EP 2 OUT'''  | ||
          bmAttributes            3  |           bmAttributes            3  | ||
            Transfer Type            Interrupt  |             Transfer Type            '''Interrupt'''  | ||
            Synch Type               None  |             Synch Type               None  | ||
            Usage Type               Data  |             Usage Type               Data  | ||
          wMaxPacketSize     0x0008  1x 8 bytes  |           wMaxPacketSize     0x0008  1x 8 bytes  | ||
          bInterval               5  |           bInterval               5  | ||
  Device Status:       |   Device Status:     0x0000  | ||
    (Bus Powered)  |     (Bus Powered)  | ||
</small>  | </small>  | ||
Revision as of 13:24, 9 September 2012
How to get a proper lsusb
As documented by Ralf Burger the UT-D04 USBHID-to-serial cable (at least the one with WCH CH9325 chip) that comes with the UT61D multimeter has some issues on Linux. Apparently you need to put it into a (auto)suspend first, before you can properly use it.
Here's a script (written by Ralf Burger) which you can run before using the chip and/or doing an lsusb:
$ cat suspend.HE2325U.sh
#!/bin/bash
for dat in /sys/bus/usb/devices/*; do
  if test -e $dat/manufacturer; then
    grep "WCH.CN" $dat/manufacturer > /dev/null && echo auto > ${dat}/power/level && echo 0 > ${dat}/power/autosuspend
  fi
done
lsusb
This is the lsusb ouput on Linux:
$ lsusb -vvv
Bus 003 Device 023: ID 1a86:e008 QinHeng Electronics HID-based serial adapater
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x1a86 QinHeng Electronics
  idProduct          0xe008 HID-based serial adapater
  bcdDevice           11.00
  iManufacturer           1 WCH.CN �
  iProduct                2 USB to Serial
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 
    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 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      37
          Report Descriptor: (length is 37)
            Item(Global): Usage Page, data= [ 0xa0 0xff ] 65440
                            (null)
            Item(Local ): Usage, data= [ 0x01 ] 1
                            (null)
            Item(Main  ): Collection, data= [ 0x01 ] 1
                            Application
            Item(Local ): Usage, data= [ 0x01 ] 1
                            (null)
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            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(Local ): Usage, data= [ 0x02 ] 2
                            (null)
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x08 ] 8
            Item(Main  ): Output, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Local ): Usage, data= [ 0x03 ] 3
                            (null)
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x05 ] 5
            Item(Main  ): Feature, data= [ 0x02 ] 2
                            Data Variable 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     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               5
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               5
Device Status:     0x0000
  (Bus Powered)