ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] NUT + Powercom странности...
@ 2004-10-22 12:21 Alexander Markelov
  2004-10-22 14:56 ` Werstak
  2004-10-25  6:38 ` [sisyphus] NUT + APC Back UPS 500 ES странности Epiphanov Sergei
  0 siblings, 2 replies; 26+ messages in thread
From: Alexander Markelov @ 2004-10-22 12:21 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussion list

Доброго времени суток всем.
Умею систему из сизифа + nut

rpm -qa | grep nut-
nut-server-2.0.1-alt0.1
nut-cgi-2.0.1-alt0.1
nut-driver-2.0.1-alt0.1
nut-2.0.1-alt0.1

Так же имеется упс Powercom 625 подключен к Com1.
ls -l /dev/ttyS0
crw-rw----  1 root uucp 4, 64 Окт 22 16:05 /dev/ttyS0

setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test
Драйвер powercom не работает в логах пишет следующие:
Oct 22 16:09:29 exit upsdrvctl: Network UPS Tools - UPS driver 
controller 2.0.1-pre4
Oct 22 16:09:29 exit upsdrv: Starting UPS drivers: succeeded
Oct 22 16:09:29 exit powercom[8286]: Startup successful
Oct 22 16:09:32 exit powercom[8286]: data receiving error (-1 instead of 
16 bytes)

cat /etc/nut/ups.conf
[exit]
    driver = powercom
    port = /dev/ttyS0
    desc = "Exit gateway"
    type = KP625AP

При более детально расмотрении выяснилось вот что:
cd /lib/nut
Запуск драйвера с дебагам пишет тоже самое что и в логах:
./powercom -D -D  -u upsdrv -x type=KP625AP /dev/ttyS0

Network UPS Tools - PowerCom and similars protocol UPS driver $ 
Revision: 0.5 $ (2.0.1-pre4)

debug level is '2'
Values of arguments:
 manufacturer            : 'PowerCom'
 model name              : 'Unknown'
 serial number           : 'Unknown'
 line voltage            : '230'
 type                    : 'KP625AP'
 number of bytes from UPS: '16'
 method of flow control  : 'dtr0rts1'
 validation sequence: '{{5,0x80},{7,0},{8,0}}'
 shutdown arguments: '{{0,10},n}'
 frequency calculation coefficients: '{0.000210,0.000209}'
 load percentage calculation coefficients: 
'{6.134300,-0.380800,4.311000,0.181100}'
 battery percentage calculation coefficients: 
'{5.000000,0.326800,-825.000000,4.563900,-835.820007}'
 voltage calculation coefficients: '{0.954500,0.000000}'
DTR => 0, RTS => 1
data receiving error (-1 instead of 16 bytes)
dstate_init: sock /var/lib/upsd/powercom-ttyS0 open on fd 8
data receiving error (-1 instead of 16 bytes)
Signal 2: exiting

Но, о чудо, в процессе игры с "setserial /dev/ttyS0 и параметры" 
выяснилось следующие:
делаем:
setserial /dev/ttyS0 baud_base 115200
(хотя у нас и так baud_base равен 115200)
и после этого запускаем драйвер:
./powercom -D -D  -u upsdrv -x type=KP625AP /dev/ttyS0

Network UPS Tools - PowerCom and similars protocol UPS driver $ 
Revision: 0.5 $ (2.0.1-pre4)

debug level is '2'
Values of arguments:
 manufacturer            : 'PowerCom'
 model name              : 'Unknown'
 serial number           : 'Unknown'
 line voltage            : '230'
 type                    : 'KP625AP'
 number of bytes from UPS: '16'
 method of flow control  : 'dtr0rts1'
 validation sequence: '{{5,0x80},{7,0},{8,0}}'
 shutdown arguments: '{{0,10},n}'
 frequency calculation coefficients: '{0.000210,0.000209}'
 load percentage calculation coefficients: 
'{6.134300,-0.380800,4.311000,0.181100}'
 battery percentage calculation coefficients: 
'{5.000000,0.326800,-825.000000,4.563900,-835.820007}'
 voltage calculation coefficients: '{0.954500,0.000000}'
DTR => 0, RTS => 1
input.frequency: 49.10
output.frequency: 48.60
ups.load: 64.8
battery.charge: (null)
input.voltage: 217.0
output.voltage: 217.0
STATUS: OL
dstate_init: sock /var/lib/upsd/powercom-ttyS0 open on fd 8
data receiving error (-1 instead of 16 bytes)
Signal 2: exiting

Первый опрос проходит удачно, дальше же опять ничего от упса не получаем 
:( И так постоянно после запуска setserial с baud_base именно 115200 
драйвер один раз показывает состояние упса, и потом надо опять запускать 
setserial

Есть идеи, где что покрутить, что бы нормально заработало ?



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2004-10-27 15:42 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-22 12:21 [sisyphus] NUT + Powercom странности Alexander Markelov
2004-10-22 14:56 ` Werstak
2004-10-22 18:35   ` Alexander Markelov
2004-10-22 21:10     ` Vitaly Lipatov
2004-10-23  7:11       ` Alexander Markelov
2004-10-25  6:38 ` [sisyphus] NUT + APC Back UPS 500 ES странности Epiphanov Sergei
2004-10-25  9:12   ` Maxim Tyurin
2004-10-25 12:28     ` Andrei Bulava
2004-10-25 12:35       ` Maxim Tyurin
2004-10-25 12:47         ` Led
2004-10-25 12:57           ` Epiphanov Sergei
2004-10-25 15:28             ` Andrei Bulava
2004-10-25 12:42       ` Epiphanov Sergei
2004-10-25 12:48       ` Epiphanov Sergei
2004-10-25 14:21         ` Andrei Bulava
2004-10-26  6:34           ` Epiphanov Sergei
2004-10-25 12:42     ` Epiphanov Sergei
2004-10-25 12:53       ` Maxim Tyurin
2004-10-25 13:08         ` Epiphanov Sergei
2004-10-25 13:05           ` Led
2004-10-25 14:15             ` Epiphanov Sergei
2004-10-25 13:12           ` Maxim Tyurin
2004-10-26  7:07             ` Led
2004-10-25 14:28         ` Epiphanov Sergei
2004-10-26  1:33     ` Ткаченко Максим
2004-10-27 15:42     ` [sisyphus] [JT] " Alexey Morozov

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git