Netgate 1100 with 24.03-RC and APC Smart-UPS 1000
-
@dennypage There has been many changes lately due to another problem (Netgate 1100 not rebooting), but if my memory serves me well, I first tried nut in this device running 23.09.1. It didn't work so then used apcupsd for awhile. I would prefer nut, though.
Yes, have tried both USB ports.
-
@pfsjap So, if I understand you correctly, it currently works with apcupsd under 24.03-RC?
-
@dennypage Device is currently running 2nd RC version on which I installed both nut and apcupsd: nut did not work (same driver error msg as before) and apcupsd connected to the UPS.
Both are using the same libusb version (libusb.so.3):
[24.03-RC][admin@pfSense1100.localdomain]/root: ldd /usr/local/libexec/nut/usbhid-ups /usr/local/libexec/nut/usbhid-ups: libusb.so.3 => /usr/lib/libusb.so.3 (0x688505092000) libm.so.5 => /lib/libm.so.5 (0x6885044f5000) libltdl.so.7 => /usr/local/lib/libltdl.so.7 (0x68850627c000) libthr.so.3 => /lib/libthr.so.3 (0x688505b3f000) libc.so.7 => /lib/libc.so.7 (0x68850729c000) [24.03-RC][admin@pfSense1100.localdomain]/root: [24.03-RC][admin@pfSense1100.localdomain]/root: ldd /usr/local/sbin/apcupsd /usr/local/sbin/apcupsd: libwrap.so.6 => /usr/lib/libwrap.so.6 (0x7706afd8a000) libusb.so.3 => /usr/lib/libusb.so.3 (0x7706b0243000) libc++.so.1 => /lib/libc++.so.1 (0x7706b0714000) libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x7706b1454000) libm.so.5 => /lib/libm.so.5 (0x7706b2cf9000) libthr.so.3 => /lib/libthr.so.3 (0x7706b1548000) libc.so.7 => /lib/libc.so.7 (0x7706b1ad1000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x7706b340a000) [24.03-RC][admin@pfSense1100.localdomain]/root:
-
@pfsjap This would generally indicate an issue with NUT's USB library. There is a new version of NUT pending release, although I do not know when it will be pushed. Unfortunately I do not have the resources to do a test arm build.
In the interim, just to make sure it's not a privilege issue, can you test with
user=root
in the Extra Arguments to driver section please?
-
@dennypage It is somehow related to privileges, after setting user=root, nut connected to UPS successfully.
-
@pfsjap Can you have a look at the USB quirks post and see if you are missing a quirk please? Thanks.
-
@dennypage I first checked the vendor and product ids and then checked if there was a quirk and there was (VID=0x051d PID=0x0003):
[24.03-RC][admin@pfSense1100.localdomain]/root: usbconfig dump_device_quirks | grep 0x051d VID=0x051d PID=0x0002 REVLO=0x0000 REVHI=0xffff QUIRK=UQ_HID_IGNORE VID=0x051d PID=0x0003 REVLO=0x0000 REVHI=0xffff QUIRK=UQ_HID_IGNORE [24.03-RC][admin@pfSense1100.localdomain]/root:
Then deleted user=root from driver arguments and restarted nut. It connected to UPS successfully, also after disconnecting and connecting USB cable.
So why is it now working ok? When testing nut and apcupsd above, both were installed, but only one was enabled at a time. After setting user=root and nut working ok, I deinstalled apcupsd. Maybe apcupsd was the culprit, even having been disabled? If that is the case, then I'm sorry and thank you for going through this. ** Edit: or maybe having driver running as root somehow made it work also without it. **
-
@pfsjap Only thing I can think of is that the quirk isn't being recognized and that the kernel is attaching a driver (uhid0). Running the driver as root allows it to detach the driver, which is required in order to access it as a generic USB device. Once the driver is detached, it will always work.
it fails again following a reboot, check to see if the kernel has attached a driver by using show_ifdrv. If it has, then the quirk isn't being applied for some reason.
-
@dennypage After my previous post I already did think about the quirk possibly not being there after reboot, so did shut down 1100 and restarted it. When booted up, nut had connected to the UPS. Quirk being applied is also verified by this:
[24.03-RC][admin@pfSense1100.localdomain]/root: usbconfig ugen1.1: <Marvell EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen0.1: <Generic XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen0.2: <American Power Conversion Smart-UPS 1000 FW:UPS 09.3 / ID18> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (2mA) [24.03-RC][admin@pfSense1100.localdomain]/root: usbconfig -d ugen0.2 show_ifdrv ugen0.2: <American Power Conversion Smart-UPS 1000 FW:UPS 09.3 / ID18> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (2mA) [24.03-RC][admin@pfSense1100.localdomain]/root:
Since I didn't add the quirk, it did come with nut package, right?
-
@pfsjap said in Netgate 1100 with 24.03-RC and APC Smart-UPS 1000:
Since I didn't add the quirk, it did come with nut package, right?
Quirks in FreeBSD are part of the kernel itself. NUT distributes a bunch of quirks, but they are not used in FreeBSD.
I'm glad that it works following reboot. However, this leaves me without any way to explain why it didn't work originally.