[Nut-upsdev] serial/USB-over-HID layer for fentonups

Charles Lepple clepple at gmail.com
Wed Oct 5 01:31:37 UTC 2005


On 10/4/05, Pierre-Yves Aillet <pierreyves.aillet at free.fr> wrote:
> Do you know some piece of code I could look at to see learn more about
> this ?

The fentonups.c driver is here:

http://cvs.alioth.debian.org/cgi-bin/cvsweb.cgi/nut/drivers/fentonups.c?rev=1.1.1.1.8.2&content-type=text/x-cvsweb-markup&cvsroot=nut&only_with_tag=Development

Here's a little more Unitek Alpha USB info from the old NUT hidups
list (no longer available on the net?):

It really does look like the firmware designers just wrapped the
Fenton protocol in some HID transfers. This is good and bad. The bad
news is that I really dislike this form of protocol. The good news is
that it looks like you might be able to just change a few function
calls in the fentonups.c driver, and get something working quickly.

Here's a summary of what I saw in the log file:

<some setup junk>

PC -> UPS: "I\r\r"
UPS -> PC: "#Unitek Alph1200Sx A1  "

PC -> UPS: "F\r\r"
UPS-> PC: "#230.0 4.3 24.00"

PC -> UPS: "Q1\r\r"
UPS -> PC: "(230.0 230.0 302.0 002 50.0 28.6 32.0 00001000"

>From quickly skimming drivers/fentonups.c, it looks like the input
voltage is 230V, output is 302V (?), 2% load, 50 Hz, 28.6 Vbatt, 32°C,
and online. Let me know if any of these numbers sound wrong (besides
the 302V, unless this is some weird 3-phase unit).

Technically, this isn't a HID UPS, it's just a serial UPS with a silly
USB-to-serial converter in front of it. Therefore, libhid will be of
very limited value in this case (it'll just tell the kernel usbhid
driver to go away.) I'm somewhat curious if anyone has tried to write
a Linux kernel driver for this sort of USB-to-serial converter.

--
- Charles Lepple



More information about the Nut-upsdev mailing list