[Nut-upsdev] Adding drivers to NUT?
Daniele Pezzini
hyouko at gmail.com
Sat Jul 28 23:50:28 BST 2018
> The problem with "blazer_usb" driver ("blazer_ser" works correctly) is
> related to the following commands:
>
> - "F" and "I": when the KRAULER subdriver check these UPS answers it uses
> wrong constants to check the lenght of the received packets, so these
> commands are considered as "not available" by NUT. In particular, without
> the availability of the "F" command, is not possible for NUT to calculate
> the battery capacity level. In my opinion this is a problem of the driver,
> because our UPSs respect the communication protocol document from Megatec
> and also because the blazer_ser works fine. We have tested different UPSs
> models but the problem is the same.
OK, if, as I am inclined to think, the cause is simply the lack of the
closing CR, once the GitHub issue I mentioned before is fixed, these
problems should disappear in nutdrv_qx (while we could easily apply
the same set of changes to blazer_usb, or change the expected length
to not consider the closing CR, I don't want to touch it right now, as
it already works with USB devices that don't terminate the Q1 reply
with a CR and these other things are not critical, and I want to keep
an easy way for users to get back to the current working behaviour,
just in case...).
Please, try nutdrv_qx from this branch:
https://github.com/zykh/nut/tree/issue-441
A log of the driver started with a debug level of 5 would be useful.
> - "Q1": in this case the problem is only relative to the debug mode ("short
> answer"); in normal mode it works correctly.
Are you sure blazer_usb complains in debug mode even with the Q1
reply? What version are you using? Because, unless the USB read fails,
it shouldn't, if the reply only lacks the closing CR...
This should only be a problem with nutdrv_qx (and it should now be
fixed in the branch I just linked).
> - "battery.voltage high/low: the values used in the formula are not correct,
> indipendently by the UPS used.
Can you elaborate a bit more on this one?
Do you have any suggestion on how to improve our calculations?
More information about the Nut-upsdev
mailing list