Charles Lepple
2021-Jan-23 14:21 UTC
[Nut-upsuser] New User Questions (again) - With Belkin USB
On Jan 22, 2021, at 5:38 PM, David White via Nut-upsuser <nut-upsuser at alioth-lists.debian.net> wrote:> > 4. lsusb shows the UPS on Bus 001, Device 003 (cypress USB to Serial) > Bus 002 Device 002: ID 05e3:0612 Genesys Logic, Inc. > Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub > Bus 001 Device 005: ID 046d:c52b Logitech, Inc. Unifying Receiver > Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter > Bus 001 Device 003: ID 0665:5161 Cypress Semiconductor USB to SerialDavid, is this the same system as mentioned in this thread? https://alioth-lists.debian.net/pipermail/nut-upsuser/2020-January/011619.html While wolfy's suggestions are applicable for a serial UPS with an external USB-to-serial adapter, it sounds like your Belkin UPS has the Cypress chip built-in, and the blazer_usb driver expects to talk directly to that chip (bypassing any kernel drivers that create /dev/ttyUSB* nodes). Changing the config file modes from 777 to 640 is likely orthogonal to the problem, but something I'd want to fix sooner than later. What does `ls -l /dev/bus/usb/001/003` show? You can also try starting the driver manually. There are easier ways to do this in newer versions of NUT, but with 2.7.1 and an Ubuntu-like filesystem layout, it would be something like this (assuming the UPS name is still belkinusb in /etc/nut/ups.conf): /lib/nut/blazer_usb -a belkinusb -DD -- Charles Lepple clepple at gmail
David White
2021-Jan-23 18:07 UTC
[Nut-upsuser] New User Questions (again) - With Belkin USB
Charles, Your recollection is spot-on. The UPS is exactly the same unit. But the system talking to it is a new one replacing the one from back then. It is similar in that it is an Android TV box running Ubuntu in a chroot environment. But the Android and kernel versions are different - perhaps also the version of nut (I haven't checked that). The SOC is different as well. But both 32-bit and are running the same Ubuntu. I checked and there is only a single /dev/ttyUSB* and I know that is from a true USB->Serial adapter I have plugged in for controlling my home automation using Heyu. I had to compile the drivers for it into .ko modules. So I think that there should be no conflict in the nut driver's ability to talk directly to the Cypress chip if it wants to. I did the chmod myself thinking that there might be some odd access/permission problem and will change it back since that hasn't changed diddly. ls -l /dev/bus/usb/001/003 shows: crw-rw----. 1 root aid_usb 189, 2 Jan 23 00:06 /dev/bus/usb/001/003 which is about what I'd expect but I am no expert. /lib/nut/blazer_usb -a belkinusb -DD shows: Network UPS Tools - Megatec/Q1 protocol USB driver 0.10 (2.7.1) 0.000000 debug level is '2' 0.051735 No appropriate HID device found 0.051787 No supported devices found. Please check your device availability with 'lsusb' and make sure you have an up-to-date version of NUT. If this does not help, try running the driver with at least 'subdriver', 'vendorid' and 'productid' options specified. Please refer to the man page for details about these options(man 8 blazer). Which is at least consistent :-) I note that in /lib/nut there are a couple drivers named belkin*, so I have changed the ups.conf to reference them and: /lib/nut/belkin -a belkinusb -DD shows: Network UPS Tools - Belkin Smart protocol driver 0.24 (2.7.1) 0.000000 debug level is '2' Unable to open auto: No such file or directory Things to try: - Check 'port=' in ups.conf - Check owner/permissions of all parts of path 0.025882 Fatal error: unusable configuration and I get the same when trying the belkinunv driver. I found reference online to using the usbhid-ups driver with Belkin and so: /lib/nut/usbhid-ups -a belkinusb -DD shows: Network UPS Tools - Generic HID driver 0.38 (2.7.1) USB communication driver 0.32 0.000000 debug level is '2' 1.026068 upsdrv_initups... 1.026497 No appropriate HID device found 1.026528 No matching HID UPS found android at localhost:~$ So I remain stumped. Your time and help are appreciated! On 1/23/2021 6:21 AM, Charles Lepple wrote:> On Jan 22, 2021, at 5:38 PM, David White via Nut-upsuser <nut-upsuser at alioth-lists.debian.net> wrote: >> >> 4. lsusb shows the UPS on Bus 001, Device 003 (cypress USB to Serial) >> Bus 002 Device 002: ID 05e3:0612 Genesys Logic, Inc. >> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub >> Bus 001 Device 005: ID 046d:c52b Logitech, Inc. Unifying Receiver >> Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter >> Bus 001 Device 003: ID 0665:5161 Cypress Semiconductor USB to Serial > > David, > > is this the same system as mentioned in this thread? https://alioth-lists.debian.net/pipermail/nut-upsuser/2020-January/011619.html > > While wolfy's suggestions are applicable for a serial UPS with an external USB-to-serial adapter, it sounds like your Belkin UPS has the Cypress chip built-in, and the blazer_usb driver expects to talk directly to that chip (bypassing any kernel drivers that create /dev/ttyUSB* nodes). > > Changing the config file modes from 777 to 640 is likely orthogonal to the problem, but something I'd want to fix sooner than later. > > What does `ls -l /dev/bus/usb/001/003` show? > > You can also try starting the driver manually. There are easier ways to do this in newer versions of NUT, but with 2.7.1 and an Ubuntu-like filesystem layout, it would be something like this (assuming the UPS name is still belkinusb in /etc/nut/ups.conf): > > /lib/nut/blazer_usb -a belkinusb -DD >