Michel Bouissou
2008-May-24 08:07 UTC
[Nut-upsdev] More info about Unitek UPS not working with Megatec driver
Hi again, I tested several times using the Megatec driver from nut 2.2.2 to no avail, as it definitely never "sees" the UPS. Always getting : # drivers/megatec -DDD -a Alpha Network UPS Tools 2.2.2 - Megatec protocol driver 1.5.14 [megatec] Carlos Rodrigues (c) 2003-2008 debug level is '3' Starting UPS detection process... Asking for UPS status [Q1]... Q1 => FAILED [timeout] Asking for UPS status [Q1]... Q1 => FAILED [timeout] Asking for UPS status [Q1]... Q1 => FAILED [timeout] Asking for UPS status [Q1]... Q1 => FAILED [timeout] Asking for UPS status [Q1]... Q1 => FAILED [timeout] 5 out of 5 detection attempts failed (minimum failures: 2). Megatec protocol UPS not detected. To help check what my UPS gives, here is the output of several commands and UPS answers manually passed using "minicom" set to use /dev/ttyS0 at 2400 8N1 : I #UNITEK Alpha500iC A0 Q1 (235.9 235.9 235.9 012 50.0 13.8 32.0 00001000 F #230.0 6 12.0 50.0 Here is the sample output of "upsc" using the old "fentonups" driver which I had patched: root at totor:/etc# upsc alpha at localhost battery.charge: 100.0 battery.voltage: 13.8 driver.name: fentonups driver.parameter.lowbattvolt: 11.5 driver.parameter.port: /dev/ttyS0 driver.version: 2.0.5 driver.version.internal: 1.22 input.frequency: 50.0 input.transfer.high: 288 input.transfer.low: 172 input.voltage: 237.5 output.voltage: 237.5 ups.load: 014 ups.mfr: UNITEK ups.model: Alpha 500 iC ups.status: OL Hope this can be of any help... Best regards. -- Michel Bouissou <michel at bouissou.net> OpenPGP ID 0xEB04D09C
Michel Bouissou
2008-May-24 11:14 UTC
[Nut-upsdev] Megatec driver : Definitely a serial com setup issue !
Hi there, I wanted to try to debug what was happening between the nut 2.2.2 Megatec driver and my UPS, so I installed a serial port sniffer software, http://sourceforge.net/projects/slsnif/ Then I fired up slsnif and started the Megatec driver, but specifying "/dev/ttyp0" instead of "/dev/ttyS0" in ups.conf (ttyp0 being intercepted by the sniffer and then routed out to ttyS0) To my huge surprise the Megatec driver said : # drivers/megatec -DDD -a Alpha Network UPS Tools 2.2.2 - Megatec protocol driver 1.5.14 [megatec] Carlos Rodrigues (c) 2003-2008 debug level is '3' Starting UPS detection process... Asking for UPS status [Q1]... Q1 => OK [(238.3 238.3 238.3 013 50.0 13.8 32.0 00001000] Asking for UPS status [Q1]... Q1 => OK [(238.3 238.3 238.3 012 50.0 13.8 32.0 00001000] Asking for UPS status [Q1]... Q1 => OK [(238.3 238.3 238.3 012 50.0 13.8 32.0 00001000] Asking for UPS status [Q1]... Q1 => OK [(238.3 238.3 238.3 013 50.0 13.8 32.0 00001000] Asking for UPS status [Q1]... Q1 => OK [(238.3 238.3 238.3 013 50.0 13.8 32.0 00001000] 0 out of 5 detection attempts failed (minimum failures: 2). Cancelling any pending shutdown or battery test. Asking for UPS information [I]... I => OK [#UNITEK Alpha500iC A0 ] Megatec protocol UPS detected [UNITEK Alpha500iC A0]. Parameter [ignoreoff]: [false] Asking for UPS power ratings [F]... F => OK [#230.0 6 12.0 50.0] 12.0V battery, interval [9.7V, 13.7V]. Done setting up the UPS. Asking for UPS status [Q1]... Q1 => OK [(236.7 236.7 236.7 013 50.0 13.8 32.0 00001000] Calculated battery charge: 100.0% Fatal error: unable to create listener socket bind /var/state/ups/megatec-Alpha failed: Permission denied Exiting. Okay, I don't care about the end, that's a permission issue, but this shows that : - The serial dialog being somewhat "remixed" by the serial sniffer, the Megatec driver is happy and finds my UPS. - When trying to talk to the serial port by itself, the Megatec driver miserably fails. I have double-checked that there is no permission issue with the serial port itself, of course... So in some manner the "sniffer" fixes nut's driver (in)ability to properly use the computers' serial port. This is completely reproductible and 100% consistent everytime. Uh, Uh... Any clue ? -- Michel Bouissou <michel at bouissou.net> OpenPGP ID 0xEB04D09C
Possibly Parallel Threads
- REGRESSION: New "megatec" driver does't work for UPS that was managed by old fentonups driver
- Unitek ALPHA 1200 Sx USB cable
- How can I setup Ubuntu 7.04 feisty + Udev + Nut + Unitek Ups (megatec) + Usb ????
- [HCL] UNITEK Alpha650ipF supported by blazer_usb
- Eaton / MGE Ellipse MAX 600 USBS and nut