[Nut-upsdev] new ups for database?

spamwhole at gmail.com spamwhole at gmail.com
Sat Sep 23 20:13:10 UTC 2006


Hi, 

Thanks for the very very quick patch. But, I can't seem to get things to 
work, unfortunately I'm not sure if the error is user induced ;-).  I get 
the following error: 

ups # upsd
Network UPS Tools upsd 2.1.0
/var/state/ups is world readable
/usr/local/ups/etc/upsd.conf is world readable
Can't connect to UPS [belkin] (belkin): No such file or directory
/usr/local/ups/etc/upsd.users is world readable
Synchronizing.................. giving up 

Here's my ups.conf: 

[belkin]
port = /dev/usb/hiddev0             I've tried auto
driver = newhidups
vendorid = 0001 

Here's an strace of 'upsd': 

open("/usr/local/ups/etc/upsd.conf", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=1364, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2ac89135f000
read(5, "# Network UPS Tools: example ups"..., 4096) = 1364
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x2ac89135f000, 4096)            = 0
open("/usr/local/ups/etc/ups.conf", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=68, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2ac89135f000
read(5, "[belkin]\nport = /dev/usb/hiddev0"..., 4096) = 68
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x2ac89135f000, 4096)            = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 5
connect(5, {sa_family=AF_FILE, path="belkin"}, 110) = -1 ENOENT (No such 
file or directory)
close(5)                                = 0
write(2, "Can\'t connect to UPS [belkin] (b"..., 66Can't connect to UPS 
[belkin] (belkin): No such file or directory
) = 66
sendto(4, "<27>Sep 23 21:04:44 upsd[391]: C"..., 97, MSG_NOSIGNAL, NULL, 0) 
= 97
stat("/usr/local/ups/etc/upsd.users", {st_mode=S_IFREG|0644, st_size=2215, 
...}) = 0
write(2, "/usr/local/ups/etc/upsd.users is"..., 
48/usr/local/ups/etc/upsd.users is world readable
) = 48
sendto(4, "<28>Sep 23 21:04:44 upsd[391]: /"..., 79, MSG_NOSIGNAL, NULL, 0) 
= 79
open("/usr/local/ups/etc/upsd.users", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=2215, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2ac89135f000
read(5, "# Network UPS Tools: Example ups"..., 4096) = 2215
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x2ac89135f000, 4096)            = 0
open("/usr/local/ups/share/cmdvartab", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=8148, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2ac89135f000
read(5, "# Network UPS Tools: variable an"..., 4096) = 4096
read(5, "e.alarm \"Ambient temperature ala"..., 4096) = 4052
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x2ac89135f000, 4096)            = 0
write(1, "Synchronizing...", 16Synchronizing...)        = 16
select(1, [], NULL, NULL, {1, 0} <unfinished ...> 

Also, as a side note the make fell over when building the driver.  There was 
a normal 'gcc' line but with no source code to compile.  When I added 
mec-hid.c I I was able to continue/finish the compile. 

thanks 

Rob 


Peter Selinger writes: 

> Thanks for the info. Attached is the patch for an MEC subdriver stub.
> Plesae see if you can get this to work and read any info from the
> device via "upsd" and "upsc". Thanks, -- Peter 
> 
> spamwhole at gmail.com wrote:
>> 
>> Peter,  
>> 
>> Please see below.  I've left the extra USB devices in there too, just in 
>> case.  
>> 
>> thanks  
>> 
>> Rob  
>> 
>> rmk drivers # ./newhidups -DD -u root -x generic -x vendorid=0001 auto
>> Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.1.0)  
>> 
>> debug level is '2'
>> Checking device (0000/0000) (003/001)
>>  - VendorID: 0000
>>  - ProductID: 0000
>>  - Manufacturer: Linux 2.6.18-1 ohci_hcd
>>  - Product: OHCI Host Controller
>>  - Serial Number: 0000:00:02.0
>>  - Bus: 003
>> Trying to match device
>> Device does not match - skipping
>> Checking device (14AA/022B) (002/011)
>>  - VendorID: 14aa
>>  - ProductID: 022b
>>  - Manufacturer: Digital TV Receiver
>>  - Product: Digital TV Receiver
>>  - Serial Number: unknown
>>  - Bus: 002
>> Trying to match device
>> Device does not match - skipping
>> Checking device (0000/0000) (002/001)
>>  - VendorID: 0000
>>  - ProductID: 0000
>>  - Manufacturer: Linux 2.6.18-1 ehci_hcd
>>  - Product: EHCI Host Controller
>>  - Serial Number: 0000:05:06.2
>>  - Bus: 002
>> Trying to match device
>> Device does not match - skipping
>> Checking device (0000/0000) (004/001)
>>  - VendorID: 0000
>>  - ProductID: 0000
>>  - Manufacturer: Linux 2.6.18-1 uhci_hcd
>>  - Product: UHCI Host Controller
>>  - Serial Number: 0000:05:06.0
>>  - Bus: 004
>> Trying to match device
>> Device does not match - skipping
>> Checking device (0D3D/0001) (004/002)
>>  - VendorID: 0d3d
>>  - ProductID: 0001
>>  - Manufacturer: unknown
>>  - Product: USBPS2
>>  - Serial Number: unknown
>>  - Bus: 004
>> Trying to match device
>> Device does not match - skipping
>> Checking device (0000/0000) (001/001)
>>  - VendorID: 0000
>>  - ProductID: 0000
>>  - Manufacturer: Linux 2.6.18-1 ehci_hcd
>>  - Product: EHCI Host Controller
>>  - Serial Number: 0000:00:02.1
>>  - Bus: 001
>> Trying to match device
>> Device does not match - skipping
>> Checking device (0001/0000) (005/004)
>>  - VendorID: 0001
>>  - ProductID: 0000
>>  - Manufacturer: MEC
>>  - Product: MEC0002
>>  - Serial Number: unknown
>>  - Bus: 005
>> Trying to match device
>> Device matches
>> failed to claim USB device, trying 2 more time(s)...
>> detaching kernel driver from USB device...
>> trying again to claim USB device...
>> HID descriptor retrieved (Reportlen = 624)
>> Report descriptor retrieved (Reportlen = 624)
>> Found HID device
>> Report Descriptor size = 624
>> Detected a UPS: MEC/MEC0002
>> Using subdriver: GENERIC HID 0.1
>> Can't retrieve Report 1 (-32/32): Broken pipe
>> Path: 00860004.Flow.FlowID, Type: Feature
>> Can't retrieve Report 1 (-32/32): Broken pipe
>> Path: 00860004.Flow.ConfigVoltage, Type: Feature
>> Can't retrieve Report 1 (-32/32): Broken pipe
>> Path: 00860004.Flow.ConfigFrequency, Type: Feature
>> Can't retrieve Report 1 (-32/32): Broken pipe
>> Path: 00860004.Flow.LowVoltageTransfer, Type: Feature
>> Can't retrieve Report 1 (-32/32): Broken pipe
>> Path: 00860004.Flow.HighVoltageTransfer, Type: Feature
>> Can't retrieve Report 1 (-32/32): Broken pipe
>> Path: 00860004.Flow.iManufacturer, Type: Feature
>> Can't retrieve Report 1 (-32/32): Broken pipe
>> Path: 00860004.Flow.iProduct, Type: Feature
>> Can't retrieve Report 1 (-32/32): Broken pipe
>> Path: 00860004.Flow.iSerialNumber, Type: Feature
>> Can't retrieve Report 1 (-32/32): Broken pipe
>> Path: 00860004.Flow.FlowID, Type: Feature
>> Can't retrieve Report 1 (-32/32): Broken pipe
>> Path: 00860004.Flow.ConfigVoltage, Type: Feature
>> Can't retrieve Report 1 (-32/32): Broken pipe
>> Path: 00860004.Flow.ConfigFrequency, Type: Feature
>> Can't retrieve Report 2 (-32/32): Broken pipe
>> Path: 00860004.Flow.ConfigApparentPower, Type: Feature
>> Can't retrieve Report 2 (-32/32): Broken pipe
>> Path: 00860004.Flow.ConfigActivePower, Type: Feature
>> Can't retrieve Report 2 (-32/32): Broken pipe
>> Path: 00860004.Flow.DelayBeforeStartup, Type: Feature
>> Can't retrieve Report 2 (-32/32): Broken pipe
>> Path: 00860004.Flow.DelayBeforeShutdown, Type: Feature
>> Can't retrieve Report 3 (-32/32): Broken pipe
>> Path: 00860004.BatterySystem.BatterySystemID, Type: Feature
>> Can't retrieve Report 3 (-32/32): Broken pipe
>> Path: 00860004.BatterySystem.PresentStatus.Used, Type: Feature
>> Can't retrieve Report 3 (-32/32): Broken pipe
>> Path: 00860004.BatterySystem.PresentStatus.Good, Type: Feature
>> Can't retrieve Report 3 (-32/32): Broken pipe
>> Path: 00860004.BatterySystem.Voltage, Type: Feature
>> Can't retrieve Report 3 (-32/32): Broken pipe
>> Path: 00860004.BatterySystem.Temperature, Type: Feature
>> Can't retrieve Report 3 (-32/32): Broken pipe
>> Path: 00860004.BatterySystem.Test, Type: Input
>> Can't retrieve Report 3 (-32/32): Broken pipe
>> Path: 00860004.BatterySystem.Test, Type: Feature
>> Can't find object 00860004.PowerConverter.PowerConverterID
>> Path: 00860004.PowerConverter.PowerConverterID, Type: Input
>> Can't find object 00860004.PowerConverter.Input.InputID
>> Path: 00860004.PowerConverter.Input.InputID, Type: Input
>> Can't find object 00860004.PowerConverter.Input.FlowID
>> Path: 00860004.PowerConverter.Input.FlowID, Type: Input
>> Can't find object 00860004.PowerConverter.Input.PresentStatus.Good
>> Path: 00860004.PowerConverter.Input.PresentStatus.Good, Type: Input
>> Can't find object 00860004.PowerConverter.Input.Voltage
>> Path: 00860004.PowerConverter.Input.Voltage, Type: Input
>> Can't find object 00860004.PowerConverter.Input.Frequency
>> Path: 00860004.PowerConverter.Input.Frequency, Type: Input
>> Can't find object 00860004.PowerConverter.Output.OutputID
>> Path: 00860004.PowerConverter.Output.OutputID, Type: Input
>> Can't find object 00860004.PowerConverter.Output.FlowID
>> Path: 00860004.PowerConverter.Output.FlowID, Type: Input
>> Can't find object 00860004.PowerConverter.Output.Voltage
>> Path: 00860004.PowerConverter.Output.Voltage, Type: Input
>> Can't find object 00860004.PowerConverter.Output.Frequency
>> Path: 00860004.PowerConverter.Output.Frequency, Type: Input
>> Can't find object 00860004.PowerConverter.Output.PercentLoad
>> Path: 00860004.PowerConverter.Output.PercentLoad, Type: Input
>> Can't find object 00860004.PowerConverter.Output.PresentStatus.Overload
>> Path: 00860004.PowerConverter.Output.PresentStatus.Overload, Type: Input
>> Can't find object 00860004.PowerConverter.Output.PresentStatus.Boost
>> Path: 00860004.PowerConverter.Output.PresentStatus.Boost, Type: Input
>> Can't find object 00860004.PowerConverter.Output.PresentStatus.Buck
>> Path: 00860004.PowerConverter.Output.PresentStatus.Buck, Type: Input
>> upsdrv_updateinfo...
>> dstate_init: sock /var/state/ups/newhidups-auto open on fd 5
>> upsdrv_updateinfo...
>> Waiting for notifications...
>> upsdrv_updateinfo...
>> Waiting for notifications...
>> Signal 2: exiting
>> Closing device
>> rmk drivers #  
>> 
>> 
>> Peter Selinger writes:  
>> 
>> > Rob and Dave, 
>> > 
>> > that device looks like it is using an illegal vendor id, "0001". It
>> > also looks like it is made by MEC, not Belkin (probably sold under
>> > license).  
>> > 
>> > We might be able to support its USB interface. To find out more,
>> > please do the following: 
>> > 
>> > * get the latest development version of NUT from SVN. You can follow
>> >   the instructions at http://www.networkupstools.org/source.html under
>> >   "Development tree" to get it. 
>> > 
>> > * post the output of 
>> > 
>> >    drivers/newhidups -DD -u root -x generic -x vendorid=0001 auto 
>> > 
>> >   from this newest NUT version. 
>> > 
>> > This should output a bunch of debugging data, and then go into an
>> > infinite loop waiting for data. You can do "Ctrl-C" to kill the driver
>> > (it will not do anything useful at this point). 
>> > 
>> > -- Peter 
>> > 
>> > spamwhole at gmail.com wrote:
>> >> 
>> >> Hi,  
>> >> 
>> >> I have the same device, a F6H500ukUNV, it has both RS-232 and USB.  
>> >> 
>> >> url:
>> >> http://catalog.belkin.com/IWCatProductPage.process?Product_Id=201050  
>> >> 
>> >> 
>> >> The details I have from my system are below.  If you would like further 
>> >> informatinon, or a more verbose lsusb please let me know.  
>> >> 
>> >> thanks  
>> >> 
>> >> Rob  
>> >> 
>> >> dmesg:
>> >> hiddev96: USB HID v1.00 Device [MEC MEC0002] on usb-0000:05:06.1-2  
>> >> 
>> >> lsusb:
>> >> Bus 005 Device 004: ID 0001:0000 Fry's Electronics  
>> >> 
>> >> cat /proc/bus/usb/device:
>> >> T:  Bus=05 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  4 Spd=1.5 MxCh= 0
>> >> D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
>> >> P:  Vendor=0001 ProdID=0000 Rev= 1.00
>> >> S:  Manufacturer=MEC
>> >> S:  Product=MEC0002
>> >> 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=   8 Ivl=10ms  
>> >> 
>> >> >
>> >> >Hi Dave, 
>> >> >
>> >> >nothing in the outputs you sent looks like any Belkin device is
>> >> >present. Are you sure it is attached to your computer? You should have
>> >> >something like this in /proc/bus/usb/devices: 
>> >> >
>> >> >T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
>> >> >D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
>> >> >P:  Vendor=050d ProdID=0980 Rev= 0.06
>> >> >S:  Manufacturer=       
>> >> >S:  Product=UPS
>> >> >C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 20mA
>> >> >I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
>> >> >E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=248ms 
>> >> >
>> >> >Note "Vendor=050d", which is Belkin's vendor ID.  
>> >> >
>> >> >The output from newhidups does not show a 050d/XXXX device either.  
>> >> >
>> >> >-- Peter 
>> >> >
>> >> >meherenow at darkglobe.org wrote:
>> >> >> 
>> >> >> I have a Belkin F6H500ukUNV ups that I am attempting to get working =20
>> >> >> under nut, however it
>> >> >> does not appear to be detected by nut, I'm assuming that I need to =20
>> >> >> feed some information
>> >> >> back to you guys to get it included in the database somwhere. 
>> >> >> 
>> >> >> I've included (what I can think might be) the relivant outputs. Please >=20
>> >> >> let me know if you
>> >> >> require anything else. 
>> >> >> 
>> >> >> dmesg output
>> >> >> /sbin/newhidsups output
>> >> >> ll /dev/usb*
>> >> >> cat /proc/bus/usb/devices 
>> >> >> 
>> >> >> p.s. I tried chmodding /dev/usb<blah> 777 just incase it was a =20
>> >> >> permissions problem, but
>> >> >> that didn't help either. 
>> >> >> 
>> >> >> Many thanks. 
>> >> >> 
>> >> >> ###########################################################
>> >> >> dmesg output when connecting the ups 
>> >> >> 
>> >> >> usb 2-1: new low speed USB device using uhci_hcd and address 2
>> >> >> PM: Adding info for usb:2-1
>> >> >> PM: Adding info for No Bus:usbdev2.2_ep00
>> >> >> usb 2-1: configuration #1 chosen from 1 choice
>> >> >> PM: Adding info for usb:2-1:1.0
>> >> >> hiddev96: USB HID v1.00 Device [MEC MEC0002] on usb-0000:00:10.1-1
>> >> >> PM: Adding info for No Bus:usbdev2.2_ep81 
>> >> 
>> >> _______________________________________________
>> >> Nut-upsdev mailing list
>> >> Nut-upsdev at lists.alioth.debian.org
>> >> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev 
>> >> 
>> >  
>> 
> 



More information about the Nut-upsdev mailing list