[Nut-upsdev] NUT: new blazer_usb subdriver proposal

Arnaud Quette aquette.dev at gmail.com
Thu May 19 19:25:38 UTC 2011


salut la French Connection ;)

2011/5/17 trantore <quesoyjamon at aol.fr>

> Aurélien Grenotton <agrenott <at> gmail.com> writes:
>
> >
> > Hello,
> >
> > I've recently bought two cheap UPS
> (http://www.ldlc.com/fiche/PB00109242.html).
> > They're not supported natively by NUT (even though the monitoring
> > software is UPSilon from megatec).
> > After some investigation, they almost use the krauler-type
> > communication already supported in the blazer_usb driver. However, the
> > UPS won't reply if the language ID is not 0x4095...
> > Therefore, I cloned the krauler_command, adding the language ID and
> > unicode to ASCII conversion (taken from libusb). I also enhanced the
> > error!retry mechanism, as the UPS fails to reply quite often.
> >
> > Please see the attached patch file.
> >
> > Any comment would me more than welcome.
> >
> > Rgds,
> > Aurélien
> >
>
> Hi Aurélien!
>
> I'll try your patch... I'm very interested in a UPSilon replacement!
>
> Please, see my posts at:
> http://comments.gmane.org/gmane.comp.monitoring.nut.devel/5012
>
>
> I suggest two changes:
>
> 1) Rename the dialet from "ldlc" to "upsilon", as SEVERAL no-name UPS uses
> this
> (horrible) software.
>

valid

2) Add the USB ID "0001:0000" (vendorid=0001 productid=0000) to map directly
> "upsilon" in "blazer_usb"
>

no, this pair is already declared, and another reason for the below.

Finally, can someone accept the patch and can add it to the main branch?
>

no, sorry. but you'll get it fixed for 2.6.1 next week.

though I'm not familiar with this driver, there is a smarter and mandatory
way to solve this:
since this VID:PID couple is already bound to krauler, the way to go is to
use addvar()/getvar() and declare a new driver  variable ("upsilon" for
example).
then krauler_command() can switch using this between usb_get_string() and
usb_get_string_simple()...

@Arjen: your take on this?

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20110519/c141ccc5/attachment-0001.htm>


More information about the Nut-upsdev mailing list