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

