Do you plan to implement any UPS functionality like clean shutdown in the event of a power outage?
I have configured NUT to work with my UPS. The problem is that after the reboot, the DNS325 does not see the connected UPS. LSUSB does not display connected UPS. You need to pull out the cable and reconnect.
What can be done in this case?
This is what I see in dmsg immediately after loading
...
usb 1-1: new low-speed USB device number 3 using orion-ehci
hid-generic 0003:0665:5161.0001: device has no listeners, quitting
...
usbcore: registered new interface driver usblp
And no devices in /dev/bus/usb
# lsmod
Module Size Used by Not tainted
usblp 8480 0
ipv6 247420 20 [permanent]
Now I reconnect the UPS
usb 1-1: USB disconnect, device number 3
usb 1-1: new low-speed USB device number 4 using orion-ehci
hid-generic 0003:0665:5161.0002: device has no listeners, quitting
# lsmod
Module Size Used by Not tainted
usblp 8480 0
ipv6 247420 20 [permanent]Now the device /dev/bus/usb/001/??? is there and NUT can work normallyWhat else can I check? Thank.
I have compiled a firmware with HIDDEV and HIDRAV support, but that did not solve the problem.
I have compiled the firmware with hid-generic as a module. Unloading and loading of the hid-generic module does not create devices in /dev/ bus/ usb.The problem was solved
simply by writing to /sys/bus/usb/devices/usb1/1-1/ueventHere is the code I added to rc.sys
if [ -f /sys/bus/usb/devices/usb1/1-1/uevent ]; then
echo "add" > /sys/bus/usb/devices/usb1/1-1/uevent
fiFor NUT to work correctly, I had to add the UPS user to the ROOT group.In the startup script for NUT, access rights to /etc/nut are incorrectly set.
Also, in the NUT startup script, the UPSMON and UPSD programs cannot be stopped due to an error with saving PID processes.I made a patch to fix these problems.
Thanks to colleagues for the quick replies in this discussion. I'm sorry for my bad English.
On Wednesday, February 17, 2021 at 4:07:16 PM UTC Konstantin Slipenko wrote:
I have compiled a firmware with HIDDEV and HIDRAV support, but that did not solve the problem.
Have you tried to set USB_EHCI_TT_NEWSCHED also? "Some say" it will solve similar problems.
Here's a script with the latest changes
I have a question about running scripts on system boot.I see that all services are first stopped and then started, i.e. is RESTARTI understand that this is related to the work of MDEV, HOT.SH, HOT_AUX.SHIs this normal behavior?
The question arose because the original version of the NUT startup script did not contain RESTART processing.
Can I optimize this with some settings and exclude restarting services?