[Nut-upsdev] Changes to usbhid-ups driver

Arjen de Korte nut+devel at de-korte.org
Mon Aug 27 18:49:06 UTC 2007


Peter,

What is your opinion on the following idea. I think we can improve the
matching a lot, by delaying the exact matcher to *after* parsing the
Report Descriptor and applying subdriver specific routines to get to the
  serial number, model and vendor names. By doing so, we would probably
get more accurate information on especially the serial number, since
this is located in non-standard locations for several subdrivers. If we
get a match, we could be sure that this is the same device and need not
DELCMD/DELINFO whatever we got already, but could simply update the
pointers to the parsed report descriptor (which is a lot lighter on the
load).

Another thing is that we could probably reject devices (also, depending
on whether a subdriver supports this) if they are not a UPS. We could
easily check for this in the HID tree. This in turn could mean that we
can be far less strict on matching the ProductID, since we could reject
devices that don't report themselves as a UPS or Powerdevice.

Any thoughts on this? Could this be worthwile to investigate further, or
am I missing something vital here?

Best regards, Arjen



More information about the Nut-upsdev mailing list