Eli Wapniarski
2006-Jun-14 06:16 UTC
[Nut-upsuser] Trouble Configuring NUT with Gamatronic USB
Hi I am running FC5 with nut coming from the fc5 extras repositories. I am trying to configure a Gamatronic D-Compact ups. The cable that came with the ups has a serial connector on one end and a usb on the other. cat /proc/bus/usb/devices produces T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 4 Spd=1.5 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0925 ProdID=1234 Rev= 0.01 S: Manufacturer=Richcomm Tech S: Product=UPS2004 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid E: Ad=81(I) Atr=03(Int.) MxPS= 6 Ivl=10ms So the ups is detected. But when I try to run upsdrvctl -u nut start or upsdrvctl -u root start I get Network UPS Tools - UPS driver controller 2.0.3 execv: Permission denied Driver failed to start (exit status=1) /etc/rc.d/init.d/ups start produces Starting newhidups: Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.3) No matching USB/HID UPS found [FAILED] Starting upsd: Network UPS Tools upsd 2.0.3 Can't connect to UPS [Gamatronic] (-auto): No such file or directory Synchronizing........ giving up [ OK ] Starting UPS monitor (master): Network UPS Tools upsmon 2.0.3 Using power down flag file /etc/killpower Fatal error: insufficient power configured! Sum of power values........: 0 Minimum value (MINSUPPLIES): 1 Edit your upsmon.conf and change the values. [FAILED] /etc/sysconfig/ups contains # If the UPS is locally attached set it to "yes" SERVER=yes # Model of the UPS (filename to call for it, without path) # Example - one of # apcsmart - APC SMartUPS and similar # fentonups - Fenton UPS # optiups # bestups # genericups # ups-trust425+625 # upsdrvctl # You MUST change this, or set SERVER to "no" # To support multiple drivers, set MODEL=upsdrvctl MODEL=newhidups # UPS device - needed if UPS is locally attached DEVICE=auto # Any options to pass to $MODEL # ex. for my TrippLite UPS, use # OPTIONS="-t 5" OPTIONS# Any options to pass to upsd UPSD_OPTIONS# # [End] /etc/ups/ups.conf contains [Gamatronic] driver= newhidups port = auto desc = "Gamatronic D-Compact" I tried to modifying /etc/udev/rules.d/nut-usbups.rules to inlcude the following lines before LABEL="nut-usbups_rules_end" to include # Gamatronic D-Compact - usbhid-ups SYSFS{idVendor}=="0925", SYSFS{idProduct}=="1234", MODE="660", GROUP="nut" I got the same results. Please help me to get nut configured correctly. Thanks Eli
Peter Selinger
2006-Jun-14 11:57 UTC
[Nut-upsuser] Trouble Configuring NUT with Gamatronic USB
Eli, Gamatronic is not currently supported by the newhidups driver. You have two options: (1) look at the file data/driver.list or http://www.networkupstools.org/compat/ to find a serial driver that matches your device, and/or (2) post the output of newhidups -DD -u root -x generic -x vendorid=0925 auto and we'll try to see if any USB driver can be modified to support this device. -- Peter Eli Wapniarski wrote:> > Hi > > I am running FC5 with nut coming from the fc5 extras repositories. I =20 > am trying to configure a Gamatronic D-Compact ups. The cable that came =20 > with the ups has a serial connector on one end and a usb on the other. > > cat /proc/bus/usb/devices produces > > T: Bus=3D01 Lev=3D01 Prnt=3D01 Port=3D01 Cnt=3D01 Dev#=3D 4 Spd=3D1.5 MxCh> =3D 0 > D: Ver=3D 1.10 Cls=3D00(>ifc ) Sub=3D00 Prot=3D00 MxPS=3D 8 #Cfgs=3D 1 > P: Vendor=3D0925 ProdID=3D1234 Rev=3D 0.01 > S: Manufacturer=3DRichcomm Tech > S: Product=3DUPS2004 > C:* #Ifs=3D 1 Cfg#=3D 1 Atr=3D80 MxPwr=3D100mA > I: If#=3D 0 Alt=3D 0 #EPs=3D 1 Cls=3D03(HID ) Sub=3D00 Prot=3D00 Driver=3D> usbhid > E: Ad=3D81(I) Atr=3D03(Int.) MxPS=3D 6 Ivl=3D10ms > > So the ups is detected. But when I try to run > > upsdrvctl -u nut start or upsdrvctl -u root start I get > > Network UPS Tools - UPS driver controller 2.0.3 > execv: Permission denied > Driver failed to start (exit status=3D1) > > > /etc/rc.d/init.d/ups start produces > > Starting newhidups: Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.3) > > No matching USB/HID UPS found > [FAILED] > Starting upsd: Network UPS Tools upsd 2.0.3 > Can't connect to UPS [Gamatronic] (-auto): No such file or directory > Synchronizing........ giving up > [ OK ] > Starting UPS monitor (master): Network UPS Tools upsmon 2.0.3 > Using power down flag file /etc/killpower > > > Fatal error: insufficient power configured! > > Sum of power values........: 0 > Minimum value (MINSUPPLIES): 1 > > Edit your upsmon.conf and change the values. > [FAILED] > > /etc/sysconfig/ups contains > > # If the UPS is locally attached set it to "yes" > SERVER=3Dyes > # Model of the UPS (filename to call for it, without path) > # Example - one of > # apcsmart - APC SMartUPS and similar > # fentonups - Fenton UPS > # optiups > # bestups > # genericups > # ups-trust425+625 > # upsdrvctl > # You MUST change this, or set SERVER to "no" > # To support multiple drivers, set MODEL=3Dupsdrvctl > MODEL=3Dnewhidups > # UPS device - needed if UPS is locally attached > DEVICE=3Dauto > # Any options to pass to $MODEL > # ex. for my TrippLite UPS, use > # OPTIONS=3D"-t 5" > OPTIONS=3D > # Any options to pass to upsd > UPSD_OPTIONS=3D > # > # [End] > > /etc/ups/ups.conf contains > > [Gamatronic] > driver=3D newhidups > port =3D auto > desc =3D "Gamatronic D-Compact" > > > I tried to modifying /etc/udev/rules.d/nut-usbups.rules to inlcude the =20 > following lines before LABEL=3D"nut-usbups_rules_end" to include > > # Gamatronic D-Compact - usbhid-ups > SYSFS{idVendor}=3D=3D"0925", SYSFS{idProduct}=3D=3D"1234", MODE=3D"660", GRO> UP=3D"nut" > > I got the same results. Please help me to get nut configured correctly. > > Thanks > > Eli > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser@lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser >
Eli Wapniarski
2006-Jun-17 06:16 UTC
[Nut-upsuser] Trouble Configuring NUT with Gamatronic USB
upsdrvctl -DDDDD -u root start produces Network UPS Tools - UPS driver controller 2.1.0 Starting UPS: Gamatronic_D-Compact exec: /usr/bin/ -a Gamatronic_D-Compact execv: Permission denied Driver failed to start (exit status=1) I think I understand the problem here. Though I do not know how to solve it. After running newhidups -DD -u root -x vendorid=0925 auto or newhidups -DD -u root -x vendorid=0925 /dev/bus/usb/002/002 and then digging into what gets placed into /var/state/ups/ I find a device file newhidups-002. Instead of being linked to /dev/bus/usb/002/002 it points to /dev/sda1 which is a disk device and usually points to my pen drive which was not plugged in at the time. To make sure that indeed the permission problem with upsdrvctl was not related to the permission of the file, I ran chown root:nut /dev/sda1 chmod 660 /dev/sda1 same results. If you recall I added the lines to /etc/udev/rules.d/nut-usbups.rules # Gamatronic D-Compact - usbhid-ups SYSFS{idVendor}=="0925", SYSFS{idProduct}=="1234", MODE="660", GROUP="nut" and indeed, I find crw-rw---- 1 root nut 189, 129 Jun 17 07:34 /dev/bus/usb/002/002 On other thing to note, being that the device is generated on boot via udev, the device sometimes wanders from bus 002 to 001 Eli> > > > On Friday, 16 ?June 2006 21:26, Peter Selinger wrote: > > > You can try starting the driver with upsdrvctl, instead of calling the > > > (newhidups) driver directly. It might make a difference. -- Peter > > > > > > Eli Wapniarski wrote: > > > > K.. > > > > > > > > upsd -u root produces=20 > > > > > > > > Network UPS Tools upsd 2.1.0 > > > > Can't connect to UPS [Gamatronic_D-Compact] (Gamatronic_D-Compact): > > > > No such= =20 > > > > file or directory > > > > Synchronizing.................. giving up > > > > > > > > > > > > ups.conf contains. > > > > > > > > [Gamatronic_D-Compact] > > > > driver=3D newhidups > > > > port =3D auto > > > > desc =3D "Gamatronic D-Compact" > > > > > > > > > > > > > > > > Eli > > > > > > > > On Friday, 16 =D7=91June 2006 18:40, Peter Selinger wrote: > > > > > Eli, > > > > > > > > > > you should be doing the next step. Run the driver and upsd (not > > > > > upsmon), and see what output you can get from upsc. > > > > > > > > > > -- Peter > > > > > > > > > > Eli Wapniarski wrote: > > > > > > OK... Waiting for whats next > > > > > > > > > > > > Eli > > > > > > > > > > > > On Friday, 16 =3DD7=3D91June 2006 18:02, Peter Selinger wrote: > > > > > > > Yup, that's fine. It doesn't matter at the moment what the > > > > > > > files are called. Right now we are trying to do investigative > > > > > > > work. > > > > > > > > > > > > > > Your driver seems to be running fine. The next step will be to > > > > > > > try to see if you can get any output from upsc. > > > > > > > > > > > > > > -- Peter > > > > > > > > > > > > > > Eli Wapniarski wrote: > > > > > > > > OK Peter > > > > > > > > > > > > > > > > The modification that you mentioned was indeed included in > > > > > > > > the discussi=3D > > > > > > > > > > > > on > > > > > > > > > > > > > > a=3D3D nd=3D3D20 > > > > > > > > was made accordingly. Instead of using kebo I used richcomm > > > > > > > > because the inf=3D3D o=3D3D20 > > > > > > > > that I've been getting seems to indicate that the interface > > > > > > > > was manufacture=3D3D d=3D3D20 > > > > > > > > by Richcomm not kebo or gamatronic for that matter. I the > > > > > > > > files were copied=3D3D =3D3D20 > > > > > > > > from mge-hid.c mge-hid.h to richcomm.c and richcomm.h. I > > > > > > > > repalced m> > > > > > > > ge > > > > > > > > > > > > a=3D > > > > > > > > > > > > nd > > > > > > > > > > > > > > M=3D3D GE=3D3D20 > > > > > > > > to richcomm and RICHCOMM accordingly.=3D3D20 > > > > > > > > > > > > > > > > Anyway... > > > > > > > > > > > > > > > > Running newhidups -DD -u root -x vendorid=3D3D3D0925 auto > > > > > > > > produces > > > > > > > > > > > > > > > > Checking device (0925/1234) (002/002) > > > > > > > > =3D3D2D VendorID: 0925 > > > > > > > > =3D3D2D ProductID: 1234 > > > > > > > > =3D3D2D Manufacturer: Richcomm Tech > > > > > > > > =3D3D2D Product: UPS2004 > > > > > > > > =3D3D2D Serial Number: unknown > > > > > > > > =3D3D2D Bus: 002 > > > > > > > > Trying to match device > > > > > > > > Device matches > > > > > > > > HID descriptor retrieved (Reportlen =3D3D3D 78) > > > > > > > > Report descriptor retrieved (Reportlen =3D3D3D 78) > > > > > > > > =3D3D46ound HID device > > > > > > > > Report Descriptor size =3D3D3D 78 > > > > > > > > Detected a UPS: Richcomm Tech /UPS2004 > > > > > > > > Using subdriver: RICHCOMM HID 0.9 > > > > > > > > Can't find object ffa00001.ffa00002.ffa10003 > > > > > > > > Path: ffa00001.ffa00002.ffa10003, Type: Input > > > > > > > > Can't find object ffa00001.ffa00002.ffa10004 > > > > > > > > Path: ffa00001.ffa00002.ffa10004, Type: Input > > > > > > > > Can't find object ffa00001.ffa00002.ffa10005 > > > > > > > > Path: ffa00001.ffa00002.ffa10005, Type: Input > > > > > > > > Can't find object ffa00001.ffa00002.ffa10006 > > > > > > > > Path: ffa00001.ffa00002.ffa10006, Type: Input > > > > > > > > Can't find object ffa00001.ffa00002.ffa10007 > > > > > > > > Path: ffa00001.ffa00002.ffa10007, Type: Input > > > > > > > > Can't find object ffa00001.ffa00002.ffa10008 > > > > > > > > Path: ffa00001.ffa00002.ffa10008, Type: Input > > > > > > > > Can't find object ffa00001.ffa00002.ffa10009 > > > > > > > > Path: ffa00001.ffa00002.ffa10009, Type: Output > > > > > > > > Can't find object ffa00001.ffa00002.ffa1000a > > > > > > > > Path: ffa00001.ffa00002.ffa1000a, Type: Output > > > > > > > > Can't find object ffa00001.ffa00002.ffa1000b > > > > > > > > Path: ffa00001.ffa00002.ffa1000b, Type: Output > > > > > > > > Can't find object ffa00001.ffa00002.ffa1000c > > > > > > > > Path: ffa00001.ffa00002.ffa1000c, Type: Output > > > > > > > > entering identify_ups(0x0925, 0x1234) > > > > > > > > > > > > > > > > Can't find object UPS.PowerSummary.iModel > > > > > > > > Can't find object UPS.Flow.[4].ConfigApparentPower > > > > > > > > Can't find object UPS.PowerSummary.RemainingCapacity > > > > > > > > Can't find object > > > > > > > > UPS.PowerSummary.RemainingCapacityLimitSetting Can't find > > > > > > > > object UPS.PowerSummary.RemainingCapacityLimit Can't find > > > > > > > > object UPS.PowerSummary.RunTimeToEmpty > > > > > > > > Can't find object UPS.BatterySystem.Battery.Temperature > > > > > > > > Can't find object UPS.PowerSummary.Voltage > > > > > > > > Can't find object UPS.BatterySystem.ConfigVoltage > > > > > > > > Can't find object UPS.PowerSummary.PercentLoad > > > > > > > > Can't find object UPS.PowerSummary.DelayBeforeShutdown > > > > > > > > Can't find object UPS.PowerSummary.DelayBeforeReboot > > > > > > > > Can't find object UPS.PowerSummary.DelayBeforeStartup > > > > > > > > Can't find object UPS.BatterySystem.Battery.Test > > > > > > > > Can't find object UPS.BatterySystem.Battery.TestPeriod > > > > > > > > Can't find object UPS.PowerSummary.Temperature > > > > > > > > Can't find object UPS.Flow.[4].ConfigApparentPower > > > > > > > > Can't find object UPS.PowerSummary.PresentStatus.ACPresent > > > > > > > > Can't find object UPS.PowerSummary.PresentStatus.Discharging > > > > > > > > Can't find object UPS.PowerSummary.PresentStatus.Charging > > > > > > > > Can't find object > > > > > > > > UPS.PowerSummary.PresentStatus.ShutdownImminent Can't find > > > > > > > > object > > > > > > > > UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit > > > > > > > > Can't fi> > > > > > > > nd > > > > > > > > > > > > object UPS.PowerSummary.PresentStatus.Overload > > > > > > > > Can't find object > > > > > > > > UPS.PowerSummary.PresentStatus.NeedReplacement Can't find > > > > > > > > object UPS.PowerConverter.Input.[1].PresentStatus.Buck Can't > > > > > > > > find object > > > > > > > > UPS.PowerConverter.Input.[1].PresentStatus.Boost Can't find > > > > > > > > object UPS.PowerSummary.PresentStatus.Good > > > > > > > > Can't find object UPS.PowerConverter.Input.[1].Voltage > > > > > > > > Can't find object UPS.PowerConverter.Input.[1].Frequency > > > > > > > > Can't find object > > > > > > > > UPS.PowerConverter.Output.LowVoltageTransfer Can't find > > > > > > > > object > > > > > > > > UPS.PowerConverter.Output.LowVoltageBoostTransfer Can't find > > > > > > > > object UPS.PowerConverter.Output.HighVoltageBoostTransfer > > > > > > > > Can't find object > > > > > > > > UPS.PowerConverter.Output.LowVoltageBuckTransfer Can't find > > > > > > > > object UPS.PowerConverter.Output.HighVoltageTransfer Can't > > > > > > > > find object > > > > > > > > UPS.PowerConverter.Output.HighVoltageBuckTransfer Can't find > > > > > > > > object UPS.PowerConverter.Output.Voltage > > > > > > > > Can't find object UPS.PowerConverter.Output.Current > > > > > > > > Can't find object UPS.PowerConverter.Output.Frequency > > > > > > > > Can't find object UPS.PowerSummary.ConfigVoltage > > > > > > > > Can't find object UPS.OutletSystem.Outlet.[1].OutletID > > > > > > > > Can't find object UPS.OutletSystem.Outlet.[1].OutletID > > > > > > > > Can't find object > > > > > > > > UPS.OutletSystem.Outlet.[1].PresentStatus.Switchable Can't > > > > > > > > find object UPS.OutletSystem.Outlet.[2].OutletID > > > > > > > > Can't find object UPS.OutletSystem.Outlet.[2].OutletID > > > > > > > > Can't find object > > > > > > > > UPS.OutletSystem.Outlet.[2].PresentStatus.Switchable Can't > > > > > > > > find object > > > > > > > > UPS.OutletSystem.Outlet.[2].PresentStatus.SwitchOn/Off Can't > > > > > > > > find object UPS.PowerSummary.PresentStatus.ACPresent Can't > > > > > > > > find object > > > > > > > > UPS.OutletSystem.Outlet.[2].RemainingCapacityLimit Can't find > > > > > > > > object UPS.OutletSystem.Outlet.[2].DelayBeforeShutdown Can't > > > > > > > > find object UPS.OutletSystem.Outlet.[2].DelayBeforeStartup > > > > > > > > Can't find object UPS.OutletSystem.Outlet.[3].OutletID > > > > > > > > Can't find object UPS.OutletSystem.Outlet.[3].OutletID > > > > > > > > Can't find object > > > > > > > > UPS.OutletSystem.Outlet.[3].PresentStatus.Switchable Can't > > > > > > > > find object > > > > > > > > UPS.OutletSystem.Outlet.[3].PresentStatus.SwitchOn/Off Can't > > > > > > > > find object > > > > > > > > UPS.OutletSystem.Outlet.[3].RemainingCapacityLimit Can't find > > > > > > > > object UPS.OutletSystem.Outlet.[3].DelayBeforeShutdown Can't > > > > > > > > find object UPS.OutletSystem.Outlet.[3].DelayBeforeStartup > > > > > > > > Can't fi> > > > > > > > nd > > > > > > > > > > > > object UPS.BatterySystem.Battery.Test > > > > > > > > Can't find object UPS.BatterySystem.Battery.Test > > > > > > > > Can't find object UPS.BatterySystem.Battery.Test > > > > > > > > Can't find object UPS.PowerSummary.DelayBeforeShutdown > > > > > > > > Can't find object UPS.PowerSummary.DelayBeforeStartup > > > > > > > > upsdrv_updateinfo... > > > > > > > > dstate_init: sock /var/state/ups/newhidups-auto open on fd 5 > > > > > > > > upsdrv_updateinfo... > > > > > > > > Waiting for notifications... > > > > > > > > > > > > > > > > Eli > > > > > > > > > > > > > > > > On Friday, 16 =3D3DD7=3D3D91June 2006 15:53, Peter Selinger > > wrote: > > > > > > > > > Dear Eli, > > > > > > > > > > > > > > > > > > you need one more modification: in drivers/newhidups.c, > > > > > > > > > line 37, add your subdriver to the list: > > > > > > > > > > > > > > > > > > static subdriver_t *subdriver_list[] =3D3D3D { > > > > > > > > > &generic_subdriver, > > > > > > > > > &mge_subdriver, > > > > > > > > > &apc_subdriver, > > > > > > > > > &belkin_subdriver, > > > > > > > > > &tripplite_subdriver, > > > > > > > > > NULL > > > > > > > > > }; > > > > > > > > > > > > > > > > > > Note that it is probably called "kebo_subdriver" not > > > > > > > > > "richcomm_subdriver". > > > > > > > > > > > > > > > > > > Also, you have to drop the "-x generic" flag at this point. > > > > > > > > > Also, please use -DD, and not -DDDDD, as the latter > > > > > > > > > produces tons of irrelevant output. > > > > > > > > > > > > > > > > > > -- Peter > > > > > > > > > > > > > > > > > > Eli Wapniarski wrote: > > > > > > > > > > Thanks Peter > > > > > > > > > > > > > > > > > > > > If you're willing to get this done, so am I. I bought > > > > > > > > > > three of them=3D
Peter Selinger
2006-Jun-17 13:45 UTC
[Nut-upsuser] Trouble Configuring NUT with Gamatronic USB
Eli Wapniarski wrote:> > upsdrvctl -DDDDD -u root start produces > > Network UPS Tools - UPS driver controller 2.1.0 > Starting UPS: Gamatronic_D-Compact > exec: /usr/bin/ -a Gamatronic_D-Compact > execv: Permission denied > Driver failed to start (exit status=1) > > I think I understand the problem here. Though I do not know how to solve it.No, the problem is much more mundane. The third line should have been: exec: /usr/bin/newhidups -a Gamatronic_D-Compact What's in your ups.conf? Probably that configuration file is messed up.> After running > > newhidups -DD -u root -x vendorid=0925 auto > > or > > newhidups -DD -u root -x vendorid=0925 /dev/bus/usb/002/002 > > and then digging into what gets placed into /var/state/ups/ I find a device > file newhidups-002. Instead of being linked to /dev/bus/usb/002/002 it points > to /dev/sda1 which is a disk device and usually points to my pen drive which > was not plugged in at the time.I am not sure what you mean by "linked". That file should not be linked to anything. Also, the driver does not care if you give /dev/bus/usb/002/002 or /dev/bus/have/a/nice/day. It ignores the last argument (except for setting the state file name). You can also try: newhidups -DD -u root -x vendorid=0925 -a Gamatronic_D-Compact -- Peter
Apparently Analagous Threads
- New UPS Support: Eaton 5S 1000
- Newhidups gets unbound after a while
- newhidups with APC Smart-UPS 1500
- USB support for Sweex 1000 VA UPS (was: Help with USB support for a Kebo UPS-650D)
- USB support for Sweex 1000 VA UPS (was: Help with USB support for a Kebo UPS-650D)