-
@dennypage
I read the docs for usbconfig and quirk. Still don't know what I would change in your example /boot/loader.conf.local for my config.Pretty clear I want UQ_HID_IGNORE, but the other fields are mysterious to me.
Here is the output from usbconfig:
usbconfig
ugen0.1: <Intel XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen0.2: <Tripp Lite Tripp Lite UPS> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (0mA)Any further guidance on the interruptonly issue mentioned a couple posts ago?
Thank you.
-
@hspindel Try the '-v' option...
-
@dennypage For comparison, this is the usbconfig -v output for the UPS corresponding to the quirk I mentioned above:
ugen0.2: <American Power Conversion Smart-UPS1000 FW:UPS 16.1 / ID1047> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (10mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 <Probed by interface class> bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x051d idProduct = 0x0003 bcdDevice = 0x0001 iManufacturer = 0x0001 <American Power Conversion > iProduct = 0x0002 <Smart-UPS_1000 FW:UPS 16.1 / ID=1047> iSerialNumber = 0x0003 <ASXXXXXXXXX > bNumConfigurations = 0x0001 Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0029 bNumInterfaces = 0x0001 bConfigurationValue = 0x0001 iConfiguration = 0x0000 <no string> bmAttributes = 0x00e0 bMaxPower = 0x0005 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x0003 <HID device> bInterfaceSubClass = 0x0000 bInterfaceProtocol = 0x0000 iInterface = 0x0000 <no string> Additional Descriptor bLength = 0x09 bDescriptorType = 0x21 bDescriptorSubType = 0x11 RAW dump: 0x00 | 0x09, 0x21, 0x11, 0x01, 0x21, 0x01, 0x22, 0xc4, 0x08 | 0x01 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 <IN>
-
Does anyone know what pfsense version will address the nut package issue for the Smart1500 LCD UPS? What driver is pfsense looking for in version 2.7 as it says "driver not connected" and how this can be corrected?
-
Thank you for the pointers. The output of usbconfig -v is:
ugen0.2: <Tripp Lite Tripp Lite UPS> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (0mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0110
bDeviceClass = 0x0000 <Probed by interface class>
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0008
idVendor = 0x09ae
idProduct = 0x2012
bcdDevice = 0x0009
iManufacturer = 0x0001 <Tripp Lite >
iProduct = 0x0002 <Tripp Lite UPS >
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001My best guess at the line to install the quirk is:
hw.usb.quirk.0="0x09ae 0x2012 0x0000 0xffff UQ_HID_IGNORE"
But I am not at all confident I got that right. How does it look?
Thank you.
-
@pfsense4ever
Please read through all the discussion above.I got the UPS to connect by adding RUN_AS_USER root to Additional configuration lines for upsmon.conf. However, @dennypage says in this discussion that adding a USB quirk is a better solution. Still working on that.
-
[Wrong thread, sorry]
-
@hspindel said in NUT disconnects: Eaton SMART1500LCD:
My best guess at the line to install the quirk is:
hw.usb.quirk.0="0x09ae 0x2012 0x0000 0xffff UQ_HID_IGNORE"
But I am not at all confident I got that right. How does it look?
Looks good to me.
You can test without having to reboot by using this command:
usbconfig add_dev_quirk_vplh 0x09ae 0x2012 0x0000 0xffff UQ_HID_IGNORE
followed by disconnect and reconnect of the USB cable.
There is a usbconfig option to show the attached driver if any. IIRC, it's show_ifdrv. Run it before and after the disconnect/reconnect and you should see that after there is no attached driver. Alternatively, you can simply try to start NUT (without root) to see if it works.
Note that using usbconfig to install the quirk is temporary and will not survive a reboot. So assuming it works, you will want to install it properly in /boot/loader.conf.local.
-
-
Please see here regarding testing of the new pfSense NUT package. I would appreciate any help you can offer. Thanks!
[Note that the new package addresses the crash issue after successful start, but does not have anything regarding the quirk issue that prevents initial start]
-
@hspindel Can you confirm that the quirk did in fact work? I'd like to use this as an example in a post I am doing explaining creating quirks. Thanks.
-
@dennypage said in NUT disconnects: Eaton SMART1500LCD:
@hspindel Can you confirm that the quirk did in fact work? I'd like to use this as an example in a post I am doing explaining creating quirks. Thanks.
When I have a chance to test it, I will be happy to post the results. Been rather busy. :-)
-
@dennypage said in NUT disconnects: Eaton SMART1500LCD:
@hspindel Can you confirm that the quirk did in fact work? I'd like to use this as an example in a post I am doing explaining creating quirks. Thanks.
Mostly good results. Thank you for all the help.
- The changes I had previously made to the NUT configuration were:
Extra Arguments to driver (optional)
interruptonlyAdditional configuration lines for upsmon.conf
RUN_AS_USER rootAdditional configuration lines for ups.conf
user=root
pollinterval=10-
I deleted all of the above changes except pollinterval. Rebooted the pfSense router and verified that UPS connection did not work (as expected, wanted to make sure I was testing from a baseline).
-
Created the file /boot/loader.conf.local with contents:
hw.usb.quirk.0="0x09ae 0x2012 0x0000 0xffff UQ_HID_IGNORE"
-
Rebooted the pfSense router and was able to verify that the UPS was correctly monitored by NUT. Pulled the UPS power cord a couple times to verify that NUT detected that and it was handled correctly.
-
Left the configuration running. After about five minutes, NUT loses connection to the UPS. Only thing that fixed that was:
Extra Arguments to driver (optional): interruptonly
-
With the interruptonly flag present, the UPS connection is once again stable without need for setting root access. However,@dennypage mentioned above that this is not a good solution due to a memory corruption issue in the USB reconnect code (libusb). I am not seeing any problems and at present don't have a another solution that works.
-
Verified that with interruptonly present, NUT still responds correctly to unplugging and replugging the UPS.
-
@hspindel said in NUT disconnects: Eaton SMART1500LCD:
Excellent job creating the quirk!
Left the configuration running. After about five minutes, NUT loses connection to the UPS. Only thing that fixed that was:
Extra Arguments to driver (optional): interruptonly
Is this with the 2.8.0_2 package, or the new 2.8.1 package?
-
@dennypage said in NUT disconnects: Eaton SMART1500LCD:
@hspindel said in NUT disconnects: Eaton SMART1500LCD:
Excellent job creating the quirk!
Left the configuration running. After about five minutes, NUT loses connection to the UPS. Only thing that fixed that was:
Extra Arguments to driver (optional): interruptonly
Is this with the 2.8.0_2 package, or the new 2.8.1 package?
I am running 2.8.0_2. The package manager for pfSense+ doesn't list a 2.8.1 upgrade available.
This is on a Netgate 8200.
-
@hspindel said in NUT disconnects: Eaton SMART1500LCD:
I am running 2.8.0_2. The package manager for pfSense+ doesn't list a 2.8.1 upgrade available.
Please see the Call for testing here. I would appreciate it if you could give it a spin. Thanks.
-
@dennypage said in NUT disconnects: Eaton SMART1500LCD:
@hspindel said in NUT disconnects: Eaton SMART1500LCD:
I am running 2.8.0_2. The package manager for pfSense+ doesn't list a 2.8.1 upgrade available.
Please see the Call for testing here. I would appreciate it if you could give it a spin. Thanks.
TLDR: v2.8.1 so far is working well.
Documenting everything I encountered in case it helps anyone else.
- Had a heckuva time finding the nut-devel-2023.10.07_1 package. Could not find it on Redmine. Unfortunately, didn't write down where I eventually found it. For future writeups, a direct link to the package would likely be helpful. Also, note that the full package name I found is amd64_nut_devel-2023.10.07_1.pkg. (Of course, this is hardware-specific - I am running on a Netgate 8200).
-
I downloaded the package to my PC. Had another heckuva time transferring the package to the pfSense router. Could not get ftp to work - ftp said "file not found." This was with both a Windows ftp server and a Linux ftp server tried with multiple login credentials. Eventually solved this problem by installing a tftp server on pfSense and a tftp client on Windows. File successfully transferred with tftp.
-
Using the pfSense GUI, I deleted the interruptonly flag.
-
Using the pfSense GUI, I stopped the UPS service.
-
SSH into pfSense+. Uninstalled NUT with pkg remove -fy nut. No problems seen.
-
Installed new NUT with pkg install -fy /tmp/amd64_nut-devel-2023.10.07_1.pkg. Only problem seen was I initially forgot the "amd64" in front of the name. Once I got the name right, the package installed without issue.
-
Back to the pfSense GUI, I started the UPS service. After a short time, the UPS service came up fine.
-
Pulled power and restored power to the UPS. Verified that the UPS service handled this correctly - no problems seen.
-
Noticed that the pfSense+ GUI still reports the nut package version as 2.8.0_2. Not particularly worried about that - just reporting it.
-
Without the interruptonly flag, v2.8.0_2 would disconnect and reconnect approximately every five minutes. v.2.8.1 has now been running for about 90 minutes with no issues seen. Will leave this running at least overnight, but it seems to be that v2.8.1 (along with the previously installed quirk) has fixed the issues I've seen.
Thank you very much to @dennypage for the excellent support in getting this working.
-
@dennypage
To further follow up: v.2.8.1 worked overnight with no issues! Just pulled power and reconnected as a final test, and NUT responded as expected. -
@hspindel Excellent. Thank you for helping test.
-