1
22.1 Legacy Series / Re: NUT does not detect UPS connected via USB
« on: April 30, 2022, 01:31:44 pm »
Thank you all for the replies.
I managed to get it working now.
UPS: Numeric Digital 800 Plus
Identified on USB as:
ugen0.3: <CTN USB UPS> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0110
bDeviceClass = 0x0000 <Probed by interface class>
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0008
idVendor = 0x06da
idProduct = 0x0003
bcdDevice = 0x0501
iManufacturer = 0x0003 <CTN>
iProduct = 0x0001 <USB UPS>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001
The issues seems to have been a combination of things, and I've learned a few things along the way:
These are the settings that in the end worked for me:
Service Mode: standalone
Name: ups1
Listen Address: added local IPv4 address of OPNsense server (192.168.0.1)
UPS type: QX-Driver -> enabled
Extra Arguments: port=auto, novendor, protocol=megatec
With these settings (and a re-connect of USB cable) the Service status on the NUT configuration pages shows as running (Green).
On the Dashboard, the 2 services 'nut_deamon' and 'nut_upsmon' are now also green.
Learned:
UI process getting in the way of the commands given on the command line:
- Adding the settings via the UI, Apply, then stop the service, then troubleshoot/run commands on the command line. Or disable the NUT service in the UI and manually enter the details in the NUT config files.
- USB port of the UPS getting blocked (Permission denied) -> unplug USB cable and re-insert into other USB port.
- NUT package on FreeBSD is compiled with user uucp and group uucp, so use that when running the nut usb driver directly
(like: /usr/local/libexec/nut/blazer_usb -a ups1 -DDD -u uucp).
* The number of 'D's is the debug level (e.g 5 'D's is debug-lvel 5).
- NUT config files are in: /usr/local/etc/nut -> owned by: root:wheel
- NUT state path (PID file and status output file): /var/db/nut -> owned by: uucp:uucp
- NUT drivers are in : /usr/local/libexec/nut/ -> owned by: root:wheel
- NUT utils like upsd, upsdrvctl etc. are in: /usr/local/sbin/ -> owned by: root:wheel
- USB port is/gets correctly owned:
- sudo ls -l /dev/ugen0.3 -> shows link to usb/0.3.0 and is owned by root:wheel
- sudo ls -l /dev/usb/0.3.0 is owned by root:uucp
I managed to get it working now.
UPS: Numeric Digital 800 Plus
Identified on USB as:
ugen0.3: <CTN USB UPS> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0110
bDeviceClass = 0x0000 <Probed by interface class>
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0008
idVendor = 0x06da
idProduct = 0x0003
bcdDevice = 0x0501
iManufacturer = 0x0003 <CTN>
iProduct = 0x0001 <USB UPS>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001
The issues seems to have been a combination of things, and I've learned a few things along the way:
These are the settings that in the end worked for me:
Service Mode: standalone
Name: ups1
Listen Address: added local IPv4 address of OPNsense server (192.168.0.1)
UPS type: QX-Driver -> enabled
Extra Arguments: port=auto, novendor, protocol=megatec
With these settings (and a re-connect of USB cable) the Service status on the NUT configuration pages shows as running (Green).
On the Dashboard, the 2 services 'nut_deamon' and 'nut_upsmon' are now also green.
Learned:
UI process getting in the way of the commands given on the command line:
- Adding the settings via the UI, Apply, then stop the service, then troubleshoot/run commands on the command line. Or disable the NUT service in the UI and manually enter the details in the NUT config files.
- USB port of the UPS getting blocked (Permission denied) -> unplug USB cable and re-insert into other USB port.
- NUT package on FreeBSD is compiled with user uucp and group uucp, so use that when running the nut usb driver directly
(like: /usr/local/libexec/nut/blazer_usb -a ups1 -DDD -u uucp).
* The number of 'D's is the debug level (e.g 5 'D's is debug-lvel 5).
- NUT config files are in: /usr/local/etc/nut -> owned by: root:wheel
- NUT state path (PID file and status output file): /var/db/nut -> owned by: uucp:uucp
- NUT drivers are in : /usr/local/libexec/nut/ -> owned by: root:wheel
- NUT utils like upsd, upsdrvctl etc. are in: /usr/local/sbin/ -> owned by: root:wheel
- USB port is/gets correctly owned:
- sudo ls -l /dev/ugen0.3 -> shows link to usb/0.3.0 and is owned by root:wheel
- sudo ls -l /dev/usb/0.3.0 is owned by root:uucp