• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

Indentifying which USB port my UPS is plugged into.

I'm trying to install the Network UPS tool from http://us1.networkupstools.org, and I'm having a hard time figuring out which USB port my UPS is plugged into.
The install instructions say to "Set ownership data and permissions on your serial or USB ports that go to your UPS hardware. " The example is for a UPS connected to ttyS1 and mine is connected to a USB port.  

Here's what the example shows:

chmod 0600 /dev/ttyS1
chown nut:nut /dev/ttyS1

Here's the relevant output from #cat /proc/bus/usb/devices

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=09ae ProdID=0001 Rev= 0.01
S:  Manufacturer=TRIPP LITE
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 60mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=00 Driver=hid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

There's also this message from $dmesg:

usb 1-2: new low speed USB device using address 2
usb 1-2: device not accepting address 2, error -110
usb 1-2: new low speed USB device using address 3
drivers/usb/input/hid-core.c: ctrl urb status -32 received
hiddev96: USB HID v1.00 Device [TRIPP LITE TRIPP LITE SMART750USB        ] on usb-0000:00:0f.2-2

and a listing of /dev/usb:

auer0   auer8     dabusb5  dc2xx3    hiddev15  lp13      mdc80011  scanner0   scanner8  ttyUSB6
auer1   auer9     dabusb6  dc2xx4    hiddev2   lp14      mdc80012  scanner1   scanner9  ttyUSB7
auer10  cpad0     dabusb7  dc2xx5    hiddev3   lp15      mdc80013  scanner10  ttyUSB0   ttyUSB8
auer11  dabusb0   dabusb8  dc2xx6    hiddev4   lp2       mdc80014  scanner11  ttyUSB1   ttyUSB9
auer12  dabusb1   dabusb9  dc2xx7    hiddev5   lp3       mdc80015  scanner12  ttyUSB10  usblcd
auer13  dabusb10  dc2xx0   dc2xx8    hiddev6   lp4       mdc8002   scanner13  ttyUSB11
auer14  dabusb11  dc2xx1   dc2xx9    hiddev7   lp5       mdc8003   scanner14  ttyUSB12
auer15  dabusb12  dc2xx10  hiddev0   hiddev8   lp6       mdc8004   scanner15  ttyUSB13
auer2   dabusb13  dc2xx11  hiddev1   hiddev9   lp7       mdc8005   scanner2   ttyUSB14
auer3   dabusb14  dc2xx12  hiddev10  lp0       lp8       mdc8006   scanner3   ttyUSB15
auer4   dabusb15  dc2xx13  hiddev11  lp1       lp9       mdc8007   scanner4   ttyUSB2
auer5   dabusb2   dc2xx14  hiddev12  lp10      mdc8000   mdc8008   scanner5   ttyUSB3
auer6   dabusb3   dc2xx15  hiddev13  lp11      mdc8001   mdc8009   scanner6   ttyUSB4
auer7   dabusb4   dc2xx2   hiddev14  lp12      mdc80010  rio500    scanner7   ttyUSB5

It looks to me like it's connected to USB device #3, but I can't figure out what device I'm supposed to be using.
1 Solution
Try unplugging the USB cable. Then plug it back in, wait a few seconds and execute 'dmseg'. If the system recognizes the USB device as a terminal type device you should be able to see what USB tty is associated with the UPS.
To start with /dev/ttyS0 etc is actually conventionally the serial port. Older USBs tended to be connected to the serial port!

In your case you are connected to /dev/ttyUSB2 as the first 2 devices relate to the UHCI (or equivalent) hubs. This is actually device 3 as the device numbers start at 0.



Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now