<br><br><div class="gmail_quote">2012/3/29 Joachim Schiele <span dir="ltr"><<a 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">
<div bgcolor="#FFFFFF" text="#000000"><div class="im">
On 03/29/2012 04:24 PM, Arnaud Quette wrote:
<blockquote type="cite"><br>
<div class="gmail_quote">2012/3/29 Joachim Schiele <span dir="ltr"><<a href="mailto:js@lastlog.de" target="_blank">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 href="https://alioth.debian.org/pm/task.php?func=detailtask&project_task_id=493&group_id=30602&group_project_id=318" target="_blank">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 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></div>
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!</div></blockquote><div><br>to be complete enough, still in testing mode:<br>- start both the driver and upsd with "-u root"<br>- send back a more complete driver output (Ie, the answer to "I" is missing above)<br>
- send back outputs from upsc / upsrw / upscmd<br>- test the shutdown using (requires upsmon to be started too, as root):<br><a href="http://www.networkupstools.org/docs/user-manual.chunked/ar01s06.html#UPS_shutdown">http://www.networkupstools.org/docs/user-manual.chunked/ar01s06.html#UPS_shutdown</a> <br>
</div></div><br>I'm holding the commit of a new hardware compat list entry until you send these back.<br><br>cheers,<br clear="all">Arnaud<br>-- <br>Linux / Unix Expert R&D - Eaton - <a href="http://powerquality.eaton.com" target="_blank">http://powerquality.eaton.com</a><br>
Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/" target="_blank">http://www.networkupstools.org/</a><br>Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>
Free Software Developer - <a href="http://arnaud.quette.free.fr/" target="_blank">http://arnaud.quette.free.fr/</a><br><br>