Hi All I'm trying to get my Ultra UPS connected. It connects using a standard USB cable I have --with-drivers=hidups in the configure command and I have lsusb showing Bus 001 Device 002: ID 0d9f:0001 Powercom Co., Ltd Bus 001 Device 001: ID 0000:0000 I have /dev/usb/hiddev0 now matter what I try I keep getting upsdrvctl start Network UPS Tools - UPS driver controller 2.0.3 Can't start /lib/nut/(null): No such file or directory cd /lib/nut ls -l total 56 -rwxr-xr-x 1 root root 36032 Jul 30 17:25 hidups -rwxr-xr-x 1 root root 19316 Jul 30 17:25 upsdrvctl Where am I going wrong? and how I get the UPS to be connected and seen Thanks all Barry
On 7/30/06, Barry Fawthrop <barry@ttienterprises.org> wrote:> Can't start /lib/nut/(null): No such file or directoryPlease post your config files. Also note that the hidups driver is deprecated, and will go away in a future release. A more comprehensive driver is newhidups. -- - Charles Lepple
Hi Charles Thanks for the info I was not aware that hidups was downgraded Here are my conf files ups.conf ========[Ultra1] DRIVER = hidups PORT = /dev/usb/hiddev0 upsd.conf ========ACL all 0.0.0.0/0 ACL localhost 127.0.0.1/32 ACL network 192.168.0.0/24 ACCEPT localhost ACCEPT network REJECT all upsd.users ========# MONITOR myups@myhost 1 monuser pass master (or slave) [monuser] password = MyPassWord allowfrom = localhost,network upsmon master upsmon.conf ==========MONITOR barry@ttienterprises.org 1 monuser MyPassWord master Thanks again Barry
On 7/31/06, Barry Fawthrop <barry@ttienterprises.org> wrote:> ups.conf > ========> [Ultra1] > DRIVER = hidups > PORT = /dev/usb/hiddev0I believe "driver" and "port" should be lowercase. -- - Charles Lepple
Hi Jonathan using driver = newhidups port = auto in ups.conf I get this * Starting UPS drivers ... Network UPS Tools - UPS driver controller 2.0.3 Can't start /lib/nut/newhidups: No such file or directory * Failed to start UPS drivers! [ !! ] * ERROR: Problem starting needed services. * "upsd" was not started. So how do I get the newhidups ? Thanks Barry
Hi all I recompiled nut and now have newhidups /etc/init.d/upsd start * Caching service dependencies ... [ ok ] * Starting UPS drivers ... Network UPS Tools - UPS driver controller 2.0.3 Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.3) No matching USB/HID UPS found Driver failed to start (exit status=1) * Failed to start UPS drivers! [ !! ] * ERROR: Problem starting needed services. * "upsd" was not started. the upsdrvctl part seems now to move further along ? Jonathan Dion wrote:> Hello Barry. > > On 7/31/06, *Barry Fawthrop* <barry@ttienterprises.org > <mailto:barry@ttienterprises.org>> wrote: > > Thanks Charles > > Now I'm getting this error when starting > > * Starting UPS drivers ... > Network UPS Tools - UPS driver controller 2.0.3 > Network UPS Tools: HID UPS driver 0.13 (2.0.3) > > Warning: This is an experimental driver. > Some features may not function correctly. > > /dev/usb/hiddev0 is not a UPS > > Driver failed to start (exit status=1) > > # lsusb > Bus 001 Device 002: ID 0d9f:0001 Powercom Co., Ltd > Bus 001 Device 001: ID 0000:0000 > > /dev/usb/hiddev0 is the UPS I'm sure (but not 100%) > > Thanks > Barry > > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser@lists.alioth.debian.org > <mailto:Nut-upsuser@lists.alioth.debian.org> > http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser > > > > You should try to use the newhidups driver, which allow you to put the > port to auto : > > ups.conf > ========> [Ultra1] > driver = newhidups > port = auto > > Cheers, > > Jonathan Dion > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.10.5/403 - Release Date: 7/28/2006 >
On 7/31/06, Barry Fawthrop <barry@ttienterprises.org> wrote:> No matching USB/HID UPS found > Driver failed to start (exit status=1)Please see the newhidups man page for "generic" mode, which allows newhidups to bind to UPSes that it does not know about. -- - Charles Lepple
Hi Barry On 8/2/06, Barry Fawthrop <barry@ttienterprises.org> wrote:> Hi Jonathan > I will try all options > Where do I find a current subdriver to use as a template / example and > then how would I "attach" it so that NUT can use it ? > > I'm willing to do all I can for the NUT community > what everI get I'll share >Nice answer ! Way to go, man ^_^ The better is that you read http://svn.debian.org/wsvn/nut/trunk/docs/hid-subdrivers.txt?op=file&rev=0&sc=0, especially the last part, "writing a subdriver" About your sentence : "what ever I get I'll share", take care. I you get something from PowerCom, be sure that you have the right to share it. NUT will refuse anything that is not legal. For a new subdriver, there is hum... three main things - The usage table : convert hardware path like 00020010 into name (that is what you need from PowerCom, or else what one'll have to create by reverse engineering) - The hid2nut table : convert the name in the usage table into internal NUT namming scheme. That is say to nut that to access to its battery.charge, NUT should use UPS.BatteryCurrentCharge for instance, where UPS.BatteryCurrentCharge is either defined in the standard of HID Power Device Class or in the usage table of the subdriver. Once the usage table is made, it is easy to make. - The shutdown function. How to order the UPS to shutdown. Here too, let's hope PowerCom will provide us with information about it, or else, hard reverse engineering needed to find that ... There are some others little things, but that is the three main things. Look at the code of *-hid.c/h in the driver directory to have sample.> I do know this > the UPS constantly gives the following > (1) Input Voltage 120 > (2) Output Voltage 120 > (3) Input Hertz 60 > (4) Output Hertz 60 > (5) Battery % should be 100 > (6) Current Load not sure about 23 % >I hope we won't need to know that your current load is about 23% because PowerCom will be kind enough to give us the information we need. Else, you or someone that have the same UPS than you would have some hard time to make the usage table ;-)> Thanks for all you help >My pleasure. Whatever is the case, Nut will do its best to help you. We hope we'll soon have a new subdriver ^_^> Yours > BarryCheer, Jonathan Dion
Hello Barry, Too bad PowerCom didn't accept to give you their HID usage table... As if it is a confidential and very important information... Are you sure you still want to use an UPS from such a manufacturer ? When will manufacturer understand that linux is not just a dream or a children game ? Some manifacturer did (like MGE), and we should support them ! Anyway, back to your compilation problem : On 8/3/06, Barry Fawthrop <barry@ttienterprises.org> wrote:> > What am I doing wrong > > added ultra.o > > I changed drivers/Makefile.in > NEWHIDUPS_SUBDRIVERS = generic-hid.o mge-hid.o apc-hid.o utlra.o \ > belkin-hid.o tripplite-hid.o > > added ultra.o > drivers/Makefile.drvbuild > newhidups.o: newhidups.c main.h ../include/common.h \ > ../include/attribute.h ../include/config.h ../include/proto.h \ > ../include/version.h ../include/upsconf.h dstate.h \ > ../include/attribute.h ../include/parseconf.h ../include/upshandler.h \ > ../include/extstate.h libhid.h ../include/config.h hidtypes.h \ > ../include/timehead.h newhidups.h libusb.h mge-hid.h generic-hid.h \ > apc-hid.h ultra.h belkin-hid.h tripplite-hid.h > > and added > > ultra.o: ultra.c newhidups.h ../include/config.h libhid.h hidtypes.h \ > ../include/timehead.h ultra.h ../include/extstate.h dstate.h \ > ../include/attribute.h ../include/parseconf.h ../include/upshandler.h \ > ../include/common.h ../include/attribute.h ../include/config.h \ > ../include/proto.h ../include/version.h > > > newhidups.c > > added ultra.h > > #ifndef SHUT_MODE > #include "generic-hid.h" > #include "apc-hid.h" > #include "ultra.h" > #include "belkin-hid.h" > #include "tripplite-hid.h" > #endif > > make usb gives > make usb > make[1]: Entering directory `/root/svn/trunk/drivers' > gcc -I../include -O -Wall -Wsign-compare -c newhidups.c > gcc -I../include -O -Wall -Wsign-compare -c -o main.o main.c > gcc -I../include -O -Wall -Wsign-compare -c -o dstate.o dstate.c > gcc -I../include -O -Wall -Wsign-compare -c -o ../common/state.o > ../common/state.c > gcc -I../include -O -Wall -Wsign-compare -c -o ../common/upsconf.o > ../common/upsconf.c > gcc -I../include -O -Wall -Wsign-compare -c -o ../common/parseconf.o > ../common/parseconf.c > gcc -I../include -O -Wall -Wsign-compare -c -o ../common/common.o > ../common/common.c > gcc -I../include -O -Wall -Wsign-compare -c libhid.c > gcc -I../include -O -Wall -Wsign-compare -c libusb.c > gcc -I../include -O -Wall -Wsign-compare -c hidparser.c > gcc -I../include -O -Wall -Wsign-compare -c generic-hid.c > gcc -I../include -O -Wall -Wsign-compare -c mge-hid.c > gcc -I../include -O -Wall -Wsign-compare -c apc-hid.c > gcc -I../include -O -Wall -Wsign-compare -c > gcc: no input files > make[1]: *** [utlra.o] Error 1 > make[1]: Leaving directory `/root/svn/trunk/drivers' > > What did I do wrong ? >You shouldn't modify Makefile.drvbuild, as it is automatically generated. And please name your subdriver ultra-hid and not just ultra (just a detail, but all subdriver names are *-hid), thank ^_^ So, as you did, add ultra-hid.o to the NEWHIDUPS_SUBDRIVERS list in driver/Makefile.in then run (assuming you are in the root of NUT source) : cd drivers && make depend cd .. && ./configure && make usb That should do the trick ;-)> Thanks > > Barry > > >Cordially, Jonathan Dion