[Nut-upsuser] upd and OpenBSD (was Nut 2.7.2 on OpenBSD 5.6 with APC USB UPS)

Stan Gammons sg063015 at gmail.com
Wed Sep 24 01:18:57 UTC 2014


On 09/23/14 07:26, Charles Lepple wrote:
> 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?
>

To me it sounded like the patch isn't going to be in OpenBSD 5.6 or 5.7 
and upd is the preferred way to attach to a UPS.  Personally, I wish it 
was left the way is was, without upd.  To get the USB UPS I have to 
work, one needs to rebuild the kernel with the usb quirks patch and 
disable upd at boot. Not a big deal, but not the ideal way to do it in 
my opinion.


Stan




More information about the Nut-upsuser mailing list