[Nut-upsuser] megatec_usb vs Mustek NetGuard / Ippon SmartWinner problem

Arjen de Korte nut+users at de-korte.org
Fri Feb 20 10:55:11 UTC 2009


Citeren Arnaud Quette <aquette.dev op gmail.com>:

> Alex, be sure to also address blazer_usb since it's the long run approach.

It will already work with this UPS. The problem is in the way how the  
phoenix subdriver in megatec_usb deals with reading data from the UPS.  
Currently, it reads data until it receives a timeout or the supplied  
buffer is full. This will work for most devices, but not all.

The proper way to do this (implemented in blazer_usb) is to read until either

- a read for an eight byte chunk of data times out (which is a timeout error)
- the number of requested characters is read
- a '\r' character is read (characters following this should be discarded)

Also note that currently reading partial data (less data was read than  
requested) is broken in megatec_usb. Especially Mustek devices often  
seem to return 7 characters, when we requested 8.

Best regards, Arjen
-- 
Please keep list traffic on the list




More information about the Nut-upsuser mailing list