Open Vlad1mir-D opened 9 years ago
Serial connection with blazer_ser works fine but I need GPIO for other purposes.
Did you completely power down the UPS after testing the serial connection? Many UPSes cannot switch between USB and serial on-the-fly.
Yes, I've tried to power off UPS completely without any success.
I assume the serial driver detected the megatec protocol variant?
Is this using libusb 1.0.x with libusb-compat? Most of the testing has been done with libusb-0.1.
Maybe @zykh has some other debugging ideas.
Accordings to libusb package description [1] it was libusb 1.0.x:
This package provides a way for applications to access USB devices. Legacy libusb-0.1 is no longer supported by upstream, therefore content of this package was replaced by libusb-compat. It provides compatibility layer allowing applications written for libusb-0.1 to work with libusb-1.0.
But I'm not really sure because in Fedora it could be virtually anything and only maintainer knows the truth.
Here is the build logs of packages that I was using:
Which OS would you recommend to test my UPS with (only package-based distribs please)?
And answer to your question: yes, UPS uses megatec serial protocol. I don't know exact difference between Q1 and megatec but it works with megatec.
Here is the build logs of packages that I was using:
nut-2.7.2-1.fc20.armv6hl libusb-0.1.5-3.fc20.armv6hl The "libusb-0.1.5" log does mention libusb-compat. I am not saying that it won't work, just that it is an extra layer of complexity. Which OS would you recommend to test my UPS with (only package-based distribs please)?
My personal preference would be Debian or Ubuntu (they still have libusb-0.1 as a separate library from libusb-compat), but even with Fedora it should be possible - it just might involve rebuilding the NUT package from source.
"megatec" uses some sort of "Q1" commands to query UPS status, but I think things are slightly different over USB. @zykh is much more familiar with this than I am.
Greetings,
I can't get my UPS to work with nut. I'm not pretty sure that it was a bug in NUT but I'll report it anyway. Thank you for your analysis!
Repoducibility:
100%
Actual results:
# /usr/sbin/nutdrv_qx -a ismw1000_nutdrv_s
# /usr/sbin/blazer_usb -a ismw1000_blazer_s
Expected results:
# /usr/sbin/nutdrv_qx -a ismw1000_nutdrv_s
# /usr/sbin/blazer_usb -a ismw1000_blazer_s
Additional information:
# cat /etc/issue
# rpm -qa | grep -P '^nut'
# cat /proc/version
# ll /dev/bus/usb/001/
# cat /etc/group | grep nut
#
lsusb -v#
cat /etc/ups/ups.conf#
strace -f -s 111111 -o blazer.strace /usr/sbin/blazer_usb -DDDDDDDDDDDDDDDDDDDDD -a ismw1000_blazer#
strace -f -s 111111 -o nutdrv.strace /usr/sbin/nutdrv_qx -DDDDDDDDDDDDDDDDDDDDD -a ismw1000_nutdrv#
strace -f -s 111111 -o blazer_s.strace /usr/sbin/blazer_usb -DDDDDDDDDDDDDDDDDDDDD -a ismw1000_blazer_s#
strace -f -s 111111 -o nutdrv_s.strace /usr/sbin/nutdrv_qx -DDDDDDDDDDDDDDDDDDDDD -a ismw1000_nutdrv_sI've also tried to use two other USB<->USB-AB cables with no success.
Workaround
Serial connection with blazer_ser works fine but I need GPIO for other purposes.