From: <sre...@wi...> - 2006-08-25 03:48:41
|
=20 Hi=20 -----Original Message----- From: lib...@li... [mailto:lib...@li...] On Behalf Of lib...@li... Sent: Friday, August 25, 2006 12:32 AM To: lib...@li... Subject: Libusb-devel Digest, Vol 3, Issue 23 Send Libusb-devel mailing list submissions to lib...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/libusb-devel or, via email, send a message with subject or body 'help' to lib...@li... You can reach the person managing the list at lib...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Libusb-devel digest..." Today's Topics: 1. changing USB device mode (sre...@wi...) 2. Re: changing USB device mode (Charles Lepple) 3. Re: changing USB device mode (Peter Stuge) ---------------------------------------------------------------------- Message: 1 Date: Thu, 24 Aug 2006 16:18:16 +0530 From: <sre...@wi...> Subject: [Libusb-devel] changing USB device mode To: <lib...@li...> Message-ID: <4BF93629369C534D9F7850EE49BA44E3D0F6DB@HYD-MKD-MBX01.wipro.com> Content-Type: text/plain; charset=3D"us-ascii" Hi, =20 The application I use is to test various features of the mobile connected to the system using USB interface. The device(mobile) works in two modes(one at a time): as a CDC device and Memory Stick But for the testing of phone features the device should always be detected as a CDC device. =20 Initially if the device is in phone mode, and if we reset the device, after reset it is being detected as a Memory Stick. Is there any way to bring the device back to phone mode through software(without physically handling the device). This is required since the testing will be done remotely. =20 Any help in this regard will be highly appreciated. I will be pleased to provide any information required. =20 Below is the output of /proc/bus/usb/devices when device is in different modes: =20 -------------------------------------------------------------------- Phone mode -------------------------------------------------------------------- T: Bus=3D04 Lev=3D02 Prnt=3D80 Port=3D00 Cnt=3D01 Dev#=3D 87 Spd=3D12 = MxCh=3D 0 D: Ver=3D 2.00 Cls=3D02(comm.) Sub=3D00 Prot=3D00 MxPS=3D64 #Cfgs=3D 1 P: Vendor=3D0fce ProdID=3Dd046 Rev=3D 0.00 S: Manufacturer=3DSony Ericsson S: Product=3DSony Ericsson K610 S: SerialNumber=3D3517090106006830 C:* #Ifs=3D10 Cfg#=3D 3 Atr=3D80 MxPwr=3D500mA I: If#=3D 0 Alt=3D 0 #EPs=3D 0 Cls=3D02(comm.) Sub=3D08 Prot=3D00 = Driver=3D(none) I: If#=3D 1 Alt=3D 0 #EPs=3D 1 Cls=3D02(comm.) Sub=3D02 Prot=3D01 = Driver=3D(none) E: Ad=3D81(I) Atr=3D03(Int.) MxPS=3D 16 Ivl=3D16ms I: If#=3D 2 Alt=3D 0 #EPs=3D 2 Cls=3D0a(data ) Sub=3D00 Prot=3D00 Driver=3Dusbserial_generic E: Ad=3D02(O) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms E: Ad=3D82(I) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms I: If#=3D 3 Alt=3D 0 #EPs=3D 1 Cls=3D02(comm.) Sub=3D02 Prot=3D01 = Driver=3D(none) E: Ad=3D84(I) Atr=3D03(Int.) MxPS=3D 16 Ivl=3D16ms I: If#=3D 4 Alt=3D 0 #EPs=3D 2 Cls=3D0a(data ) Sub=3D00 Prot=3D00 Driver=3Dusbserial_generic E: Ad=3D05(O) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms E: Ad=3D85(I) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms I: If#=3D 5 Alt=3D 0 #EPs=3D 0 Cls=3D02(comm.) Sub=3D0b Prot=3D00 = Driver=3D(none) I: If#=3D 6 Alt=3D 0 #EPs=3D 0 Cls=3D0a(data ) Sub=3D00 Prot=3D00 = Driver=3D(none) I: If#=3D 6 Alt=3D 1 #EPs=3D 2 Cls=3D0a(data ) Sub=3D00 Prot=3D00 = Driver=3D(none) E: Ad=3D06(O) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms E: Ad=3D86(I) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms I: If#=3D 7 Alt=3D 0 #EPs=3D 1 Cls=3D02(comm.) Sub=3D09 Prot=3D01 = Driver=3D(none) E: Ad=3D87(I) Atr=3D03(Int.) MxPS=3D 16 Ivl=3D16ms I: If#=3D 8 Alt=3D 0 #EPs=3D 1 Cls=3D02(comm.) Sub=3D06 Prot=3D00 = Driver=3D(none) E: Ad=3D88(I) Atr=3D03(Int.) MxPS=3D 8 Ivl=3D10ms I: If#=3D 9 Alt=3D 0 #EPs=3D 0 Cls=3D0a(data ) Sub=3D00 Prot=3D00 = Driver=3D(none) I: If#=3D 9 Alt=3D 1 #EPs=3D 2 Cls=3D0a(data ) Sub=3D00 Prot=3D00 = Driver=3D(none) E: Ad=3D09(O) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms E: Ad=3D89(I) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms I: If#=3D 9 Alt=3D 2 #EPs=3D 2 Cls=3D0a(data ) Sub=3D00 Prot=3Dff = Driver=3D(none) E: Ad=3D09(O) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms E: Ad=3D89(I) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms =20 ------------------------------------------------------------------ Memory Stick mode --------------------------------------------------------------------- =20 T: Bus=3D04 Lev=3D02 Prnt=3D80 Port=3D00 Cnt=3D01 Dev#=3D 89 Spd=3D12 = MxCh=3D 0 D: Ver=3D 2.00 Cls=3D00(>ifc ) Sub=3D00 Prot=3D00 MxPS=3D64 #Cfgs=3D 1 P: Vendor=3D0fce ProdID=3De046 Rev=3D 0.00 S: Manufacturer=3DSony Ericsson S: Product=3DMemory Stick S: SerialNumber=3D3517090106006830 C:* #Ifs=3D 1 Cfg#=3D 2 Atr=3D80 MxPwr=3D500mA I: If#=3D 0 Alt=3D 0 #EPs=3D 2 Cls=3D08(stor.) Sub=3D06 Prot=3D50 = Driver=3D(none) E: Ad=3D01(O) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms E: Ad=3D81(I) Atr=3D02(Bulk) MxPS=3D 64 Ivl=3D0ms =20 Thanks and Regards, Sreevidya =20 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://sourceforge.net/mailarchive/forum.php?forum=3Dlibusb-devel/attachm= e nts/20060824/828665ff/attachment.html=20 ------------------------------ Message: 2 Date: Thu, 24 Aug 2006 08:32:42 -0400 From: "Charles Lepple" <cl...@gm...> Subject: Re: [Libusb-devel] changing USB device mode To: lib...@li... Message-ID: <af8...@ma...> Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed On 8/24/06, sre...@wi... <sre...@wi...> wrote: > Phone mode > -------------------------------------------------------------------- > T: Bus=3D04 Lev=3D02 Prnt=3D80 Port=3D00 Cnt=3D01 Dev#=3D 87 Spd=3D12 = MxCh=3D 0 > D: Ver=3D 2.00 Cls=3D02(comm.) Sub=3D00 Prot=3D00 MxPS=3D64 #Cfgs=3D = 1 > P: Vendor=3D0fce ProdID=3Dd046 Rev=3D 0.00 > S: Manufacturer=3DSony Ericsson > S: Product=3DSony Ericsson K610 > S: SerialNumber=3D3517090106006830 > C:* #Ifs=3D10 Cfg#=3D 3 Atr=3D80 MxPwr=3D500mA Note the "Cfg#=3D3" here > Memory Stick mode > --------------------------------------------------------------------- > > T: Bus=3D04 Lev=3D02 Prnt=3D80 Port=3D00 Cnt=3D01 Dev#=3D 89 Spd=3D12 = MxCh=3D 0 > D: Ver=3D 2.00 Cls=3D00(>ifc ) Sub=3D00 Prot=3D00 MxPS=3D64 #Cfgs=3D = 1 > P: Vendor=3D0fce ProdID=3De046 Rev=3D 0.00 > S: Manufacturer=3DSony Ericsson > S: Product=3DMemory Stick > S: SerialNumber=3D3517090106006830 > C:* #Ifs=3D 1 Cfg#=3D 2 Atr=3D80 MxPwr=3D500mA and "Cfg#=3D2" here. The obvious suggestion would be to use usb_set_configuration(): http://libusb.sourceforge.net/doc/function.usbsetconfiguration.html I have already tried usb_set_configuration(), but it gives an error, an invalid argument.=20 but given that "#Cfgs=3D1", the device may not support switching configurations remotely. The configuration number could be essentially read-only (for matching drivers in another OS, for instance). Yes, at one time, only one configuration is being listed.=20 -- - Charles Lepple ------------------------------ Message: 3 Date: Thu, 24 Aug 2006 17:18:57 +0200 From: Peter Stuge <stu...@cd...> Subject: Re: [Libusb-devel] changing USB device mode To: lib...@li... Message-ID: <200...@cd...> Content-Type: text/plain; charset=3Dus-ascii On Thu, Aug 24, 2006 at 04:18:16PM +0530, sre...@wi... wrote: > Is there any way to bring the device back to phone mode through > software(without physically handling the device). You should ask SE technicians for a definitive answer on the recommended way to do so. Meanwhile you could try "soft detach" - disabling the hub port that the device is connected to and then re-enabling it. I'm not sure the Linux hub driver can do this currently, but it would probably be easy to add an ioctl for it. I mentioned after resetting the device, the device is detected as Memory stick. Actually in device reset we follow the following steps: 1)Disable hub port power (to disable charging of the device) 2)Remove battery charge 3)Put the battery charge back 4)Enable hub port power ( enable charging) So the above steps involve soft detach. After all the above steps I tried the soft detach process again. But still the device is detected as Memory Stick. //Peter ------------------------------ ------------------------------------------------------------------------ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 ------------------------------ _______________________________________________ Libusb-devel mailing list Lib...@li... https://lists.sourceforge.net/lists/listinfo/libusb-devel End of Libusb-devel Digest, Vol 3, Issue 23 ******************************************* |