Mikkel L. Ellertson wrote:
If you run "tail -f /var/log/messages" before you plug in the UPS,
you should see what device is being created when you plug in the
UPS. I suspect it looks like a USB serial port.
You may also want to run "lsusb -vs 4:15" or "lsusb -vd 050d:0980"
to get more detail about it. Personally, I like to look at
/proc/bus/usb/devices for the information. The driver listing will
usually indicate what kind of device was created.
Mikkel
tail -f /var/log/messages
Produces the following when I plug in the UPS connector:
Aug 10 17:17:45 box6 kernel: usb 4-1: new low speed USB
device using
uhci_hcd and address 17
Aug 10 17:17:45 box6 kernel: usb 4-1: configuration #1
chosen from 1 choice
Aug 10 17:17:45 box6 kernel: hiddev96: USB HID v1.00
Device [
UPS] on usb-0000:00:1d.3-1
Plugging in a flash memory stick produces a quite
different result and
the device name is obviously /dev/sdc1. The flash
memory device is
being processed differently.
Aug 10 17:21:01 box6 kernel: usb 5-8: new high speed USB
device using
ehci_hcd and address 9
Aug 10 17:21:01 box6 kernel: usb 5-8: configuration #1
chosen from 1 choice
Aug 10 17:21:02 box6 kernel: Initializing USB Mass
Storage driver...
Aug 10 17:21:02 box6 kernel: scsi4 : SCSI emulation for
USB Mass Storage
devices
Aug 10 17:21:02 box6 kernel: usbcore: registered new
interface driver
usb-storage
Aug 10 17:21:02 box6 kernel: USB Mass Storage support
registered.
Aug 10 17:21:07 box6 kernel: scsi 4:0:0:0: Direct-Access
PNY
USB 2.0 FD PMAP PQ: 0 ANSI: 0 CCS
Aug 10 17:21:09 box6 kernel: sd 4:0:0:0: [sdc] 8060928
512-byte hardware
sectors (4127 MB)
Aug 10 17:21:09 box6 kernel: sd 4:0:0:0: [sdc] Write
Protect is off
Aug 10 17:21:09 box6 kernel: sd 4:0:0:0: [sdc] Assuming
drive cache:
write through
Aug 10 17:21:09 box6 kernel: sd 4:0:0:0: [sdc] 8060928
512-byte hardware
sectors (4127 MB)
Aug 10 17:21:09 box6 kernel: sd 4:0:0:0: [sdc] Write
Protect is off
Aug 10 17:21:09 box6 kernel: sd 4:0:0:0: [sdc] Assuming
drive cache:
write through
Aug 10 17:21:09 box6 kernel: sdc: sdc1
Aug 10 17:21:09 box6 kernel: sd 4:0:0:0: [sdc] Attached
SCSI removable disk
Aug 10 17:21:09 box6 kernel: sd 4:0:0:0: Attached scsi
generic sg3 type 0
And then cat /proc/bus/usb/devices
Produces the following for the UPS:
T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 15 Spd=1.5
MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=050d ProdID=0980 Rev= 0.06
S: Manufacturer=
S: Product=UPS
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 20mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00
Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=248ms
And for the flash memory device:
T: Bus=05 Lev=01 Prnt=01 Port=07 Cnt=01 Dev#= 9 Spd=480
MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=154b ProdID=000f Rev= 1.10
S: Manufacturer=PNY
S: Product=USB 2.0 FD
S: SerialNumber=6E741E0B03A7
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
And then:
lsusb -vd 050d:0980
Bus 004 Device 017: ID 050d:0980 Belkin Components
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x050d Belkin Components
idProduct 0x0980
bcdDevice 0.06
iManufacturer 4
iProduct 20 UPS
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 20mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Devices
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 33 US
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 820
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
I guess I still don't know how to identify the UPS device
for the configuration file, perhaps /dev/UPS?
Bob Goodwin
--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list