Programmer-ish question on USB Device (Energizer UPS)

My advice: get a UPS device that works with OS X out of the box
clvrmnky wrote on :

On 05/09/2004 9:22 AM, Eric Schneck wrote: [...]

I wish that it were a "recognizable UPS", but it is not (I checked the Energy Saver prefs and the help file to make sure.) I have installed the Network UPS Tools (NUT) softwarem but that software requires a Unix-style device name (/dev/usb/...) and I cannot find or make such a mount point.

That is not a mount point. /dev/usb/... are special filesystem nodes that correspond with block devices. You do not want to mount this device anywhere (especially on it's block control device node), but have the ups daemon monitor this device node that corresponds to the UPS device. Communication is done through this port, and both the daemon and the UPS have to speak the same language once the connection is sound.

Take a look at the NUT documentation. The ups.conf takes a "port=" config. Often this port is a serial port, which is likely to work on a wider variety of systems. OS X handles USB access via USB Device Arbitration mechanisms, some of which require a kernel extension. That is, there is no simple Unix block device representing the various USB devices that OS X can handle.

A look at http://us1.networkupstools.org/compat/ indicates that NUT does not have tested support for "Energizer" products. It may work with the serial port (if you are lucky) with existing drivers. However, it may be that the NUT project needs someone to support this hardware explicitly.

Heck, some UPS devices even need special cables to work with alternate systems.

My advice: get a UPS device that works with OS X out of the box, or review the supported NUT configs and get hardware that is known to work with that. Assume a sort of FreeBSD system for OS X, which implies getting a device that talks via the serial port. This can be a problem for OS X, obviously, so caveat emptor.

Another solution might be to have an edge or server box that can talk to a UPS device send network traffic to a listening daemon on your OS X machine(s) to tell it/them to shut down gracefully.

Eric Schneck replied on :

clvrmnky wrote:

On 05/09/2004 9:22 AM, Eric Schneck wrote: [...]

I wish that it were a "recognizable UPS", but it is not (I checked the Energy Saver prefs and the help file to make sure.) I have installed the Network UPS Tools (NUT) softwarem but that software requires a Unix-style device name (/dev/usb/...) and I cannot find or make such a mount point.

That is not a mount point. /dev/usb/... are special filesystem nodes that correspond with block devices. You do not want to mount this device anywhere (especially on it's block control device node), but have the ups daemon monitor this device node that corresponds to the UPS device. Communication is done through this port, and both the daemon and the UPS have to speak the same language once the connection is sound.

OK. Thanks for clarifying that for me.