Re: [Apcupsd-users] SMX1500RM2U not sequencing plug groups on power up from apcupsd triggered shutd
Brought to you by:
adk0212
|
From: Scott T. <tec...@s2...> - 2026-08-26 15:56:49
|
(This is a resend, I exceeded list message size limit in last reply, trimmed this one) Thank you. Figuring that might be the case, I did try to access the serial port via my hacked powerchute when I was trying. I went through PowerChute’s configuration which I have to invoke with : cd /opt/APC/PowerChute ./bin/java \ --add-exports java.base/com.sun.crypto.provider=ALL-UNNAMED \ -jar ./lib/pcssconfig.jar \ skip_kernel_check Pick the username/pw/cable type/port and that rewrites the binary m11.cfg file. Note that last skip kernel check argument causes “usb” to be a menu item to select on cable type and lets the took work over USB. Anway, (my) Powerchute wouldn’t talk to it over serial either. I had bought a serial card for this and it was difficult to determine if the card had any issues so I’d switched to the laptop. I’ll try 115k too, I had not tried that. There are no serial setting exposed in the config utility, I assume it is hard coded. My serial ports experience has been even if you have the rate wrong you usually get something back from a normal serial device even if just garbage. But I realize this is not a normal device. Thanks for the suggestion. The idea was that the serial port *might* expose modbus, docs seem ambiguous on whether or not this unit has modbus. For NUT, I’d pulled the source and compiled from scratch, full version, not the plugin. With AI help it appeared that I got it (the nut utilities) to talk Microlink to the UPS over USB, but it only goes far enough to see a little back and forth then it fails with: [D1:test] Failed to open device (051D/0003), skipping: Access denied (insufficient permissions) I’ll go back and try the config options you mention below. Looking back at some notes I captured, I think I had in nut configs #ups.conf: [ups] driver = usbhid-ups port = auto #Also tried ups.conf, don’t remember which one was last: MODE = standalone FYI some log snippets of me trying…. I think this was the core roadblock I couldn’t get past: root@SERVER4:/mnt/user/logs/apc-source# /usr/local/ups/bin/apcmicrolink -s test -x port=auto -D -D 0.000000 [D1] getprocname: determined process name for PID 39939: /usr/local/ups/bin/apcmicrolink Network UPS Tools 2.8.5.1051-1051+g0d949e373 (development iteration after 2.8.5) - APC Microlink protocol driver 0.02 Warning: This is an experimental driver. Some features may not function correctly. 0.000061 [D1:apcmicrolink] Using USB implementation: libusb-1.0.30 (API: 0x0100010C) 0.000069 [D1] Network UPS Tools version 2.8.5.1051-1051+g0d949e373 (development iteration after 2.8.5), 64-bit build for x86_64, built with gcc (GCC) 15.3.0 and configured with flags: --prefix=/usr/local/ups --with-usb=libusb-1.0 --without-snmp 0.000077 [D1:test] debug level is '2' 0.160264 [D1:test] Succeeded to become_user(nut): now UID=218 GID=218 0.160288 [D1:test] Signalling UPS [test]: driver.exit (quietly, no fuss if no driver is running or responding) 0.160297 Can't open /var/state/ups/apcmicrolink-test: No such file or directory 0.160302 [D1:test] Request for other driver to exit returned code -1 0.160305 [D1:test] Socket dialog with the other driver instance (may be absent) failed: Success 0.161682 [D2:test] Checking device 1 of 9 (8087/8000) 0.161709 [D1:test] Failed to open device (8087/8000), skipping: Access denied (insufficient permissions) 0.161715 [D2:test] Checking device 2 of 9 (1D6B/0002) 0.161724 [D1:test] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions) 0.161729 [D2:test] Checking device 3 of 9 (8087/8008) 0.161739 [D1:test] Failed to open device (8087/8008), skipping: Access denied (insufficient permissions) 0.161746 [D2:test] Checking device 4 of 9 (1D6B/0002) 0.161755 [D1:test] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions) 0.161761 [D2:test] Checking device 5 of 9 (1D6B/0003) 0.161770 [D1:test] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions) 0.161777 [D2:test] Checking device 6 of 9 (051D/0003) 0.161784 [D1:test] Failed to open device (051D/0003), skipping: Access denied (insufficient permissions) 0.161791 [D2:test] Checking device 7 of 9 (0781/CFCB) 0.161800 [D1:test] Failed to open device (0781/CFCB), skipping: Access denied (insufficient permissions) 0.161807 [D2:test] Checking device 8 of 9 (413C/2003) 0.161816 [D1:test] Failed to open device (413C/2003), skipping: Access denied (insufficient permissions) 0.161822 [D2:test] Checking device 9 of 9 (1D6B/0002) 0.161832 [D1:test] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions) 0.161839 [D2:test] libusb1: No appropriate HID device found 0.161845 libusb1: Could not open any HID devices: insufficient permissions on everything 0.161851 [D1:test] For more ideas, please check a NUT GitHub Wiki page named like https://github.com/networkupstools/nut/wiki/%22Insufficient-permissions%22-when-starting-USB-drivers 0.161864 apcmicrolink: no matching USB Microlink UPS found 0.162002 [D2:test] a apcmicrolink sub-process (test) is exiting now 0.162019 [D1] upsnotify: failed to notify about state NOTIFY_STATE_STOPPING: no notification tech defined, will not spam more about it 0.162028 [D1] On systems without service units, consider `export NUT_QUIET_INIT_UPSNOTIFY=true` 0.162037 [D1] sock_close: starting... 0.162043 [D1] sock_close: finished 0.162052 [D1] exit_cleanup: finished, exiting root@SERVER4:/mnt/user/logs/apc-source# /usr/local/ups/bin/apcmicrolink -s test -x port=auto -u root -D -d 5 0.000000 [D1] getprocname: determined process name for PID 41725: /usr/local/ups/bin/apcmicrolink Network UPS Tools 2.8.5.1051-1051+g0d949e373 (development iteration after 2.8.5) - APC Microlink protocol driver 0.02 Warning: This is an experimental driver. Some features may not function correctly. 0.000054 [D1:apcmicrolink] Using USB implementation: libusb-1.0.30 (API: 0x0100010C) 0.000061 [D1:apcmicrolink] Built-in default or configured user for drivers 'nut' was ignored due to 'root' specified on command line 0.000067 [D1] Network UPS Tools version 2.8.5.1051-1051+g0d949e373 (development iteration after 2.8.5), 64-bit build for x86_64, built with gcc (GCC) 15.3.0 and configured with flags: --prefix=/usr/local/ups --with-usb=libusb-1.0 --without-snmp 0.000073 [D1:test] debug level is '1' 0.000920 [D1:test] Succeeded to become_user(root): now UID=0 GID=0 0.000932 [D1:test] Signalling UPS [test]: driver.exit (quietly, no fuss if no driver is running or responding) 0.000942 Can't open /var/state/ups/apcmicrolink-test: No such file or directory 0.000945 [D1:test] Request for other driver to exit returned code -1 0.000948 [D1:test] Socket dialog with the other driver instance (may be absent) failed: Success 0.002160 [D1:test] nut_libusb_open: invalid libusb bus number 0 0.002257 [D1:test] nut_libusb_open: invalid libusb bus number 0 0.002322 [D1:test] nut_libusb_open: invalid libusb bus number 0 0.003953 [D1:test] microlink_usb: HID PDC status fallback available (PresentStatus on Report 0x07) 0.003960 [D1:test] microlink_usb: found HID tunnel: Output Report 0x90, Input Report 0x89 0.003965 [D1:test] microlink_usb: opened American Power Conversion /Smart-UPS X 1500 FW:COM 03.8 / UPS 03.8 (USB 051d:0003) 11.181622 apcmicrolink: failed to start Microlink session on auto (no standard-HID fallback available on this device either) 11.182033 [D1] sock_close: starting... 11.182061 [D1] sock_close: finished 11.182075 [D1] exit_cleanup: finished, exiting root@SERVER4:/mnt/user/logs/apc-source# /usr/local/ups/bin/apcmicrolink -s test -x port=auto -u root -D -D -D -D 0.000000 [D3] setproctag: starting first tagging as 'apcmicrolink'... 0.000029 [D3] getprocname: /proc is an accessible directory, investigating 0.000043 [D3] getprocname: located symlink for PID 42160 at: /proc/42160/exe 0.000055 [D1] getprocname: determined process name for PID 42160: /usr/local/ups/bin/apcmicrolink Network UPS Tools 2.8.5.1051-1051+g0d949e373 (development iteration after 2.8.5) - APC Microlink protocol driver 0.02 Warning: This is an experimental driver. Some features may not function correctly. 0.000095 [D1:apcmicrolink] Using USB implementation: libusb-1.0.30 (API: 0x0100010C) 0.000101 [D3:apcmicrolink] main_arg: var='port' val='auto' 0.000104 [D1:apcmicrolink] Built-in default or configured user for drivers 'nut' was ignored due to 'root' specified on command line 0.000111 [D1] Network UPS Tools version 2.8.5.1051-1051+g0d949e373 (development iteration after 2.8.5), 64-bit build for x86_64, built with gcc (GCC) 15.3.0 and configured with flags: --prefix=/usr/local/ups --with-usb=libusb-1.0 --without-snmp 0.000118 [D1:test] debug level is '4' 0.001021 [D1:test] Succeeded to become_user(root): now UID=0 GID=0 0.001039 [D1:test] Signalling UPS [test]: driver.exit (quietly, no fuss if no driver is running or responding) 0.001048 Can't open /var/state/ups/apcmicrolink-test: No such file or directory 0.001053 [D1:test] Request for other driver to exit returned code -1 0.001057 [D1:test] Socket dialog with the other driver instance (may be absent) failed: Success 0.002289 [D2:test] Checking device 1 of 9 (8087/8000) 0.002308 [D2:test] - VendorID: 8087 0.002311 [D2:test] - ProductID: 8000 0.002313 [D2:test] - Manufacturer: unknown 0.002316 [D2:test] - Product: unknown 0.002317 [D2:test] - Serial Number: unknown 0.002320 [D2:test] - Bus: 001 0.002321 [D2:test] - Bus Port: 001 0.002324 [D2:test] - Device: 002 0.002327 [D2:test] - Device release number: 0005 0.002329 [D2:test] Trying to match device 0.002332 [D3:test] match_function_regex: matching a device... 0.002336 [D3:test] is_usb_device_supported: checking if this driver can support USB device VID:PID 0x8087:0x8000 0.002339 [D4:test] is_usb_device_supported: checking table entry for VID:PID 0x051D:0x0003 (custom init handler is NOT available) 0.002344 [D4:test] is_usb_device_supported: NOT_SUPPORTED: vendor ID mismatch 0.002346 [D2:test] Device does not match - skipping 0.002355 [D2:test] Checking device 2 of 9 (1D6B/0002) 0.002362 [D1:test] nut_libusb_open: invalid libusb bus number 0 0.002456 [D2:test] - VendorID: 1d6b 0.002460 [D2:test] - ProductID: 0002 0.002462 [D2:test] - Manufacturer: Linux 6.18.38-Unraid ehci_hcd 0.002465 [D2:test] - Product: EHCI Host Controller 0.002468 [D2:test] - Serial Number: 0000:00:1d.0 0.002470 [D2:test] - Bus: 001 0.002473 [D2:test] - Bus Port: unknown 0.002475 [D2:test] - Device: 001 0.002477 [D2:test] - Device release number: 0618 0.002480 [D2:test] Trying to match device 0.002483 [D3:test] match_function_regex: matching a device... 0.002486 [D3:test] is_usb_device_supported: checking if this driver can support USB device VID:PID 0x1D6B:0x0002 0.002489 [D4:test] is_usb_device_supported: checking table entry for VID:PID 0x051D:0x0003 (custom init handler is NOT available) 0.002493 [D4:test] is_usb_device_supported: NOT_SUPPORTED: vendor ID mismatch 0.002496 [D2:test] Device does not match - skipping 0.002503 [D2:test] Checking device 3 of 9 (8087/8008) 0.002512 [D2:test] - VendorID: 8087 0.002514 [D2:test] - ProductID: 8008 0.002517 [D2:test] - Manufacturer: unknown 0.002519 [D2:test] - Product: unknown 0.002522 [D2:test] - Serial Number: unknown 0.002524 [D2:test] - Bus: 003 0.002527 [D2:test] - Bus Port: 001 0.002529 [D2:test] - Device: 002 0.002531 [D2:test] - Device release number: 0005 (repeats) # FINDS THE DEVICE AND ALMOST MAKES IT: 0.002770 [D2:test] Checking device 6 of 9 (051D/0003) 0.003553 [D2:test] - VendorID: 051d 0.003560 [D2:test] - ProductID: 0003 0.003562 [D2:test] - Manufacturer: American Power Conversion 0.003565 [D2:test] - Product: Smart-UPS X 1500 FW:COM 03.8 / UPS 03.8 0.003568 [D2:test] - Serial Number: AS1119121977 0.003571 [D2:test] - Bus: 002 0.003573 [D2:test] - Bus Port: 009 0.003576 [D2:test] - Device: 003 0.003580 [D2:test] - Device release number: 0106 0.003582 [D2:test] Trying to match device 0.003585 [D3:test] match_function_regex: matching a device... 0.003588 [D3:test] is_usb_device_supported: checking if this driver can support USB device VID:PID 0x051D:0x0003 0.003591 [D4:test] is_usb_device_supported: checking table entry for VID:PID 0x051D:0x0003 (custom init handler is NOT available) 0.003596 [D4:test] is_usb_device_supported: POSSIBLY_SUPPORTED: known vendor ID at least 0.003599 [D4:test] is_usb_device_supported: SUPPORTED: known vendor and product IDs 0.003602 [D2:test] Device matches 0.003604 [D2:test] Reading configuration descriptor 1 of 1 0.003610 [D3:test] libusb_kernel_driver_active() returned 0: Success 0.003624 [D2:test] Claimed interface 0 successfully 0.003627 [D3:test] nut_libusb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0) 0.003736 [D2:test] Retrieved HID descriptor (expected 9, got 9) 0.003745 [D3:test] HID descriptor, method 1: (9 bytes) => 09 21 00 01 21 01 22 a9 01 0.003748 [D3:test] HID descriptor length (method 1) 425 0.003750 [D4:test] i=0, extra[i]=09, extra[i+1]=21 0.003753 [D3:test] HID descriptor, method 2: (9 bytes) => 09 21 00 01 21 01 22 a9 01 0.003756 [D3:test] HID descriptor length (method 2) 425 0.003758 [D2:test] Trying HID descriptor length 425 0.004555 [D1:test] microlink_usb: HID PDC status fallback available (PresentStatus on Report 0x07) 0.004560 [D1:test] microlink_usb: found HID tunnel: Output Report 0x90, Input Report 0x89 0.004563 [D2:test] Report descriptor retrieved (Reportlen = 425) 0.004566 [D2:test] Found HID device 0.004569 [D3:test] Using default, detected or customized USB HID numbers: usb_config_index=0 usb_hid_rep_index=0 usb_hid_desc_index=0 usb_hid_ep_in=1 usb_hid_ep_out=1 0.004579 [D1:test] microlink_usb: opened American Power Conversion /Smart-UPS X 1500 FW:COM 03.8 / UPS 03.8 (USB 051d:0003) 0.024874 [D2:test] nut_libusb_get_interrupt: Connection timed out 0.024907 [D2:test] microlink TX ctrl: (1 bytes) => fd 0.036884 [D2:test] microlink RX record: (19 bytes) => 00 0a 10 9a 00 0b 05 09 00 01 00 48 00 0.036919 [D2:test] f8 02 fe 04 29 c1 0.036929 [D2:test] microlink: page0 version=10 width=16 pages=154 flags=0x09 0.036939 [D2:test] microlink TX ctrl: (1 bytes) => fe 0.069042 [D2:test] microlink: skipped 44 stray byte(s) before record 0x00 0.069079 [D2:test] microlink RX record: (19 bytes) => 00 0a 10 9a 00 0b 05 09 00 01 00 48 00 0.069088 [D2:test] f8 02 fe 04 29 c1 0.069096 [D2:test] microlink: page0 version=10 width=16 pages=154 flags=0x09 0.069105 [D2:test] microlink TX ctrl: (1 bytes) => fe 0.085037 [D2:test] microlink: skipped 44 stray byte(s) before record 0x01 0.085075 [D2:test] microlink RX record: (19 bytes) => 01 fe 08 3e fc 02 fb 00 41 f8 03 31 fc 0.085084 [D2:test] 02 fb 00 1f 35 01 0.085093 [D2:test] microlink TX ctrl: (1 bytes) => fe 0.101039 [D2:test] microlink: skipped 44 stray byte(s) before record 0x02 0.101077 [D2:test] microlink RX record: (19 bytes) => 02 ff 02 ff fe 05 48 19 f8 03 2e fa 0e 0.101085 [D2:test] 42 ff ff f9 5a cc 0.101094 [D2:test] microlink TX ctrl: (1 bytes) => fe 0.117036 [D2:test] microlink: skipped 44 stray byte(s) before record 0x03 0.117073 [D2:test] microlink RX record: (19 bytes) => 03 06 6b ff f8 03 2c fa 02 da ff ff f9 0.117082 [D2:test] 00 b7 ff f8 9a 46 0.117090 [D2:test] microlink TX ctrl: (1 bytes) => fe 0.133038 [D2:test] microlink: skipped 44 stray byte(s) before record 0x04 0.133075 [D2:test] microlink RX record: (19 bytes) => 04 03 2d fa 01 6d ff ff f9 00 0e ff ff 0.133084 [D2:test] f8 04 fe 0e 26 2a (repeats last) 9.165295 [D2:test] microlink TX ctrl: (1 bytes) => fe 10.173224 [D2:test] nut_libusb_get_interrupt: Connection timed out 10.173260 [D2:test] microlink TX ctrl: (1 bytes) => fe 11.181270 [D2:test] nut_libusb_get_interrupt: Connection timed out 11.181299 apcmicrolink: failed to start Microlink session on auto (no standard-HID fallback available on this device either) 11.181545 [D3:test] procname_cleanup: starting for: myProcName=[/usr/local/ups/bin/apcmicrolink] myProcBaseName=[apcmicrolink] proctag=[test] proctag_lib=[(null)] 11.181571 [D3:test] proctag_cleanup: starting for: myProcName=[/usr/local/ups/bin/apcmicrolink] myProcBaseName=[apcmicrolink] proctag=[test] proctag_lib=[(null)] 11.181588 [D2:test] a apcmicrolink sub-process (test) is exiting now 11.181605 [D1] upsnotify: failed to notify about state NOTIFY_STATE_STOPPING: no notification tech defined, will not spam more about it 11.181621 [D1] On systems without service units, consider `export NUT_QUIET_INIT_UPSNOTIFY=true` 11.181633 [D1] sock_close: starting... 11.181638 [D1] sock_close: finished 11.181649 [D1] exit_cleanup: finished, exiting So almost, maybe <smile> Thanks again, Scott Hi Scott, The 2400, 8 N 1 for serial is only for the older UPSLink protocol which your UPS does not support. Your serial port almost certainly does work. For Microlink devices the serial port is NOT usable from a terminal program. I believe APS runs the serial port on Microlink UPSes at 115200. If you really want to test out the serial port on a SMX or SMC or other Microlink-only port then run Powerchute and select serial, or run the APC UPS firmware upgrade utility (from Windows) and see if it sees the serial port. But, I would NOT do a firmware update to your UPS if the update utility does see it because the current firmware update utility from APC will brick older Microlink UPSes. It's really only safe to run on a UPS that has the green SmartConnect port. If you can find a much older version of the firmware update utility that would be safe to run. I do not know if the Unraid app store has a new enough version of NUT that includes the Microlink driver you might have to compile it. Otherwise NUT will use USB-HID and that is likely what it is using to talk to your UPS. If you do have a new enough NUT that includes Microlink support then Microlink protocol works over either the serial port or the USB port. You would define it in /etc/nut/ups.conf: [apc-microlink] driver = apcmicrolink port = /dev/ttyUSB0 # Or use port = auto for USB HID tunnels The statement above would be correct for if you had a USB-to-serial port dongle. It would be /dev/ttySomethingElse if you had a real serial port, and port = auto for the USB You probably are doing something like: [myups] driver = usbhid-ups port = auto vendorid = 0764 # Replace with your vendor ID from lsusb productid = 0501 # Replace with your product ID from lsusb desc = "My USB HID UPS" in your NUT config file which runs the same protocol that apcupsd does, which is why the shutdown is similar. There are slight differences between the USB-HID procotol in apcupsd and NUT |