[Nut-upsuser] Trouble Configuring NUT with Gamatronic USB

Eli Wapniarski eli at orbsky.homelinux.org
Sat Jun 17 06:03:14 UTC 2006


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



More information about the Nut-upsuser mailing list