[Nut-upsdev] Re: [Nut-upsuser] Atlantis-Land UPS with Cypress CY7C63723 chip

Charles Lepple clepple at gmail.com
Tue Dec 13 16:41:17 UTC 2005


[please keep the list CC'd]

On 12/13/05, ngpost1 <ngpost1 at etitech.net> wrote:
> Charles,
>
>    Another question:
>
>    When I ran the  newhidups -DD.... test, there apparently was no
> communication with the UPS. Since I assume is talks with the Megatec
> protocol, I wanted to force the protocol in the command line.

As far as I know (and I am no expert on Megatec), we only support
Megatec protocol over "real serial links".

Because the device has descriptors which seem to indicate that it
supports the full HID Power Device Class specification, it most likely
does not support a fake RS-232 style serial stream. If it does, it is
probably hidden in some other configuration, and I don't know how we
would access it.

>    I read some docs, including the hid-subdrivers.txt. If I understand
> correctly, if the UPS is has a serial port (a real RS-232, not
> contacts), then you receive a stream of bytes from the UPS, which must
> be according to some sort of "protocol" (I'm intentionally leaving the
> reverse--commands sent from the PC to the UPS--for brevity). And you
> must account for all the quirks: one UPS may stream the data "in the
> blind", once every second; another might send a string of data only as a
> response from a command sent by the host, and so on. So we have to worry
> about how to get the data (commands etc.) and how to make sense of it.

Yes.

>    With HID, on the other hand, the way data flows from the device to
> the PC is standardized.

Standardized in a formal standard, but there is no "conformance test"
to ensure that everything is implemented according to the standard.

In particular, some HID devices do not properly respond to interrupt transfers.

> But we have to make sense of its variables (sort
> of a mib tree?).

Correct.

>    Am I off course with my understanding of the problem?
>
>    Concerning writing a subdriver:
>        1) I understand the newhidups -DD will dump "a number of lines
> [...] that describe the device's usage tree". So the structure of the
> usage tree is already probed (completely?) by newhidups.

There is nothing stopping a HID device from producing reports that are
not listed in the HID report descriptor, and there might be bugs in
either their descriptor, or our parser. But normally, the usage tree
represents everything the device can report (assuming it is not simply
using HID to wrap a serial stream).

>        2) I used a USB monitor program to see what was going on between
> my UPS and the UPSilon2000 program under windows. I saw some data and,
> if I remember correctly, also some cleartext commands (maybe shutdown,
> alarm buzzer on/off and the like). Am I going to need again this tool to
> reverse-engineer the data sent from the UPS (or the commands sent the
> other way)?

Possibly.

--
- Charles Lepple



More information about the Nut-upsdev mailing list