Need USB config example /etc/nut/ups.conf

Kernels & Hardware, configuring network, installing services

Need USB config example /etc/nut/ups.conf

Postby MikeLieberman » 2020-12-17 01:34

I know what USB port the USP USB cable is run to on my computer, but for the life of me I am unclear how to rewrite the config file to point to the USB port.
The command to write the basic file before the change to USB would look like;
Code: Select all
cat >> /etc/nut/ups.conf << EOF
[ups]

        driver = blazer_ser
        port = /dev/ttyS0
        desc = "my server1 ups"
EOF

I know the UPS is on port 3:
Bus 001 Device 003: ID 04b4:5500 Cypress Semiconductor Corp. HID->COM RS232 Adapter

And
ls /dev/bus/usb
001 002 003 004

But /dev/bus/usb/003 is a directory and not valid.

How is the port line written?
MikeLieberman
 
Posts: 18
Joined: 2013-01-29 17:26

Re: Need USB config example /etc/nut/ups.conf

Postby MikeLieberman » 2020-12-18 02:08

I tried:
[ups]

driver = blazer_ser
port = /dev/bus/usb/001/003
desc = "my server1 ups"
EOF

But then I checked to see if this worked:
# /lib/nut/blazer_ser -a ups
Network UPS Tools - Megatec/Q1 protocol serial driver 1.57 (2.7.4)
tcgetattr(/dev/bus/usb/001/003): Inappropriate ioctl for device

Here is the port info:
# lsusb -D /dev/bus/usb/001/003
Device: ID 04b4:5500 Cypress Semiconductor Corp. HID->COM RS232 Adapter
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x04b4 Cypress Semiconductor Corp.
idProduct 0x5500 HID->COM RS232 Adapter
bcdDevice 0.00
iManufacturer 1 Cypress Semiconductor
iProduct 2 USB to Serial
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4 Sample HID
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 37
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0000
(Bus Powered)


What am I doing wrong?
MikeLieberman
 
Posts: 18
Joined: 2013-01-29 17:26


Return to System configuration

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable