From owner-freebsd-usb@FreeBSD.ORG Sun Oct 13 08:22:12 2013 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 34ED7D0E for ; Sun, 13 Oct 2013 08:22:12 +0000 (UTC) (envelope-from danfe@regency.nsu.ru) Received: from mx.nsu.ru (mx.nsu.ru [84.237.50.39]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D3839288C for ; Sun, 13 Oct 2013 08:22:11 +0000 (UTC) Received: from regency.nsu.ru ([193.124.210.26]) by mx.nsu.ru with esmtp (Exim 4.69) (envelope-from ) id 1VVGw0-00078Y-C7; Sun, 13 Oct 2013 15:22:01 +0700 Received: from regency.nsu.ru (localhost [127.0.0.1]) by regency.nsu.ru (8.14.2/8.14.2) with ESMTP id r9D8MFeM074940; Sun, 13 Oct 2013 15:22:25 +0700 (NOVT) (envelope-from danfe@regency.nsu.ru) Received: (from danfe@localhost) by regency.nsu.ru (8.14.2/8.14.2/Submit) id r9D8MASH074908; Sun, 13 Oct 2013 15:22:10 +0700 (NOVT) (envelope-from danfe) Date: Sun, 13 Oct 2013 15:22:10 +0700 From: Alexey Dokuchaev To: Hans Petter Selasky Subject: Re: iPhone 4(S) access via gphoto2 Message-ID: <20131013082210.GA65964@regency.nsu.ru> References: <20131012175942.GA2554@regency.nsu.ru> <20131012190107.GA15100@regency.nsu.ru> <525A42CD.5020201@bitfrost.no> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline In-Reply-To: <525A42CD.5020201@bitfrost.no> User-Agent: Mutt/1.4.2.1i Cc: usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2013 08:22:12 -0000 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Oct 13, 2013 at 08:50:53AM +0200, Hans Petter Selasky wrote: > iPhones sometimes have multiple configurations. > > usbconfig -d X.Y dump_device_desc Dumping desc produced almost identical files (the only differences were in idProduct and iSerialNumber, quite expectedly). > usbconfig -d X.Y set_config 1 > usbconfig -d X.Y set_config 2 > usbconfig -d X.Y set_config 3 I presume I do not need to re-plug or otherwise re-init the phone after setting config, correct? (It seems I don't, asking just to make sure.) > PTP might not always be available from the first configuration. I've tried to play with set_config, but without much luck. However, I did dump_all_config_desc to discover that config index 2 (the one that is "PTP + Apple Mobile Device", with bInterfaceClass = 0x0006) is missing from the output for the "bad" iPhone (diff attached). Why is it missing? Is there any way to force/inject it into the stack? ./danfe --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="iphone_desc.diff" --- ok.all_config 2013-10-13 15:34:36.000000000 +0800 +++ bad.all_config 2013-10-13 15:35:04.000000000 +0800 @@ -203,92 +203,6 @@ - Configuration index 2 - - bLength = 0x0009 - bDescriptorType = 0x0002 - wTotalLength = 0x003e - bNumInterfaces = 0x0002 - bConfigurationValue = 0x0003 - iConfiguration = 0x0007 - bmAttributes = 0x00c0 - bMaxPower = 0x00fa - - Interface 0 - bLength = 0x0009 - bDescriptorType = 0x0004 - bInterfaceNumber = 0x0000 - bAlternateSetting = 0x0000 - bNumEndpoints = 0x0003 - bInterfaceClass = 0x0006 - bInterfaceSubClass = 0x0001 - bInterfaceProtocol = 0x0001 - iInterface = 0x0000 - - Endpoint 0 - bLength = 0x0007 - bDescriptorType = 0x0005 - bEndpointAddress = 0x0002 - bmAttributes = 0x0002 - wMaxPacketSize = 0x0200 - bInterval = 0x000a - bRefresh = 0x0000 - bSynchAddress = 0x0000 - - Endpoint 1 - bLength = 0x0007 - bDescriptorType = 0x0005 - bEndpointAddress = 0x0081 - bmAttributes = 0x0002 - wMaxPacketSize = 0x0200 - bInterval = 0x000a - bRefresh = 0x0000 - bSynchAddress = 0x0000 - - Endpoint 2 - bLength = 0x0007 - bDescriptorType = 0x0005 - bEndpointAddress = 0x0083 - bmAttributes = 0x0003 - wMaxPacketSize = 0x0040 - bInterval = 0x000a - bRefresh = 0x0000 - bSynchAddress = 0x0000 - - - Interface 1 - bLength = 0x0009 - bDescriptorType = 0x0004 - bInterfaceNumber = 0x0001 - bAlternateSetting = 0x0000 - bNumEndpoints = 0x0002 - bInterfaceClass = 0x00ff - bInterfaceSubClass = 0x00fe - bInterfaceProtocol = 0x0002 - iInterface = 0x0000 - - Endpoint 0 - bLength = 0x0007 - bDescriptorType = 0x0005 - bEndpointAddress = 0x0004 - bmAttributes = 0x0002 - wMaxPacketSize = 0x0200 - bInterval = 0x0000 - bRefresh = 0x0000 - bSynchAddress = 0x0000 - - Endpoint 1 - bLength = 0x0007 - bDescriptorType = 0x0005 - bEndpointAddress = 0x0085 - bmAttributes = 0x0002 - wMaxPacketSize = 0x0200 - bInterval = 0x0000 - bRefresh = 0x0000 - bSynchAddress = 0x0000 - - - Configuration index 3 bLength = 0x0009 --mP3DRpeJDSE+ciuQ--