[Nut-upsuser] upd and OpenBSD (was Nut 2.7.2 on OpenBSD 5.6 with APC USB UPS)
Charles Lepple
clepple at gmail.com
Tue Sep 23 12:26:50 UTC 2014
On Sep 23, 2014, at 3:55 AM, Henning Brauer <hb-nut at bsws.de> wrote:
> We have upd(4) attaching to these devices now. Either nut needs a
> driver getting status from upd (trivial, will show up in the
> hw.sensors sysctl tree) or we need some way for nut still being able
> to talk to the ups directly, without upd and nut interfering with each
> other.
While a upd(4) driver is certainly technically feasible, and probably would not be too complicated to write, I will leave that to someone else to work on. From a quick glance at the upd(4) man page[*], it looks like a step backwards in terms of available information, and I don't see any information about sending commands to the UPS (to initiate an UPS self-test or shutdown, for instance).
[*] http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man4/upd.4?query=upd&sec=4
If OpenBSD implements the logic behind the libusb_detach_kernel_driver() call (does not seem to be upstream, as of libusb-1.0.18), this would allow users to decide at runtime which method they would like to use for monitoring the UPS.
I have never really liked side-stepping the OS HID drivers, so if there is a way to do this from userspace with uhid(4) instead of ugen+libusb, that would be handy. But that's a lot of driver rewriting.
In the mean time, it looks like we will have to document around this. Back to one of my earlier questions, what is the status of that patch that Stan posted from Stuart Henderson? From 5.6 onwards, is that sufficient for users to apply, or is there another patch needed to deconflict ugen and upd?
--
Charles Lepple
clepple at gmail
More information about the Nut-upsuser
mailing list