Discussion:
Ippon Back Power Pro LCD connection flickers
Lev Serebryakov
2017-05-22 11:30:19 UTC
Permalink
I've bought new UPS for my router, and I'm not sure, is it UPS problem
or FreeBSD preoblem, but it connects and disconnects every several
seconds, like this:

May 22 14:26:28 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:26:43 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:26:48 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:27:03 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:27:08 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:27:23 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:27:28 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:27:43 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:27:48 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1

It works (with sysutils/nut) when it is connected, but flickers!

Is here any way to be sure, that this is UPS problem and not FreeBSD one?

I'm running

FreeBSD gateway.home.serebryakov.spb.ru 12.0-CURRENT FreeBSD
12.0-CURRENT #0 r318590M: Sun May 21 15:26:16 MSK 2017

But 11.0-CURRENT (year old, before release) showed same behavior.
--
// Lev Serebryakov
Hans Petter Selasky
2017-05-22 12:05:36 UTC
Permalink
Post by Lev Serebryakov
I've bought new UPS for my router, and I'm not sure, is it UPS problem
or FreeBSD preoblem, but it connects and disconnects every several
May 22 14:26:28 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:26:43 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:26:48 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:27:03 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:27:08 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:27:23 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:27:28 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:27:43 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:27:48 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
It works (with sysutils/nut) when it is connected, but flickers!
Is here any way to be sure, that this is UPS problem and not FreeBSD one?
I'm running
Hi,

Try dumping the traffic using "usbdump -i usbus1 -f 2 " and look for
completion errors. Might be a bug in the USB firmware of the UPS.

--HPS
Lev Serebryakov
2017-05-22 12:23:26 UTC
Permalink
Post by Hans Petter Selasky
Try dumping the traffic using "usbdump -i usbus1 -f 2 " and look for
completion errors. Might be a bug in the USB firmware of the UPS.
Looks like here are some errors:

15:20:54.763190 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:20:54.766153 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=4,IVAL=0,ERR=0
15:20:54.766207 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:20:54.770153 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=16,IVAL=0,ERR=0
15:20:54.770254 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:20:54.776387 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0,ERR=0
15:20:54.776651 usbus1.2 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=100
15:20:55.024886 usbus1.2
DONE-INTR-EP=00000081,SPD=LOW,NFR=0,SLEN=0,IVAL=100,ERR=TIMEOUT
15:20:56.704142 usbus1.2 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=100
15:20:56.953067 usbus1.2
DONE-INTR-EP=00000081,SPD=LOW,NFR=0,SLEN=0,IVAL=100,ERR=TIMEOUT
15:20:56.953149 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:20:56.958305 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0,ERR=0
15:20:58.739302 usbus1.2 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=100
15:20:58.987908 usbus1.2
DONE-INTR-EP=00000081,SPD=LOW,NFR=0,SLEN=0,IVAL=100,ERR=TIMEOUT
15:20:58.988036 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:20:58.993234 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0,ERR=0
15:21:00.740259 usbus1.2 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=100
15:21:00.988887 usbus1.2
DONE-INTR-EP=00000081,SPD=LOW,NFR=0,SLEN=0,IVAL=100,ERR=TIMEOUT
15:21:00.989073 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:21:00.993259 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0,ERR=0
15:21:02.756039 usbus1.2 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=100
15:21:03.005075 usbus1.2
DONE-INTR-EP=00000081,SPD=LOW,NFR=0,SLEN=0,IVAL=100,ERR=TIMEOUT
15:21:03.005899 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:21:03.010298 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0,ERR=0
15:21:04.759518 usbus1.2 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=100
15:21:05.008882 usbus1.2
DONE-INTR-EP=00000081,SPD=LOW,NFR=0,SLEN=0,IVAL=100,ERR=TIMEOUT
15:21:05.008963 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:21:05.013332 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0,ERR=0
15:21:06.760996 usbus1.2 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=100
15:21:07.009989 usbus1.2
DONE-INTR-EP=00000081,SPD=LOW,NFR=0,SLEN=0,IVAL=100,ERR=TIMEOUT
15:21:07.010080 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:21:07.014364 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0,ERR=0
15:21:08.769240 usbus1.2 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=100
15:21:08.960407 usbus1.2
DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=100,ERR=IOERROR
15:21:13.891574 usbus1.2 SUBM-CTRL-EP=00000000,SPD=LOW,NFR=1,SLEN=8,IVAL=0
15:21:13.893148 usbus1.2
DONE-CTRL-EP=00000000,SPD=LOW,NFR=1,SLEN=0,IVAL=0,ERR=0
15:21:13.893270 usbus1.2 SUBM-CTRL-EP=00000000,SPD=LOW,NFR=1,SLEN=0,IVAL=0
15:21:13.895138 usbus1.2
DONE-CTRL-EP=00000000,SPD=LOW,NFR=1,SLEN=0,IVAL=0,ERR=0
15:21:13.909800 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:21:13.914156 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=20,IVAL=0,ERR=0
15:21:13.914443 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:21:13.917136 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=4,IVAL=0,ERR=0
15:21:13.917161 usbus1.2 SUBM-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=8,IVAL=0
15:21:13.920128 usbus1.2
DONE-CTRL-EP=00000080,SPD=LOW,NFR=2,SLEN=4,IVAL=0,ERR=0
--
// Lev Serebryakov
Hans Petter Selasky
2017-05-22 12:57:00 UTC
Permalink
Hi,
Post by Lev Serebryakov
15:21:08.960407 usbus1.2
DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=100,ERR=IOERROR
What is the occurrence rate of this IOERROR? Once per attach/detach.

Did you try to connect the USB device to a different port and/or USB HUB.

It might also be that the user-space driver tries to reset the device
when it sees this error. To figure that out you'll need to enable
debugging in the UPS software package.

--HPS
Lev Serebryakov
2017-05-22 13:16:23 UTC
Permalink
Post by Hans Petter Selasky
What is the occurrence rate of this IOERROR? Once per attach/detach.
Lets try do tun dump together with dmesg...
ERR=IOERROR and ERR=CANCELLED are correlated with disconnects, one of
these two is always at same time as disconnect.
Post by Hans Petter Selasky
Did you try to connect the USB device to a different port and/or USB HUB.
I've tried different port, but not hub (I don't have any). I've tried
other cable too.
Post by Hans Petter Selasky
It might also be that the user-space driver tries to reset the device
when it sees this error. To figure that out you'll need to enable
debugging in the UPS software package.
If UPS software is not running, flickering is the same. It doesn't
depend on running of UPS software (sysutils/nut, nothing fancy or
closed-sourced).
--
// Lev Serebryakov
Lev Serebryakov
2017-05-23 14:37:52 UTC
Permalink
Post by Hans Petter Selasky
What is the occurrence rate of this IOERROR? Once per attach/detach.
Did you try to connect the USB device to a different port and/or USB HUB.
It might also be that the user-space driver tries to reset the device
when it sees this error. To figure that out you'll need to enable
debugging in the UPS software package.
Hans, as here are some evidences, that Linux doesn't have this problem,
I want to track down it and help you to fix it, if it is fixable on
FreeBSD side (maybe, with some kludge for such devices).

I know next to nothing about Linux and USB internals, but I'm ready to
test patches, get any dumps, try to boot Linux on this hardware and get
dumps there, etc.

Thank you!
--
// Lev Serebryakov
Lev Serebryakov
2017-05-23 19:38:00 UTC
Permalink
You might try to plug the device to Linux and install the same software
package and see what happens.
As I said, if disconnect/connect every several seconds without any
software, it is independent to software or presence of uhid module
Linux usually have more quirks than we do in FreeBSD. Try searching the
internet for the idVendor and idProduct values. It was first thing I did, no luck.
BTW, FreeBSD have same quirks for one product of this idVendor:

USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE),

But this product have "generic" id 0xffff. Maybe, it should be added to
quirks table too? Or "import" this table:

https://fossies.org/linux/nut/scripts/hotplug/libhid.usermap

I'll try Linux in next several days.
--
// Lev Serebryakov
abi
2017-05-22 14:58:23 UTC
Permalink
I have the same issue with POWERCOM MACAN-1000

I use COM now

http://freebsd.1045724.x6.nabble.com/UPS-disconnects-every-3-sec-td6142681.html
Post by Lev Serebryakov
I've bought new UPS for my router, and I'm not sure, is it UPS problem
or FreeBSD preoblem, but it connects and disconnects every several
May 22 14:26:28 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:26:43 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:26:48 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:27:03 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:27:08 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:27:23 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:27:28 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
May 22 14:27:43 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
(disconnected)
May 22 14:27:48 gateway kernel: ugen1.2: <PPC Offline UPS> at usbus1
It works (with sysutils/nut) when it is connected, but flickers!
Is here any way to be sure, that this is UPS problem and not FreeBSD one?
I'm running
FreeBSD gateway.home.serebryakov.spb.ru 12.0-CURRENT FreeBSD
12.0-CURRENT #0 r318590M: Sun May 21 15:26:16 MSK 2017
But 11.0-CURRENT (year old, before release) showed same behavior.
Lev Serebryakov
2017-05-22 15:19:35 UTC
Permalink
I use COM now No COM/RS232 on this model, it is very new one.
Previous Ippon I bought (Smart Power Pro 1000) works perfectly (but
with megatec_usb, not hid, driver), but it was bought many years ago.

But if it worked under Linux, it should be possible to fix on FreeBSD!
--
// Lev Serebryakov
Loading...