[Nut-upsdev] [blazer_usb] Support for TECNOWARE ERA LCD (FGCERALCD0K85)
Rob Power
robpwr at gmail.com
Tue Jan 8 23:44:27 UTC 2013
Sorry for double mail, I had forgot the attachment.
2013/1/9 Rob Power <robpwr at gmail.com>
> Thanks for pointing out the wrong log.txt and info about port settings; I
> attached new ups.conf, lsusb output and new blazer_usb -DDDDD output with
> new settings, though it has no changes respect to the last one.
>
> I still didn't have figured out exactly all the blazer_usb code, I hope
> I'll have more time to study it tomorrow or during the week and to recheck
> the sniffed files; meanwhile if this new info may be useful somehow and
> there's something more I can try I'm always available.
>
> PS: about -DDDDD gave me the debug output, but UPS is not recognized;
> might the output together with sniffed data be enough useful to figure out
> how the communication works with that UPS?
>
>
> 2013/1/8 Charles Lepple <clepple at gmail.com>
>
>> On Jan 7, 2013, at 8:27 PM, Rob Power wrote:
>>
>> TL (0x05) or CT (0x0b) code seems not to be used in the relative sniffed file and 0x07 (Q in nut coding) seems to be related to "UPS No Ack" string).
>>
>> If I'm reading drivers/blazer_usb.c correctly, "UPS No Ack" causes the
>> read loop to retry (up to 10 times). This is similar to the USB-to-serial
>> converter code in tripplite_usb.c, where it looks to make sure that the
>> received buffer differs from what was sent the last time. But it's possible
>> that this UPS doesn't use Q, just Q1 (string index 3, which does return a
>> somewhat normal-looking buffer).
>>
>> { "test.battery.start.deep", "TL\r" },
>> { "test.battery.start.quick", "T\r" },
>> { "test.battery.stop", "CT\r" },
>>
>> Looks like TL and CT are for battery testing.
>>
>> I hate to nitpick about log.txt, but it appears to have the results from
>> the original langid_fix setting (0x4095) instead of 0x409. Could you please
>> capture and send that again? Using -DDDDD worked well. (I remember you said
>> it didn't work, but we're looking for any small differences in the output
>> that might narrow down where the problem lies.)
>>
>> port was setted according to lsusb output:
>> $ lsusb
>> [...]
>> Bus 002 Device 002: ID 0001:0000 Fry's Electronics
>>
>> Actually, for the USB drivers in NUT, the port setting is ignored
>> (although the NUT core needs some value, so we usually use 'auto'). The
>> matching is done by the numeric USB VID:PID combination.
>>
>> What does 'lsusb -vvv -d 0001:0000' return?
>>
>> --
>> Charles Lepple
>> clepple at gmail
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20130109/19c1d04a/attachment-0001.html>
-------------- next part --------------
############
# ups.conf #
############
[ERA_LCD]
driver = blazer_usb
langid_fix=0x0409
port = auto
# port = /dev/bus/usb/002/002
vendorid = 0001
productid = 0000
desc = "Tecnoware UPS ERA 0.85"
#########
# lsusb #
#########
$ lsusb -vvv -d 0001:0000
Bus 002 Device 002: ID 0001:0000 Fry's Electronics
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0001 Fry's Electronics
idProduct 0x0000
bcdDevice 1.00
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 624
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Device Status: 0x0002
(Bus Powered)
Remote Wakeup Enabled
################################
# blazer_usb -a ERA_LCD -DDDDD #
################################
$ sudo ./blazer_usb -a ERA_LCD -DDDDD
Network UPS Tools - Megatec/Q1 protocol USB driver 0.09 (2.6.5)
0.000000 debug level is '5'
0.002369 language ID workaround enabled (using '0x409')
0.175464 Checking device (1D6B/0001) (005/001)
0.175650 - VendorID: 1d6b
0.175667 - ProductID: 0001
0.175678 - Manufacturer: unknown
0.175690 - Product: unknown
0.175701 - Serial Number: unknown
0.175713 - Bus: 005
0.175723 Trying to match device
0.175758 Device does not match - skipping
0.175786 Checking device (1D6B/0001) (004/001)
0.175828 - VendorID: 1d6b
0.175841 - ProductID: 0001
0.175853 - Manufacturer: unknown
0.175864 - Product: unknown
0.175876 - Serial Number: unknown
0.175902 - Bus: 004
0.175912 Trying to match device
0.175927 Device does not match - skipping
0.175945 Checking device (1D6B/0001) (003/001)
0.175986 - VendorID: 1d6b
0.176000 - ProductID: 0001
0.176011 - Manufacturer: unknown
0.176023 - Product: unknown
0.176034 - Serial Number: unknown
0.176045 - Bus: 003
0.176055 Trying to match device
0.176069 Device does not match - skipping
0.176087 Checking device (0001/0000) (002/002)
0.187503 - VendorID: 0001
0.187965 - ProductID: 0000
0.188220 - Manufacturer: unknown
0.188474 - Product: unknown
0.188726 - Serial Number: unknown
0.188999 - Bus: 002
0.189249 Trying to match device
0.189618 Device matches
0.193619 send_to_all: SETINFO ups.vendorid "0001"
0.193688 send_to_all: SETINFO ups.productid "0000"
0.197608 send_to_all: SETINFO device.type "ups"
0.197657 send_to_all: SETINFO driver.version "2.6.5"
0.197703 send_to_all: SETINFO driver.version.internal "0.09"
0.197722 send_to_all: SETINFO driver.name "blazer_usb"
0.197738 Trying megatec protocol...
0.197751 send: Q1
0.201620 read: error sending control message: Protocol error
0.201683 blazer_status: short reply
0.201697 Status read 1 failed
0.201711 send: Q1
0.205610 read: error sending control message: Protocol error
0.205667 blazer_status: short reply
0.205680 Status read 2 failed
0.205695 send: Q1
0.209612 read: error sending control message: Protocol error
0.209672 blazer_status: short reply
0.209685 Status read 3 failed
0.209698 Trying mustek protocol...
0.209711 send: QS
0.209723 read: QS
0.209770 blazer_status: short reply
0.209785 Status read 1 failed
0.209797 send: QS
0.209808 read: QS
0.209820 blazer_status: short reply
0.209831 Status read 2 failed
0.209842 send: QS
0.209853 read: QS
0.209865 blazer_status: short reply
0.209876 Status read 3 failed
0.209899 Trying megatec/old protocol...
0.209911 send: D
0.209922 read: D
0.209933 blazer_status: short reply
0.209945 Status read 1 failed
0.209956 send: D
0.209967 read: D
0.209978 blazer_status: short reply
0.209990 Status read 2 failed
0.210001 send: D
0.210012 read: D
0.210023 blazer_status: short reply
0.210035 Status read 3 failed
0.210046 Trying zinto protocol...
0.210057 send: Q1
0.213610 read: error sending control message: Protocol error
0.213668 blazer_status: short reply
0.213681 Status read 1 failed
0.213695 send: Q1
0.217622 read: error sending control message: Protocol error
0.217686 blazer_status: short reply
0.217700 Status read 2 failed
0.217714 send: Q1
0.221608 read: error sending control message: Protocol error
0.221666 blazer_status: short reply
0.221679 Status read 3 failed
0.221692 No supported UPS detected
More information about the Nut-upsdev
mailing list