<br><br><div class="gmail_quote">2012/8/10 Martyn Hill <span dir="ltr"><<a href="mailto:martyn.joseph.hill@gmail.com" target="_blank">martyn.joseph.hill@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 10/08/2012 21:58, <a href="mailto:nut-upsuser-request@lists.alioth.debian.org" target="_blank">nut-upsuser-request@lists.<u></u>alioth.debian.org</a> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Arnaud Quette<aquette.dev<at> <a href="http://gmail.com" target="_blank">gmail.com</a>> writes:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/6/3 Chris Rees<crees<at> <a href="http://freebsd.org" target="_blank">freebsd.org</a>>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
</blockquote>
Hi Chris,<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
After some research I've found that this device should run with the<br>
blazer_usb driver.<br>
<br>
Jun 3 16:15:38 pegasus kernel: ugen0.4:<vendor 0x0001> at usbus0<br>
Jun 3 16:15:38 pegasus kernel: uhid0:<vendor 0x0001 product 0x0000,<br>
class 0/0, rev 1.00/1.00, addr 4> on usbus0<br>
<br>
However, even after shoehorning it;<br>
<br>
[crees<at> pegasus]/usr/local/libexec/<u></u>nut% sudo ./blazer_usb -a zigor<br>
-DDDDDDDDD -x vendorid=0x0001 -x productid=0x0000 -x subdriver=krauler<br>
Password:<br>
Network UPS Tools - Megatec/Q1 protocol USB driver 0.04<br>
(2.6.3-Unversioned directory)<br>
0.000000 send_to_all: SETINFO driver.parameter.vendorid "0x0001"<br>
0.000013 send_to_all: SETINFO driver.parameter.productid "0x0000"<br>
0.000018 send_to_all: SETINFO driver.parameter.subdriver "krauler"<br>
0.000020 debug level is '9'<br>
0.000874 language ID workaround enabled (using '0x409')<br>
0.001019 No appropriate HID device found<br>
0.001025 No supported devices found. Please check your device<br>
availability with 'lsusb'<br>
and make sure you have an up-to-date version of NUT. If this does not help,<br>
try running the driver with at least 'subdriver', 'vendorid'<br>
</blockquote></blockquote>
and 'productid'<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
options specified. Please refer to the man page for details about these<br>
</blockquote></blockquote>
options<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
(man 8 blazer).<br>
<br>
This is on FreeBSD with NUT updated to 2.6.3 (I've modified the port).<br>
<br>
</blockquote></blockquote>
Hi Chris<br>
<br>
Any chance you could share the FreeBSD port? Using the version (2.6.1)<br>
currently available in the ports tree, I can get a step closer than your tests<br>
above, but without the enhanced blazer_usb driver (0.0.4) in nut 2.6.3, I<br>
don't think I can get any further.<br>
</blockquote>
All you need to do is edit the PORTVERSION value in the Makefile, and<br>
run make makesum :)<br>
<br>
I've just successfully upgraded to 2.6.4 this way....<br>
</blockquote></blockquote>
<br></div></div>
Aha!<br>
<br>
I also found a FreeBSD port patch on-line for 2.6.4 that has yet to be committed to the ports-tree. I'll try your route against the latest NUT release and see what we get.</blockquote><div><br>guys, I've released 2.6.5 yesterday! go the 2.6.5 route ;)<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The UPS comes with UPSilon, but it's several years (!) old and I can't<br>
even get it to install, let alone work.<br>
<br>
Have I sent enough info? I'm willing to have a go at hacking the<br>
driver, but having trouble getting started.<br>
<br>
Chris<br>
<br>
[crees<at> pegasus]/usr/local/libexec/<u></u>nut% grep -v<br>
</blockquote></blockquote>
^# /usr/local/etc/nut/ups.conf<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[zigor]<br>
port = auto<br>
driver = blazer_usb<br>
langid_fix = 0x409<br>
desc = "Zigor UPS"<br>
vendorid = 0001<br>
productid = 0000<br>
</blockquote>
it's quite probably due to a permission issue.<br>
See "4) Permissions" on<br>
</blockquote>
<a href="http://people.freebsd.org/%7Ethierry/nut_FreeBSD_HowTo.txt" target="_blank">http://people.freebsd.org/~<u></u>thierry/nut_FreeBSD_HowTo.txt</a><br>
</blockquote>
Thanks Arnaud, and sorry for the delay-- I've been on holiday.<br>
<br>
As I mentioned above I've now got it to 2.6.4, and have a new message;<br>
<br>
[crees@pegasus]/usr/local/<u></u>libexec/nut% sudo ./blazer_usb -a zigor -DDDDDDDDDDDDD<br>
Network UPS Tools - Megatec/Q1 protocol USB driver 0.08<br>
(2.6.4-Unversioned directory)<br>
0.000000 debug level is '13'<br>
0.001081 Checking device (0001/0000) (/dev/usb//dev/ugen2.3)<br>
0.001688 - VendorID: 0001<br>
0.001694 - ProductID: 0000<br>
0.001697 - Manufacturer: unknown<br>
0.001701 - Product: unknown<br>
0.001705 - Serial Number: unknown<br>
0.001708 - Bus: /dev/usb<br>
0.001712 Trying to match device<br>
0.001717 Device matches<br>
0.001737 send_to_all: SETINFO ups.vendorid "0001"<br>
0.001744 send_to_all: SETINFO ups.productid "0000"<br>
0.001751 send_to_all: SETINFO device.type "ups"<br>
0.001758 send_to_all: SETINFO driver.version "2.6.4-Unversioned<br>
directory"<br>
0.001764 send_to_all: SETINFO driver.version.internal "0.08"<br>
0.001770 send_to_all: SETINFO <a href="http://driver.name" target="_blank">driver.name</a> "blazer_usb"<br>
0.001775 Trying megatec protocol...<br>
0.001786 send: Q1<br>
0.002191 read: Unknown error<br>
0.002242 Permissions problem: Input/output error<br>
[crees@pegasus]/usr/local/<u></u>libexec/nut%<br>
<br>
I had already chmod'd 777 all the USB nodes (just for debugging of course!)<br>
<br>
and:<br>
<br>
[crees@pegasus]/usr/local/<u></u>libexec/nut% grep -v ^# /usr/local/etc/nut/ups.conf<br>
[zigor]<br>
port = auto<br>
driver = blazer_usb<br>
<br>
Looks as though the UPS is answering in strange ways....<br>
<br>
</blockquote></blockquote></div></div>
I applied the 2.6.4 patch and recompiled and, after chown'ing the USB DEV nodes, got something very similar, effectively, the sequence:<br>
<br>
Trying megatec protocol...<br>
send: Q1<br>
read: Unknown error<br>
Permissions problem: Input/output error<br>
<br>
I tried various protocol filters, but only the (new) megatec protocol gets this far...<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Just for fun, I noticed the #ifdef TESTING in blazer_usb.c.<br>
<br>
I defined that, and got this output when running ./blazer_usb -a zigor:<br>
<br>
<a href="http://www.bayofrum.net/%7Ecrees/scratch/zigor-testing.txt" target="_blank">http://www.bayofrum.net/~<u></u>crees/scratch/zigor-testing.<u></u>txt</a><br>
<br>
Any hints there?<br></blockquote></div></blockquote><div><br>you've been fooled Chris.<br>TESTING just fakes good values for... testing purpose ;) <br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Nice!<br>
<br>
I then installed the Upsilon s/w on my Windows XP laptop (which works effectively, even if it looks a bit 'old-school'..)<br>
<br>
I did take some comfort in seeing references to 'Megatec(USB)' in the Upsilon software configuration...<br>
<br>
I ran USBSniff against the port whilst attaching the UPS. Unfortuately, I couldn't make much sense of the verbose USBSniff output, but if this is useful for debugging (for Arnaud?) I could share it.<br></blockquote><div>
<br>yup, there are not many people left out there, that speak Q1...<br>could you please post a link, or a compressed archive (less than 40 Kb!)?<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
With suitable guidance, I'm happy to devote time to helping get this UPS working under NUT - I'd hate to have to build a Windows box just to monitor the UPS which is currently protecting my FreeBSD server and broadband router...<br>
<br>
Regards and thanks for such a clever bit of software!<span class="HOEnZb"><font color="#888888"></font></span><br clear="all"></blockquote></div><br>thanks for using it ;)<br><br>cheers,<br>Arno<br><br>