Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Netgate 1100 with 24.03-RC and APC Smart-UPS 1000

    Scheduled Pinned Locked Moved UPS Tools
    16 Posts 2 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic was forked from NUT Package (2.8.1 and above) dennypage
    This topic has been deleted. Only users with topic management privileges can see it.
    • dennypageD
      dennypage @pfsjap
      last edited by

      @pfsjap said in Netgate 1100 with 24.03-RC and APC Smart-UPS 1000:

      0.002783 [D1] upsdrv_initups (non-SHUT)...
      0.002801 [D2] Initializing an USB-connected UPS with library libusb-1.0.0 (API: 0x1000102) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.46')
      0.003507 [D2] libusb1: No appropriate HID device found
      0.003576 libusb1: Could not open any HID devices: no USB buses found

      Strange. Immediately following the "Initializing an USB-connected UPS..." line should be a "Checking device 1 of 1" message. It would appear that the USB iterator isn't seeing any USB devices. This could either be an issue with NUT's own usb code, libusb, or a kernel issue.

      Were you running 23.09.1 prior to updating to 24.03-RC? Did the UPS work there?

      Also, have you tried the other USB port?

      P 1 Reply Last reply Reply Quote 0
      • P
        pfsjap @dennypage
        last edited by

        @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.

        dennypageD 1 Reply Last reply Reply Quote 0
        • dennypageD
          dennypage @pfsjap
          last edited by

          @pfsjap So, if I understand you correctly, it currently works with apcupsd under 24.03-RC?

          P 1 Reply Last reply Reply Quote 0
          • P
            pfsjap @dennypage
            last edited by

            @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:
            
            dennypageD 1 Reply Last reply Reply Quote 0
            • dennypageD
              dennypage @pfsjap
              last edited by

              @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?

              P 1 Reply Last reply Reply Quote 0
              • P
                pfsjap @dennypage
                last edited by

                @dennypage It is somehow related to privileges, after setting user=root, nut connected to UPS successfully.

                dennypageD 1 Reply Last reply Reply Quote 0
                • dennypageD
                  dennypage @pfsjap
                  last edited by

                  @pfsjap Can you have a look at the USB quirks post and see if you are missing a quirk please? Thanks.

                  P 1 Reply Last reply Reply Quote 0
                  • P
                    pfsjap @dennypage
                    last edited by pfsjap

                    @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. **

                    dennypageD 1 Reply Last reply Reply Quote 0
                    • dennypageD
                      dennypage @pfsjap
                      last edited by

                      @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.

                      P 1 Reply Last reply Reply Quote 0
                      • P
                        pfsjap @dennypage
                        last edited by

                        @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?

                        dennypageD 1 Reply Last reply Reply Quote 0
                        • dennypageD
                          dennypage @pfsjap
                          last edited by

                          @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. 😕

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.