UPSmart 通过 USB 连接 UPS 时总是显示“连接失败”

UPSmart 通过 USB 连接 UPS 时总是显示“连接失败”

我想将 UPS(Irbis ISL1000ET)连接到 OS(Ubuntu 18.04),这样当电源关闭且电池电量不足时,OS 会自动关闭。

但是我无法做到这一点——我使用超级用户将 UPSmart 程序(与 UPS 一起正式分发)安装到默认位置(/opt/UPSmart),以超级用户身份运行它,但它无法通过 USB 连接到 UPS——无论是“单相 UPS(USB)”,还是“三相 UPS(USB)”,还是“Mega(USB)”模式都无法连接。

我是否应该安装任何附加驱动程序或使用其他软件来让 UPS 关闭我的计算机?

提前致谢。

答案1

为了使其在 UBUNTU 上运行,需要按照以下要求制定 udev 规则:


# This is a sample udev file for HIDAPI devices which changes the permissions
# to 0666 (world readable/writable) for a specified device on Linux systems.


# If you are using the libusb implementation of hidapi (libusb/hid.c), then
# use something like the following line, substituting the VID and PID with
# those of your device. Note that for kernels before 2.6.24, you will need
# to substitute "usb" with "usb_device". It shouldn't hurt to use two lines
# (one each way) for compatibility with older systems.

# HIDAPI/libusb
SUBSYSTEM=="usb", ATTRS{idVendor}=="0001", ATTRS{idProduct}=="0000", MODE="0666"


# If you are using the hidraw implementation (linux/hid.c), then do something
# like the following, substituting the VID and PID with your device. Busnum 1
# is USB.

# HIDAPI/hidraw
KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="0001", ATTRS{idProduct}=="0000", MODE="0666"

# Once done, optionally rename this file for your device, and drop it into
# /etc/udev/rules.d and unplug and re-plug your device. This is all that is
# necessary to see the new permissions. Udev does not have to be restarted.

# Note that the hexadecimal values for VID and PID are case sensitive and
# must be lower case.

# If you think permissions of 0666 are too loose, then see:
# http://reactivated.net/writing_udev_rules.html for more information on finer
# grained permission setting. For example, it might be sufficient to just
# set the group or user owner for specific devices (for example the plugdev
# group on some systems).

相关内容