APC UPS usb not recognized by Archer C7

I have an APC UPC (SUA 750I) and want to connect it to my Archer C7 v2 which runs openwrt 22.03.
I have currently connected an external usb ssd drive to one of the two usb ports as an external overlay, which runs perfectly.
When I connect the usb cable to the C7, the second LED does not come up (only the first one stays on which has the ssd connected).
Here is also the output of lsusb

root@OpenWrt:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux 5.10.176 ehci_hcd EHCI Host Controller
Bus 001 Device 002: ID 174c:55aa ASMedia USB 3.1 Storage Device
Bus 001 Device 001: ID 1d6b:0002 Linux 5.10.176 ehci_hcd EHCI Host Controller

this output remains the same before/after plugging the usb cable from the UPS.

I was thinking that the cable and/or the UPS is bad, but it works fine on my ubuntu laptop when I plug it there:

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0a5c:5843 Broadcom Corp. 58200
Bus 001 Device 002: ID 0c45:6a09 Microdia Integrated_Webcam_HD
Bus 001 Device 007: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 005: ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Also, when I plug a USB flash drive to the C7, the second LED comes up and it shows in lsusb:

root@OpenWrt:~# lsusb
Bus 001 Device 002: ID 174c:55aa ASMedia USB 3.1 Storage Device
Bus 001 Device 001: ID 1d6b:0002 Linux 5.10.176 ehci_hcd EHCI Host Controller
Bus 002 Device 015: ID 13fe:5200 UFD 3.0 Silicon-Power32G
Bus 002 Device 001: ID 1d6b:0002 Linux 5.10.176 ehci_hcd EHCI Host Controller

So I have ruled out any defects from USB ports or cables. For some reason the UPS and the C7 do not get along.

I have installed kmod-usb-hid, apcupsd and collectd-mod-apcups.

Disconnect UPS, run logread -f then connect UPS back. Wait a bit and show the output.

Here is the output. The first line came up immediately when I connected it.


Sat Aug  5 16:00:04 2023 kern.info kernel: [ 1881.789897] usb 2-1: new low-speed USB device number 20 using ehci-platform
Sat Aug  5 16:00:19 2023 kern.err kernel: [ 1897.049626] usb 2-1: device descriptor read/64, error -145
Sat Aug  5 16:00:34 2023 kern.err kernel: [ 1912.489351] usb 2-1: device descriptor read/64, error -145
Sat Aug  5 16:00:35 2023 kern.info kernel: [ 1912.759354] usb 2-1: new low-speed USB device number 21 using ehci-platform

The log continues with the same outputs repeated.

More output:

Sat Aug  5 16:01:06 2023 kern.info kernel: [ 1943.648828] usb usb2-port1: attempt power cycle
Sat Aug  5 16:01:06 2023 kern.info kernel: [ 1944.118769] usb 2-1: new low-speed USB device number 22 using ehci-platform
Sat Aug  5 16:01:17 2023 kern.err kernel: [ 1954.718543] usb 2-1: device not accepting address 22, error -145
Sat Aug  5 16:01:17 2023 kern.info kernel: [ 1954.868538] usb 2-1: new low-speed USB device number 23 using ehci-platform
Sat Aug  5 16:01:27 2023 kern.err kernel: [ 1965.438324] usb 2-1: device not accepting address 23, error -145
Sat Aug  5 16:01:27 2023 kern.err kernel: [ 1965.444563] usb usb2-port1: unable to enumerate USB device
Sat Aug  5 16:01:37 2023 daemon.warn apcupsd[1820]: Communications with UPS lost.

Similar (?) issue here: [Solved] USB: Driver not loaded for APC Smart-UPS750

Personally I would try nut instead of apcupsd.

But in my case the ups is not even recognized by lsusb..
Is apcupsd or nut related at this point? Looks like a kernel issue?

My understanding you just cannot catch the right moment with lsusb.
As I recall from the past, the UPS sees the USB connection and waits a few seconds for the driver to communicate with it, then disconnects from the USB. Not sure what driver settings you have, but this is what should be checked.

What do you mean by driver settings?
I have installed a bunch of packages starting from kmod-usb* but nothing changed..

Sorry for confusion, with hid driver you do not have any driver settings as such, you only have apcupsd.conf that (optionally?) needs a reference to the device created by the appropriate driver. Default configuration file suggests using UPSTYPE usb without reference to the device.
I do not see a need for other USB driver(s). What you need is probably kmod-hid-generic.
See if you have hiddev* created somewhere (right after the connection), the wiki is a bit confusing in regard to the location - in one place they refer to /dev/usb/hid/hiddev[0-15] and in another they show hiddev0 under /dev/usb directly.

I have kmod-hid-generic installed already..
However /dev/usb subdirectory does not exist at all..

Try kmod-usb-hid instead, then ls -la /dev/usb
also
dmesg | grep usb

Does plugging it in as the sole usb device and to the other usb port help? My Archer c7v2 had problems on one port ... I think it was a power problem when too much was connected to the router. Back then in the past, I added an active powered usb hub in between and the problem got away. Else you could try reboot.

I installed also kmod-usb-hid but again no /dev/usb subdirectory appears.
dmesg | grep usb shows similar to the previous command.

root@OpenWrt:~# dmesg | grep usb
[    4.383067] usbcore: registered new interface driver usbfs
[    4.388697] usbcore: registered new interface driver hub
[    4.394214] usbcore: registered new device driver usb
[    4.428005] ehci-platform 1b000000.usb: EHCI Host Controller
[    4.433808] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    4.441864] ehci-platform 1b000000.usb: irq 14, io mem 0x1b000000
[    4.469514] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    4.485823] ehci-platform 1b400000.usb: EHCI Host Controller
[    4.491645] ehci-platform 1b400000.usb: new USB bus registered, assigned bus number 2
[    4.499719] ehci-platform 1b400000.usb: irq 15, io mem 0x1b400000
[    4.529466] ehci-platform 1b400000.usb: USB 2.0 started, EHCI 1.00
[    4.979757] usb 2-1: new low-speed USB device number 2 using ehci-platform
[   14.646896] usbcore: registered new interface driver usb-storage
[   14.659520] usbcore: registered new interface driver uas
[   20.269629] usb 2-1: device descriptor read/64, error -145
[   35.759522] usb 2-1: device descriptor read/64, error -145
[   36.029514] usb 2-1: new low-speed USB device number 3 using ehci-platform
[   51.309504] usb 2-1: device descriptor read/64, error -145
[   68.669539] usb 2-1: device descriptor read/64, error -145
[   68.789585] usb usb2-port1: attempt power cycle
[   69.269515] usb 2-1: new low-speed USB device number 4 using ehci-platform
[   79.859475] usb 2-1: device not accepting address 4, error -145
[   80.009476] usb 2-1: new low-speed USB device number 5 using ehci-platform
[   90.579459] usb 2-1: device not accepting address 5, error -145
[   90.585525] usb usb2-port1: unable to enumerate USB device
[  393.440330] usbcore: registered new interface driver usbhid
[  393.446088] usbhid: USB HID core driver
[  454.824681] usb 1-1: new low-speed USB device number 2 using ehci-platform
[  470.121756] usb 1-1: device descriptor read/64, error -145
[  485.568344] usb 1-1: device descriptor read/64, error -145
[  485.838463] usb 1-1: new low-speed USB device number 3 using ehci-platform
[  501.174684] usb 1-1: device descriptor read/64, error -145
[  516.620580] usb 1-1: device descriptor read/64, error -145
[  516.740679] usb usb1-port1: attempt power cycle
[  517.210792] usb 1-1: new low-speed USB device number 4 using ehci-platform
[  527.814642] usb 1-1: device not accepting address 4, error -145
[  527.964693] usb 1-1: new low-speed USB device number 5 using ehci-platform
[  538.538380] usb 1-1: device not accepting address 5, error -145
[  538.544596] usb usb1-port1: unable to enumerate USB device
[  787.921518] usb 2-1: new low-speed USB device number 6 using ehci-platform
[  803.213869] usb 2-1: device descriptor read/64, error -145
[  818.655461] usb 2-1: device descriptor read/64, error -145
[  818.925501] usb 2-1: new low-speed USB device number 7 using ehci-platform
[  834.257030] usb 2-1: device descriptor read/64, error -145
[  849.698533] usb 2-1: device descriptor read/64, error -145
[  849.818581] usb usb2-port1: attempt power cycle
[  850.288577] usb 2-1: new low-speed USB device number 8 using ehci-platform
[  860.889576] usb 2-1: device not accepting address 8, error -145
[  861.039605] usb 2-1: new low-speed USB device number 9 using ehci-platform
[  871.610568] usb 2-1: device not accepting address 9, error -145
[  871.616648] usb usb2-port1: unable to enumerate USB device

I removed the ssd drive from the other usb port (which draws some power) and getting the exact same behavior. Also switching between the 2 usb ports or rebooting also does not help.. :frowning:

Hi

maybe you should try to connect UPS USB cable to ordinary PC/Laptop
maybe USB cable is broken
or maybe USB port on UPS is damaged
so it is worth to try on some standard/well known working PC first

2 Likes

Hi,
As I wrote in my first post, I plugged it to my ubuntu laptop and the lsusb command outputs the UPS normally..
I also plugged it to my windows laptop and it shows in the device manager..
Not sure if I need to do any further testing..?

sorry, missed that part, it is well buried in middle of OP :frowning:

¯\_(ツ)_/¯ If you don't see your #hiddev0, then something is wrong with the kmod-usb-hid. This needs to be resolved. FWIW, I expect you will also have issues trying to use ‘nut’.

Do you get any return to find / -name hiddev*?

Can I assume you used this wiki or it’s alternate to set up?

find / -name hiddev* returns nothing..
Yes I started following the ES-500 wiki (the SU-700 is for a serial cable) - basically installing opkg install kmod-usb-hid but then nothing shows up in ls -la /dev/usb or in lsusb...

Thing is that I installed another APC UPC successfully on my C2600 router with no issues (which is on an entirely different location though)

Is the other APC UPS the same model? There are big differences between the SmartUPS and BackUPS models.
And, so it seems, some minor but really mean differences between the older SUA models and the newer SMT devices.

The only advice i could give is, get a serial-usb-converter and use the serial port on your SUA750. In my case, a cheap PL2303-based cable did the job just fine.

1 Like