I'm trying to configure sysutils/nut to work with my new UPS, a CP1000PFCLCD. This shows up like so:
According to the NUT HCL, this is supported by the usbhid-ups driver. A few configuration files later and I have, for ups.conf
However, when trying to start upsd (as root for testing), I get:
Reading around, I've seen recommendations for using "port = auto", but that fails with the same error. So, if I can see it in dmesg, usbconfig, and in /dev/, why does upsd have so much trouble finding it? Anything else I should be doing to debug? Unfortunately the docs aren't that great, so I've been mostly relying on guides and other users' experiences, many of which are from FBSD 7.x/8.x, or FreeNAS, which has web configuration, so is of much less help.
Edit: found a little more info on debugging. Tried another USB port, where it shows up as ugen2.2 and ran:
So, is this device just not supported? I seem to recall reading that certain UPS devices had to be blacklisted from ugen, so that the correct driver (uhid?) could attach... [Edit: Whoops, that was the reverse that people were talking about, i.e. blacklisting it from uhid so ugen could attach]
Code:
# uname -mrs
FreeBSD 9.1-RC2 amd64
# dmesg|grep LCD
ugen1.3: <CP1000PFCLCD> at usbus1
# usbconfig|grep ugen1\.3
ugen1.3: <CRDA103-461 CP1000PFCLCD> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
# ls -l /dev/ugen1.3
lrwxr-xr-x 1 root wheel 9 Oct 18 02:25 /dev/ugen1.3 -> usb/1.3.0
# ls -l /dev/usb/1.3.0
crw------- 1 root operator 0, 131 Oct 18 02:25 /dev/usb/1.3.0
According to the NUT HCL, this is supported by the usbhid-ups driver. A few configuration files later and I have, for ups.conf
Code:
[CP1000PFCLCD]
driver = usbhid-ups
port = /dev/ugen1.3
desc = "CyberPower 600W/1000VA Pure Sine Wave UPS via USB"
However, when trying to start upsd (as root for testing), I get:
Code:
# upsd -DDDD
Network UPS Tools upsd 2.6.4-Unversioned directory
0.000000 fopen /var/db/nut/upsd.pid: No such file or directory
0.001335 /usr/local/etc/nut/upsd.conf is world readable
0.003906 listen_add: added 127.0.0.1:3493
0.005861 setuptcp: try to bind to 127.0.0.1 port 3493
0.007928 listening on 127.0.0.1 port 3493
0.010450 /var/run/nut is world readable
0.012052 [B][color="Red"]Can't connect to UPS [CP1000PFCLCD] (usbhid-ups-CP1000PFCLCD): No such file or directory[/color][/B]
0.016362 /usr/local/etc/nut/upsd.users is world readable
...
Reading around, I've seen recommendations for using "port = auto", but that fails with the same error. So, if I can see it in dmesg, usbconfig, and in /dev/, why does upsd have so much trouble finding it? Anything else I should be doing to debug? Unfortunately the docs aren't that great, so I've been mostly relying on guides and other users' experiences, many of which are from FBSD 7.x/8.x, or FreeNAS, which has web configuration, so is of much less help.
Edit: found a little more info on debugging. Tried another USB port, where it shows up as ugen2.2 and ran:
Code:
# /usr/local/libexec/nut/usbhid-ups -DDDDD -a CP1000PFCLCD
Network UPS Tools - Generic HID driver 0.37 (2.6.4-Unversioned directory)
USB communication driver 0.31
0.000000 send_to_all: SETINFO driver.parameter.port "/dev/ugen2.2"
0.000095 debug level is '5'
0.001747 upsdrv_initups...
0.002136 No appropriate HID device found
0.002178 No matching HID UPS found
So, is this device just not supported? I seem to recall reading that certain UPS devices had to be blacklisted from ugen, so that the correct driver (uhid?) could attach... [Edit: Whoops, that was the reverse that people were talking about, i.e. blacklisting it from uhid so ugen could attach]