Hi!
Today I connected a generic ups to a FreeBSD server (13.2-RELEASE-p4 FreeBSD 13.2-RELEASE-p4 GENERIC amd64)
The USB is detected but the service fails to start. I've checked the permission in /dev/usb and there a device using the nut group.
I unplugged and replugged the usb cable. dmesg -a:
When I try to start the nut service with service nut start I get the following error:
Then I try to debug it (sudo /usr/local/libexec/nut/blazer_usb -a atomlux -DDDD) and I get:
The "atomlux" usb is defined in /usr/local/etc/ups.conf
Any ideas?
Today I connected a generic ups to a FreeBSD server (13.2-RELEASE-p4 FreeBSD 13.2-RELEASE-p4 GENERIC amd64)
The USB is detected but the service fails to start. I've checked the permission in /dev/usb and there a device using the nut group.
Code:
[freebsd:/usr/local/etc/devd $]> ls -al /dev/usb
total 2
dr-xr-xr-x 2 root wheel 512 Oct 27 13:27 .
dr-xr-xr-x 14 root wheel 512 Oct 27 10:27 ..
crw------- 1 root operator 0x30 Oct 27 13:27 0.1.0
crw------- 1 root operator 0x55 Oct 27 13:27 0.1.1
crw------- 1 root operator 0x85 Oct 27 13:27 0.2.0
crw------- 1 root operator 0x87 Oct 27 13:27 0.2.1
crw-rw---- 1 root nut 0x10a Oct 27 15:30 0.3.0
crw------- 1 root operator 0x10c Oct 27 15:30 0.3.1
I unplugged and replugged the usb cable. dmesg -a:
Code:
ugen0.3: <vendor 0x0001 MEC0003> at usbus0 (disconnected)
uhid0: at uhub0, port 13, addr 2 (disconnected)
uhid0: detached
ugen0.3: <vendor 0x0001 MEC0003> at usbus0
uhid0 on uhub0
uhid0: <vendor 0x0001 MEC0003, class 0/0, rev 1.10/1.00, addr 3> on usbus0
When I try to start the nut service with service nut start I get the following error:
Code:
/usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Then I try to debug it (sudo /usr/local/libexec/nut/blazer_usb -a atomlux -DDDD) and I get:
Code:
[freebsd:/var/db $]> sudo /usr/local/libexec/nut/blazer_usb -a atomlux -DDDD
Password:
Network UPS Tools - Megatec/Q1 protocol USB driver 0.14 (2.8.0)
0.000000 [D1] debug level is '4'
0.000229 [D2] Checking device 1 of 1 (0001/0000)
9.911004 [D1] nut_libusb_open get iManufacturer failed, retrying...
19.808704 [D1] nut_libusb_open get iManufacturer failed, retrying...
29.729264 [D1] nut_libusb_open get iManufacturer failed, retrying...
29.731692 [D2] - VendorID: 0001
29.731701 [D2] - ProductID: 0000
29.731706 [D2] - Manufacturer: unknown
29.731711 [D2] - Product: MEC0003
29.731714 [D2] - Serial Number: unknown
29.731718 [D2] - Bus: 000
29.731722 [D2] - Device: unknown
29.731725 [D2] - Device release number: 0100
29.731729 [D2] Trying to match device
29.731733 [D3] match_function_regex: matching a device...
29.731738 [D2] Device matches
29.731742 [D2] Reading first configuration descriptor
29.731782 [D3] libusb_kernel_driver_active() returned 1 (driver active)
29.731788 [D2] successfully set kernel driver auto-detach flag
29.731797 [D2] failed to claim USB device: Other error
29.731803 [D1] failed to detach kernel driver from USB device: Other error
29.731808 [D2] failed to claim USB device: Other error
29.731813 [D1] failed to detach kernel driver from USB device: Other error
29.731818 [D2] failed to claim USB device: Other error
29.731822 [D1] failed to detach kernel driver from USB device: Other error
29.731827 [D2] failed to claim USB device: Other error
29.731831 [D1] failed to detach kernel driver from USB device: Other error
29.731839 Can't claim USB device [0001:0000]@0/0: Other error
The "atomlux" usb is defined in /usr/local/etc/ups.conf
Code:
[atomlux]
driver = blazer_usb
port = auto
desc = "Atomlux 3500VA"
default.battery.voltage.low = 10
default.battery.voltage.high = 55.2
runtimecal = 1200,100,2400,50
Any ideas?