UPS won't work under Debian Lenny
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
I am using Debian Lenny, w. kernel 2.26-2-686-bigmem.
I have a MGE UPS ProtectionCenter 675. It works under Windows XP, and
physically works.
It has a USB which is linked with this computer. The first problem is:
# lsusb
Bus 008 Device 002: ID 152d:2336 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 03f0:3304 Hewlett-Packard DeskJet 990c
Bus 002 Device 002: ID 046d:c03e Logitech, Inc. Premium Optical Wheel Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
There is actually no recognized UPS, even if
# dmesg | grep hid
[ 4.769903] usbcore: registered new interface driver hiddev
[ 4.909003] input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:1a.1-1
[ 4.909018] usbcore: registered new interface driver usbhid
[ 4.909020] usbhid: v2.6:USB HID core driver
HID is thus ok, even if I should have hid extensions for my UPS in
this list.
I then
# mknod /dev/usb/hiddev0 c 180 96
Then,
# apt-get install nut nut-usb mgeups-psp
Everything is fine, even if nut-usb is a virtual package, apparently
provided by nut, AFAIK.
I then edit /etc/default/nut, putting
==
# start upsd
START_UPSD=yes
# start upsmon
START_UPSMON=yes
==
(I am on the `master' computer, for the UPS.)
I then write in /etc/nut/ups.conf:
==
# define the ups driver and the port where it's connected
[myups]
driver=hidups
port=/dev/usb/hiddev0
==
I then create the network config (in /etc/nut/upsd.conf):
==
# access-lists:
ACL all 0.0.0.0/0
ACL localhost 127.0.0.1/32
ACL lan 192.168.1.0/24
# rights:
ACCEPT localhost lan
REJECT all
==
(justified as my upsd is 2.2.2.)
I then edit /etc/nut/upsd.users:
==
# define the user rights according to the ACL in upsd.conf
[user]
password = mypassword
allowfrom = localhost lan
upsmon master
==
After that, I evidently edit /etc/nut/upsmon.conf:
==
# define the ups to monitor and the permissions
MONITOR myups@localhost 1 nutuser mypassword master
# define the shutdown comand
SHUTDOWNCMD "/sbin/shutdown -h now"
==
I finally create a `nutuser' user, in the `nut' group.
I then have:
# /etc/init.d/nut start
Starting Network UPS Tools: (upsdrvctl failed).
Okay. The output of
# dmesg | grep hid
is still the same.
I then notice that
# cat ups.conf
# define the ups driver and the port where it is connected
[myups]
driver=hidups
port=/dev/usb/hiddev0
seems to use a not-known driver, as `hidups' seems to be disliked:
# upsdrvctl start
Network UPS Tools - UPS driver controller 2.2.2
Can't start /lib/nut/hidups: No such file or directory
I then modify ups.conf, changing the `driver' to `newhidups'. It then
results in
# upsdrvctl start
Network UPS Tools - UPS driver controller 2.2.2
Can't start /lib/nut/newhidups: No such file or directory
I then try some advice I found on a russian forum, /i.e./ adding
`user=nutuser' at the end of ups.conf. I then try with the three
different drivers. Still same problem.
After a
/lib/nut# ls -al
I then realize that usbhid-ups could be a potential driver (the two
other being not listed here: why?). I then try to write
==
# define the ups driver and the port where it is connected
[myups]
driver=usbhid-ups
port=/dev/usb/hiddev0
==
with or without the `user' field. Seems to be better:
# upsdrvctl start
Network UPS Tools - UPS driver controller 2.2.2
Network UPS Tools: 0.29 USB communication driver - core 0.33 (2.2.2)
No matching HID UPS found
But still no UPS found.
I then try
# netstat -taup
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:nfs *:* LISTEN -
tcp 0 0 *:afpovertcp *:* LISTEN 3926/afpd
tcp 0 0 *:nut *:* LISTEN 4624/upsd
tcp 0 0 *:swat *:* LISTEN 3403/inetd
tcp 0 0 *:36646 *:* LISTEN 3378/rpc.mountd
tcp 0 0 *:git *:* LISTEN 4013/git-daemon
tcp 0 0 *:50766 *:* LISTEN -
tcp 0 0 *:sunrpc *:* LISTEN 2441/portmap
tcp 0 0 localhost:7634 *:* LISTEN 3324/hddtemp
tcp 0 0 *:ssh *:* LISTEN 3537/sshd
tcp 0 0 localhost:8118 *:* LISTEN 3411/privoxy
tcp 0 0 *:ipp *:* LISTEN 2965/cupsd
tcp 0 0 localhost:31416 *:* LISTEN 3837/boinc
tcp 0 0 localhost:smtp *:* LISTEN 3235/exim4
tcp 0 0 *:55097 *:* LISTEN 2453/rpc.statd
tcp 0 0 localhost:31416 localhost:56013 ESTABLISHED 3837/boinc
tcp 1 0 merciadriluca-sta:56108 QAH.UNI-MUENSTER.DE:www CLOSE_WAIT 3837/boinc
tcp 0 0 localhost:43979 localhost:nut ESTABLISHED 4627/upsmon
tcp 1 0 merciadriluca-sta:58961 QAH.UNI-MUENSTER.DE:www CLOSE_WAIT 4377/Amolqc-preRC1-
tcp 1 0 merciadriluca-sta:49312 ez-in-f103.1e100.ne:www CLOSE_WAIT 4289/firefox-bin
tcp 1 0 merciadriluca-sta:60528 QAH.UNI-MUENSTER.DE:www CLOSE_WAIT 3837/boinc
tcp 0 0 localhost:nut localhost:43979 ESTABLISHED 4624/upsd
tcp 7336 0 merciadriluca-sta:60362 216.155.136.196.ch:1755 ESTABLISHED 4057/vlc
tcp 1 0 merciadriluca-sta:58976 QAH.UNI-MUENSTER.DE:www CLOSE_WAIT 4377/Amolqc-preRC1-
tcp 0 0 merciadriluca-sta:51102 forum-hardwarefr.bs:www TIME_WAIT -
tcp 1 0 merciadriluca-sta:45424 ez-in-f101.1e100.ne:www CLOSE_WAIT 4289/firefox-bin
tcp6 0 0 [::]:git [::]:* LISTEN 4013/git-daemon
tcp6 0 0 [::]:netbios-ssn [::]:* LISTEN 3420/smbd
tcp6 0 0 [::]:ssh [::]:* LISTEN 3537/sshd
tcp6 0 0 [::]:ipp [::]:* LISTEN 2965/cupsd
tcp6 0 0 [::]:microsoft-ds [::]:* LISTEN 3420/smbd
udp 0 0 *:nfs *:* -
udp 0 0 *:49158 *:* 2862/avahi-daemon:
udp 0 0 *:45324 *:* 2453/rpc.statd
udp 0 0 *:933 *:* 2453/rpc.statd
udp 0 0 *:bootpc *:* 3484/dhclient3
udp 0 0 *:55110 *:* 3378/rpc.mountd
udp 0 0 *:59224 *:* -
udp 0 0 *:mdns *:* 2862/avahi-daemon:
udp 0 0 *:sunrpc *:* 2441/portmap
udp 0 0 *:ipp *:* 2965/cupsd
udp6 0 0 [::]:36521 [::]:* 2862/avahi-daemon:
udp6 0 0 [::]:mdns [::]:* 2862/avahi-daemon:
You can see that there is no problem there.
I occasionnaly receive
==
Broadcast Message from nut@merciadriluca-station
(somewhere) at 16:21 ...
UPS myups@localhost is unavailable
==
This can be understood easily, as
# cat /var/log/syslog
and
# cat /var/log/daemon.log
give me
[...]
Dec 25 16:46:46 merciadriluca-station upsd[4624]: Can't connect to UPS [myups] (hidups-myups): No such file or directory
Dec 25 16:46:47 merciadriluca-station upsmon[4627]: Poll UPS
[myups@localhost] failed - Driver not connected
[...]
Dec 25 16:47:17 merciadriluca-station upsmon[4627]: UPS myups@localhost is unavailable
Dec 25 16:47:22 merciadriluca-station upsmon[4627]: Poll UPS [myups@localhost] failed - Driver not connected
[...]
The best result I had was
Dec 25 16:16:41 merciadriluca-station upsmon[3935]: Signal 15: exiting
Dec 25 16:16:41 merciadriluca-station upsd[4406]: Client user@127.0.0.1 logged out
Dec 25 16:16:41 merciadriluca-station upsmon[3933]: upsmon parent: read
Dec 25 16:16:41 merciadriluca-station upsd[4406]: Signal 15: exiting
Dec 25 16:16:46 merciadriluca-station upsd[4623]: /etc/nut/upsd.conf is world readable
Dec 25 16:16:46 merciadriluca-station upsd[4623]: listening on 0.0.0.0 port 3493
Dec 25 16:16:46 merciadriluca-station upsd[4623]: Can't connect to UPS [myups] (hidups-myups): No such file or directory
Dec 25 16:16:46 merciadriluca-station upsd[4623]: /etc/nut/upsd.users is world readable
Dec 25 16:16:46 merciadriluca-station upsd[4624]: Startup successful
Dec 25 16:16:46 merciadriluca-station upsmon[4626]: Startup successful
Dec 25 16:16:46 merciadriluca-station upsd[4624]: Connection from 127.0.0.1
Dec 25 16:16:46 merciadriluca-station upsd[4624]: Client nutuser@127.0.0.1 logged into UPS [myups]
However, I always had
# upsc myups@localhost
Error: Driver not connected
Is there somebody out here who would be able to get me out of these
problems? My idea is that the problem comes from the `driver' and its
corresponding value.
Thanks folks.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAks03/MACgkQM0LLzLt8Mhw0EwCdFgUTdNxLaet07GiZPiwbtdgp
i8YAn15X57cXyLVPTGqyvPyG1JL9uHRp
=GXyf
-----END PGP SIGNATURE-----
Reply to: