<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 03/29/2012 04:24 PM, Arnaud Quette wrote:
<blockquote
cite="mid:CAFm_bUhYpvDE9wCpJ_UdgobLNNvfLuYHQZ5GyHr5FbHms_4N1Q@mail.gmail.com"
type="cite"><br>
<div class="gmail_quote">2012/3/29 Joachim Schiele <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:js@lastlog.de">js@lastlog.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
hi,<br>
<br>
i own a aeg protect home (think it is a 600 VA) which has a
serial and an usb port.<br>
<br>
using this hack in ups.conf:<br>
 [bestupsname]<br>
   driver = bestups<br>
   port = /dev/ttyUSB0<br>
   ID = FOR,750,230,230,11.0,13.5<br>
   desc = "home-server"<br>
<br>
i start the driver with:<br>
 ./bestups -a bestupsname -D -q<br>
</blockquote>
<div><br>
the bestups driver is indeed part of the large "Q1 protocol"
family:<br>
<a moz-do-not-send="true"
href="https://alioth.debian.org/pm/task.php?func=detailtask&project_task_id=493&group_id=30602&group_project_id=318">https://alioth.debian.org/pm/task.php?func=detailtask&project_task_id=493&group_id=30602&group_project_id=318</a><br>
 </div>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
and after adding some debugging it seems to work (not yet in
production). i first started by looking at the protocol and it
is very very similar to <a moz-do-not-send="true"
href="http://www.networkupstols.org/ups-protocols/megatec.html"
target="_blank">www.networkupstols.org/ups-protocols/megatec.html</a>
at least protocol wise.<br>
</blockquote>
<div><br>
so the way to go is blazer_ser or blazer_usb<br>
 </div>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
but i have a few problems<br>
<br>
==== problem 1 ====<br>
using FOR is wrong as it then reports as a different device
than it actually is. should i add a new device string, say
APH?<br>
<br>
==== problem 2 ====<br>
i would like to use the usb protocol but i don't know where to
start.<br>
<br>
lsusb<br>
Bus 003 Device 003: ID 0665:5161 Cypress Semiconductor USB to
Serial<br>
</blockquote>
<div><br>
confirming blazer_usb support<br clear="all">
</div>
</div>
</blockquote>
<br>
both blazer_ser and blazer_usb seem to work although i had some
problems as i forgot to run, the command below, with the -u root
parameter. and because i forgot that i searched the wrong thing for
quite a while (udev rules):<br>
<br>
./blazer_usb -a blazer_usb -DDD -q<br>
 0.001342    Trying to match device<br>
  0.001348    Device matches<br>
  0.001356    failed to claim USB device: could not claim
interface 0: Operation not permitted<br>
  0.001363    failed to detach kernel driver from USB device:
could not detach kernel driver from interface 0: Operation not
permitted<br>
  0.001370    failed to claim USB device: could not claim
interface 0: Operation not permitted<br>
  0.001377    failed to detach kernel driver from USB device:
could not detach kernel driver from interface 0: Operation not
permitted<br>
  0.001383    failed to claim USB device: could not claim
interface 0: Operation not permitted<br>
  0.001389    failed to detach kernel driver from USB device:
could not detach kernel driver from interface 0: Operation not
permitted<br>
  0.001396    failed to claim USB device: could not claim
interface 0: Operation not permitted<br>
  0.001402    failed to detach kernel driver from USB device:
could not detach kernel driver from interface 0: Operation not
permitted<br>
  0.001408    Can't claim USB device [0665:5161]: could not detach
kernel driver from interface 0: Operation not permitted<br>
<br>
but then with -u root it worked:<br>
<br>
./blazer_usb -a blazer_usb -u root -DDD -q<br>
  ...<br>
  0.067478    Trying to match device<br>
  0.067484    Device matches<br>
  0.073450    Trying megatec protocol...<br>
  0.077431    send: Q1<br>
  0.432493    read: (237.2 237.2 233.6 004 49.9 13.5 25.0 00001001<br>
  0.432574    Status read in 1 tries<br>
  0.432581    Supported UPS detected with megatec protocol<br>
  0.436440    send: F<br>
  0.624780    read: #230.0 002 12.00 50.0<br>
  0.624819    Ratings read in 1 tries<br>
  0.628442    send: I<br>
<br>
thanks very much! i wonder if the UPS works with 'just' that!<br>
<br>
<blockquote
cite="mid:CAFm_bUhYpvDE9wCpJ_UdgobLNNvfLuYHQZ5GyHr5FbHms_4N1Q@mail.gmail.com"
type="cite"><br>
cheers,<br>
Arnaud<br>
-- <br>
Linux / Unix Expert R&D - Eaton - <a moz-do-not-send="true"
href="http://powerquality.eaton.com" target="_blank">http://powerquality.eaton.com</a><br>
Network UPS Tools (NUT) Project Leader - <a
moz-do-not-send="true" href="http://www.networkupstools.org/"
target="_blank">http://www.networkupstools.org/</a><br>
Debian Developer - <a moz-do-not-send="true"
href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>
Free Software Developer - <a moz-do-not-send="true"
href="http://arnaud.quette.free.fr/" target="_blank">http://arnaud.quette.free.fr/</a><br>
<br>
</blockquote>
<br>
</body>
</html>