[Nut-upsdev] Patch to support GE EP series

Danilo Godec danilo.godec at agenda.si
Fri Apr 15 22:04:29 UTC 2011


On 15.4.2011 8:36, Arjen de Korte wrote:
> Citeren Danilo Godec <danilo.godec at agenda.si>:
>
>> The UPS has both RS232 and USB connection. To use the RS232 connection,
>> I had to use the 'cablepower = none' as the UPS is using only RX, TX and
>> GND pins.
>
> If the UPS really only uses the RX and TX pins, the setting of
> 'cablepower' is irrelevant.

Yes, the supplied RS232 cable only has three connected pins. Without
setting 'cablepower=none', the driver didn't detect the UPS.

>
>> So my 'usp.conf' was a bit like that:
>>
>>> [myups]
>>>         driver = blazer_ser
>>>         port = /dev/ttyS0
>>>         cablepower = none
>>>         desc = "Local UPS"
>>
>> To use the USB connection required a bit more work, but I eventually
>> found out what it takes:
>>
>>> [myups]
>>>         driver = blazer_usb
>>>         port = /dev/ttyS0  # probably irrelevant
>>>         vendorid = 14f0
>>>         productid = 00c9
>>>         subdriver = phoenix
>>>         desc = "Local UPS"
>
> Have you also tried *all* the other subdrivers? The 'phoenix'
> subdriver was an early attempt to work around some issue we found in a
> particular USB to serial converter, which later turned out to be
> better solved in the 'ippon' subdriver. Make sure you have also tested
> the latter.

I tried 'cypress', 'krauler', 'ippon' and 'phoenix'. The driver only
detects the UPS with 'phoenix'.

Using ' -DDDDD -a myups -x subdriver=ippon' I see there is *some*
communication - the UPS responds to Q1 command, but then it all fails
with this:

>    0.000000     send_to_all: SETINFO driver.parameter.port "/dev/ttyS0"
>    0.000114     send_to_all: SETINFO driver.parameter.vendorid "14f0"
>    0.000142     send_to_all: SETINFO driver.parameter.productid "00c9"
>    0.000168     send_to_all: SETINFO driver.parameter.subdriver "ippon"
>    0.000192     send_to_all: SETINFO driver.parameter.bus "004"
>    0.000254     debug level is '20'
>    0.133126     Checking device (1D6B/0002) (001/001)
> libusb couldn't open USB device /dev/bus/usb/001/001: Permission denied.
> libusb requires write access to USB device nodes.
>    0.133230     Failed to open device, skipping. (Permission denied)
>    0.133251     Checking device (1D6B/0001) (002/001)
> libusb couldn't open USB device /dev/bus/usb/002/001: Permission denied.
> libusb requires write access to USB device nodes.
>    0.133289     Failed to open device, skipping. (Permission denied)
>    0.133307     Checking device (1D6B/0001) (003/001)
> libusb couldn't open USB device /dev/bus/usb/003/001: Permission denied.
> libusb requires write access to USB device nodes.
>    0.133362     Failed to open device, skipping. (Permission denied)
>    0.133381     Checking device (1D6B/0001) (004/001)
> libusb couldn't open USB device /dev/bus/usb/004/001: Permission denied.
> libusb requires write access to USB device nodes.
>    0.133418     Failed to open device, skipping. (Permission denied)
>    0.133436     Checking device (14F0/00C9) (004/045)
>    0.157543     - VendorID: 14f0
>    0.157573     - ProductID: 00c9
>    0.157589     - Manufacturer: GE
>    0.157606     - Product: GE EP series UPS
>    0.157622     - Serial Number: unknown
>    0.157638     - Bus: 004
>    0.157654     Trying to match device
>    0.157735     Device matches
>    0.157765     failed to claim USB device: Device or resource busy
>    0.160510     detached kernel driver from USB device...
>    0.166547     send_to_all: SETINFO ups.vendorid "14f0"
>    0.166577     send_to_all: SETINFO ups.productid "00c9"
>    0.166608     send_to_all: SETINFO device.type "ups"
>    0.166629     send_to_all: SETINFO driver.version "2.6.0"
>    0.166650     send_to_all: SETINFO driver.version.internal "0.03"
>    0.166670     send_to_all: SETINFO driver.name "blazer_usb"
>    0.166687     Trying megatec protocol...
>    0.170545     send: Q1
>    0.415540     read: (235.0 140.0 220.0 001 50.0 2.27 31.5 00000000
>    0.415596     send_to_all: SETINFO input.voltage "235.0"
>    0.415625     send_to_all: SETINFO input.voltage.fault "140.0"
>    0.415648     send_to_all: SETINFO output.voltage "220.0"
>    0.415688     send_to_all: SETINFO ups.load "1"
>    0.415712     send_to_all: SETINFO input.frequency "50.0"
>    0.415739     send_to_all: SETINFO battery.voltage "2.27"
>    0.415763     send_to_all: SETINFO ups.temperature "31.5"
>    0.415783     send_to_all: SETINFO beeper.status "disabled"
>    0.415804     send_to_all: SETINFO ups.type "online"
>    0.415826     send_to_all: SETINFO ups.status "OL"
>    0.415844     Status read in 1 tries
>    0.415860     Supported UPS detected with megatec protocol
>    1.418513     send: Connection timed out
>    1.418549     blazer_rating: short reply
>    1.418567     Rating read 1 failed
>    1.422507     send: Numerical result out of range
>    1.422529     blazer_rating: short reply
>    1.422546     Rating read 2 failed
>    1.426506     send: Numerical result out of range
>    1.426531     blazer_rating: short reply
>    1.426548     Rating read 3 failed
>    1.426564     Rating information unavailable
>    1.430503     send: Numerical result out of range
>    1.430526     blazer_vendor: short reply
>    1.430542     Vendor information read 1 failed
>    1.434504     send: Numerical result out of range
>    1.434527     blazer_vendor: short reply
>    1.434544     Vendor information read 2 failed
>    1.438503     send: Numerical result out of range
>    1.438525     blazer_vendor: short reply
>    1.438541     Vendor information read 3 failed
>    1.438557     Vendor information unavailable
>    1.438574     Battery runtime will not be calculated (runtimecal not
> set)
>    1.438597     send_to_all: SETINFO ups.delay.start "180"
>    1.438619     send_to_all: SETINFO ups.delay.shutdown "30"
>    1.438638     send_to_all: ADDCMD beeper.toggle
>    1.438656     send_to_all: ADDCMD load.off
>    1.438674     send_to_all: ADDCMD load.on
>    1.438693     send_to_all: ADDCMD shutdown.return
>    1.438711     send_to_all: ADDCMD shutdown.stayoff
>    1.438729     send_to_all: ADDCMD shutdown.stop
>    1.438774     send_to_all: ADDCMD test.battery.start
>    1.438793     send_to_all: ADDCMD test.battery.start.deep
>    1.438812     send_to_all: ADDCMD test.battery.start.quick
>    1.438831     send_to_all: ADDCMD test.battery.stop
>    1.442504     send: Numerical result out of range
>    1.442526     blazer_status: short reply
>    1.442543     Communications with UPS lost: status read failed!
>    1.442649     dstate_init: sock /var/lib/ups/blazer_usb-UPS1 open on
> fd 7
>    1.442675     send_to_all: SETINFO driver.parameter.pollinterval "2"
>    1.446505     send: Numerical result out of range
>    1.446527     blazer_status: short reply
>    1.446543     Communications with UPS lost: status read failed!
>    3.444730     send: No such device or address
>    3.444811     blazer_status: short reply
>    3.444831     Communications with UPS lost: status read failed!
>    3.537369     Signal 2: exiting

Hope this helps.


There are some timeout using 'phoenix' too, but generally it works and I
can use 'upsc myups' to get the data...

  Danilo




More information about the Nut-upsdev mailing list