[Nut-upsdev] Re: [Nut-upsuser] Atlantis-Land UPS with Cypress CY7C63723 chip

Peter Selinger selinger at mathstat.dal.ca
Tue Dec 13 15:18:03 UTC 2005


[I am moving this threat to the nut-upsdev list from the nut-upsuser
list]

ngpost1 wrote:
> 
> Hello everybosy!
> 
>    So far, so good.
> 
>    Compiled and installed everything according to the documentation. 
> Now, when I plug in the USB I get from /var/log/messages:
> 
> [root at testbox ~]# tail -f /var/log/messages
> Dec 13 14:25:13 testbox sshd(pam_unix)[1419]: session opened for user 
> root by root(uid=0)
> Dec 13 14:25:28 testbox sshd(pam_unix)[1445]: session opened for user 
> root by root(uid=0)
> Dec 13 14:27:25 testbox kernel: usb 1-1: new low speed USB device using 
> ohci_hcd and address 2
> Dec 13 14:27:26 testbox kernel: drivers/usb/input/hid-core.c: couldn't 
> find an input interrupt endpoint
> Dec 13 14:27:37 testbox kernel: usbcore: registered new driver yealink
> Dec 13 14:27:37 testbox kernel: drivers/usb/input/yealink.c: Yealink 
> phone driver:yld-20050816
> 
> It still reports that it can't find an interrupt endpoint, but at least 
> the "usbhid: probe of 3-2:1.0 failed with error -5" is gone. Funny, it 
> thinks it's a Yealink phone!

This does not matter. The kernel has a habit of looking at USB
devices, because they could be mice, keyboards, disk drives, or
similar stuff that the kernel cares about. However, for UPS devices,
we use a user space driver such as newhidups and not a kernel driver.
So it doesn't matter what the kernel thinks.

> Anyway, here's what newhidups reports (note that I had to use the 
> vendorid option):

Correct.
 
> [root at testbox conf.d]# /usr/local/ups/bin/newhidups -u root -DD -x 
> generic -x vendorid=0001 auto
> Network UPS Tools: New USB/HID UPS driver 0.28 (2.1.0)
> 
> debug level is '2'
> Checking device (0001/0000) (001/002)
> - VendorID: 0001
> - ProductID: 0000
> - Manufacturer: UIS_ABLER
> - Product: USB to Serial
> - Serial Number: unknown
> - Bus: 001
> Trying to match device
> Device matches
> HID descriptor retrieved (Reportlen = 632)
> Report descriptor retrieved (Reportlen = 632)
> Found HID device
> Report Descriptor size = 632
> Detected a UPS: UIS_ABLER/USB to Serial
> Using subdriver: GENERIC HID 0.1
> Path: 00860004.Flow.FlowID, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.ConfigVoltage, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.ConfigFrequency, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.LowVoltageTransfer, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.HighVoltageTransfer, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.iManufacturer, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.iProduct, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.iSerialNumber, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.FlowID, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.ConfigVoltage, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.ConfigFrequency, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.ConfigApparentPower, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.ConfigActivePower, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.DelayBeforeStartup, Type: Feature, Value: 0.000000
> Path: 00860004.Flow.DelayBeforeShutdown, Type: Feature, Value: 0.000000
> Path: 00860004.BatterySystem.BatterySystemID, Type: Feature, Value: 0.000000
> Path: 00860004.BatterySystem.PresentStatus.Used, Type: Feature, Value: 
> 0.000000
> Path: 00860004.BatterySystem.PresentStatus.Good, Type: Feature, Value: 
> 0.000000
> Path: 00860004.BatterySystem.Voltage, Type: Feature, Value: 0.000000
> Path: 00860004.BatterySystem.Temperature, Type: Feature, Value: 0.000000
> Path: 00860004.BatterySystem.Test, Type: Input, Value: 0.000000
> Path: 00860004.BatterySystem.Test, Type: Feature, Value: 0.000000
> 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
> Path: 00860004.PowerConverter.Output.PresentStatus.00840039, Type: 
> Feature, Value: 0.000000
> entering identify_ups(0x0001, 0x0000)
> 
> 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
> [root at testbox ~]#

This is useful information. I don't think the device is currently
supported, but the information printed above is enough to write a
subdriver for it. Note that the purpose of the "-x generic" option is
precisely to produce this output. 

>    Apparently the UPS is recognized but no communication is occurring. 
> What else? lsmod shows the yealink driver loaded. I attached the lsusb 
> output.
>    If I ls the /dev directory, there are no ttyUSBxx nodes. Only tty's 
> and ttySxx. I believe there should be a ttyUSBsomething being created, 
> and this should be entered in the ups.conf file.

No, USB devices are handled through /proc/bus/usb, not /dev/tty*.
 
>    Any suggestions?

I don't have time right now to work on a new subdriver, but you can
look at docs/hid-subdrivers.txt and that should give you an idea on
how to get started. Once you get something to work, you can post your
code and results on this list, and if it works well, we'll add it as a
supported device to NUT.

Thanks for your detective work, -- Peter



More information about the Nut-upsdev mailing list