[Nut-upsdev] Add USB vendor/device id for Belkin F6C120-UNV
Jonathan Dion
dion.jonathan at gmail.com
Mon Aug 28 06:26:17 UTC 2006
Hi !
On 8/25/06, Peter Selinger <selinger at mathstat.dal.ca> wrote:
> Excellent, we did not have the ProductID for this device on file
> before. Jonathan will be happy :)
>
Yes indeed, really happy ^_^
> In continuation of a previous discussion about whether the newhidups
> subdrivers should accept all devices, or only known devices, I have
> changed the Belkin subdriver's claim function as follows:
>
> * accept all known UPS devices (currently 0980 and 0912)
> * reject all known non-UPS devices (currently 0218)
> * accept unknown devices if requested by the user via the '-x productid'
> option
> * otherwise, reject unknown devices (and print a debug message suggesting
> that the user try the '-x productid' option)
>
> Jonathan, do you think this behavior is an improvement? Accepting all
> unknown devices is not good, because it could include hubs. But
> rejecting all unknown devices is not good either (because it requires
> users to hack the source to get their unknown device to work). So
> allowing them to override it with the '-x productid' option seemed
> like a reasonable compromise.
>
> If you think this is a good idea, perhaps we should implement the same
> behavior for the other subdrivers as well (the tripplite subdriver
> already has something similar). -- Peter
I totaly agree for the idea to accept all known ID, reject all the
other but allow to force the use via an option.
I was thinking of an option to specify which sub-driver to force to
use, totally overriding the claim function.
But your idea seem nice too. I suppose that when the user specify the
-x productid, only the vendor ID is used to detemrine which sub driver
to use ?
As I don't think there will be often new vendor ID to be supported by
a sub-driver, and as vendorID is enough to determine the subdriver, it
can do the job !
The only hypothetical problem is if a product with the same productID
than the UPS but a diffrent VendorID that still is the VendorID of a
manufacterer making UPS claimed by a subdriver exist (low chances) and
the user has it on his computer (very low chances), then this device
will be mistaken for an UPS (if it come before the UPS in the list)
err, let me explain with an example : The UPS has as vendorID
BELKIN_ID, with product ID NEW_ID, that is not known by the sub driver
for the moment.
Another equip exist that has as vendorID V_ID and as productID also
NEW_ID, but that is not an UPS.
The vendor corresponding to V_ID also make USB UPS that are supported
by another sub-driver (with others productID).
then using -x productID NEW_ID could lead to mistake the other equip
for the UPS. But once more, what are the chances for that ?
Anyway, I think it is the safest way to automatically claim only known
UPS, automaticaly reject all other and has an option to force an UPS
to be supported
Jonathan Dion
More information about the Nut-upsdev
mailing list