On Monday 23 April 2007, Greg KH wrote: >On Sat, Apr 21, 2007 at 09:07:51PM -0400, Gene Heskett wrote: >> Hi guys; >> >> I am using one of these as the interface between belkins upsd daemon and >> the ups, This particular one says its a radio shack model according to >> lsusb -v: ====== >> Bus 002 Device 003: ID 1453:4026 Radio Shack 26-183 Serial Cable >> Device Descriptor: >> bLength 18 >> bDescriptorType 1 >> bcdUSB 1.10 >> bDeviceClass 0 (Defined at Interface level) >> bDeviceSubClass 0 >> bDeviceProtocol 0 >> bMaxPacketSize0 8 >> idVendor 0x1453 Radio Shack >> idProduct 0x4026 26-183 Serial Cable >> bcdDevice 0.00 >> iManufacturer 0 >> iProduct 0 >> iSerial 0 >> bNumConfigurations 1 >> Configuration Descriptor: >> bLength 9 >> bDescriptorType 2 >> wTotalLength 39 >> bNumInterfaces 1 >> bConfigurationValue 1 >> iConfiguration 0 >> bmAttributes 0x80 >> MaxPower 500mA >> Interface Descriptor: >> bLength 9 >> bDescriptorType 4 >> bInterfaceNumber 0 >> bAlternateSetting 0 >> bNumEndpoints 3 >> bInterfaceClass 255 Vendor Specific Class >> bInterfaceSubClass 0 >> bInterfaceProtocol 0 >> iInterface 0 >> Endpoint Descriptor: >> bLength 7 >> bDescriptorType 5 >> bEndpointAddress 0x81 EP 1 IN >> bmAttributes 3 >> Transfer Type Interrupt >> Synch Type None >> Usage Type Data >> wMaxPacketSize 0x000a 1x 10 bytes >> bInterval 1 >> Endpoint Descriptor: >> bLength 7 >> bDescriptorType 5 >> bEndpointAddress 0x02 EP 2 OUT >> bmAttributes 2 >> Transfer Type Bulk >> Synch Type None >> Usage Type Data >> wMaxPacketSize 0x0040 1x 64 bytes >> bInterval 0 >> Endpoint Descriptor: >> bLength 7 >> bDescriptorType 5 >> bEndpointAddress 0x83 EP 3 IN >> bmAttributes 2 >> Transfer Type Bulk >> Synch Type None >> Usage Type Data >> wMaxPacketSize 0x0040 1x 64 bytes >> bInterval 0 >> ======, several years old now, and the cat of /proc/bus/usb/devices for >> it looks like this: >> >> T: Bus=02 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 >> D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 >> P: Vendor=1453 ProdID=4026 Rev= 0.00 >> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA >> I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=pl2303 >> E: Ad=81(I) Atr=03(Int.) MxPS= 10 Ivl=1ms >> E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms >> E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms >> >> And no, that's not a paste error, it really does have 3 E:'s. >> >> dmesg says this about it. >> pl2303 2-2.1:1.0: pl2303 converter detected >> usb 2-2.1: pl2303 converter now attached to ttyUSB0 >> usbcore: registered new interface driver pl2303 >> drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver >> drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI >> USB Serial Device >> >> When it is being used to monitor the ups, it will fail to get the data >> properly, 2 or 3 times a day, and the belkin upsd has this nasty habit of >> throwing up a small screen on every screen running, or popping up its >> message on all available shells with a -wall broadcast advising the whole >> world of the disconnect, only to cancel it 2 seconds later when it starts >> getting good data again. A right noxious PITA. And it can only talk to a >> full, 12mb/s usb circuit, it is not even detected or initialized if its >> plugged into a high speed (400mhz) hub. > >That's odd, is the data really there? You can enable debugging in the >pl2303 driver with: > modprobe pl2303 debug=1 >or writing 1 to /sys/modules/pl2303/parameters/debug > This had no effect, so I assume I'd have to rebuild to enable that. Running 2.6.21-rc7-CFS-v5 ATM.
>That will probably give you way more information in your syslog than you >ever wanted, but would point to if the device was ever really seen by >the Linux side at all. > >> The problem has the walk and quack of a type 2 pl2303 that I was able to >> find a thread on that took place back in 2005, thanks to google. >> >> Is this indeed a type 2 chip? Or enough of a clone of it to stumble like >> this from time to time? >> >> Are there any patches to fix this even pending at this late date? I could >> play the canary easy enough and test them. > >I don't have any pl2303 patches pending, it should "just work". Oh make >sure you have the flow control set up properly, you have done that, >right? Flow control would be whatever the upsd sets up when it starts. AFAIK it treats /dev/ttyUSB0 (or 1) exactly as if it was a stock 16550 based seriel port. But who really knows with proprietary stuffs? Do we have a survey utility that would return this data in human readable form? While it was initialized and in use? When the hardware serial port is used, I can cat the port and see either a byte or a word, at 1 second intervals so the data rate is miniscule. I can plug in a usb cable and cat /dev/hiddev but hiddev then decodes the data, apparently correctly, but their software apparently cannot deal with hiddev decoded data at all. My next ups won't be a belkin.. >thanks, Thank you! >greg k-h -- Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Why do they call a fast a fast, when it goes so slow? ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel