[Nut-upsdev] megatec over USB - new driver patch

Andrey Lelikov nut-driver at lelik.org
Tue Dec 5 17:07:12 CET 2006


Peter Selinger wrote:
> Hi Andrey,
>
> thanks for your reverse-engineering efforts! Could you please post the
> HID descriptor from this device? What is the OEM mechanism that you
> discovered? It would be nice if you could document the serial-over-USB
> protocol used.
>
> We have in the past seen several different USB devices that were not
> proper HID devices, and at least one of them (the Krauler) seemed to
> speak a USB-to-serial version of the megatec protocol. They all had
> (almost) identical HID descriptors. So far none of them are supported
> by NUT, but there is a good chance that your driver can support them,
> if the OEM hack is indeed the same. The devices are:
>
> * Krauler UP-M500VA (see Alexander I. Gordeev's thread on nut-upsdev,
>   November 2006)
> * Ablerex 625L (see Lau Kim Ping's thread on nut-upsuser, October 2006)
> * Atlantis-Land S1501 (made by Ablerex) (see ngpost1's threads on
>   nut-upsuser and nut-upsdev, December 2005)
> * Belkin F6H500ukUNV (made by MEC?) (see the thread by meherenow,
>   spamwhole, and Robert Kent on nut-upsdev, September 2006)
>
> I suspect that all of these devices use the same hardware and
> protocol. If your OEM mechanism is the same as the Krauler's, then we
> should distribute your driver to the owners of the above devices and
> see if they get it to work. It would be great if this family of
> devices could be supported. 
>
> -- Peter
>
> P.S. accommodating your driver in Makefile.am is not a big problem.
> Several drivers already have specialized LDADD variables, including
> all of the USB drivers (which don't link against serial.o).
>
>   
descriptor is below. it is possible to dump report descriptor, but it is 
all junk.  short protocol description is at the bottom of  megatec_usb.c 
- basically exchange is via 8-byte hid reports (i believe converter just 
eats everything on control pipe and sends everything into interrupt 
pipe). data always comes in as 6 8-byte packets (limiting received 
string to 48 chars). windows driver sends only single-report packets 
limiting string len to 8 chars. commands used by windows driver are: Q1 
I F T TL C CT P . "P" command is actually usage of megatec protocol echo 
feature - it is used to synchronize and flush any buffered input on startup.


Bus 002 Device 002: ID 05b8:0000 Agiler, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x05b8 Agiler, Inc.
  idProduct          0x0000
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 UPS
  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 Devices
      bInterfaceSubClass      1 Boot Interface 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      52
         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)




More information about the Nut-upsdev mailing list