From owner-freebsd-usb@FreeBSD.ORG Sun Oct 13 08:36:43 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 B7BA6DA8 for ; Sun, 13 Oct 2013 08:36:43 +0000 (UTC) (envelope-from hps@bitfrost.no) Received: from mta.bitpro.no (mta.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id 449C028F2 for ; Sun, 13 Oct 2013 08:36:42 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta.bitpro.no (Postfix) with ESMTP id 5A6F17A15B; Sun, 13 Oct 2013 10:36:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id 9FED48EC6AC; Sun, 13 Oct 2013 10:37:05 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D1QfVFBRSF8A; Sun, 13 Oct 2013 10:37:04 +0200 (CEST) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id BEB008EC6A3; Sun, 13 Oct 2013 10:37:04 +0200 (CEST) Message-ID: <525A5BE6.4050801@bitfrost.no> Date: Sun, 13 Oct 2013 10:37:58 +0200 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130522 Thunderbird/17.0.6 MIME-Version: 1.0 To: Alexey Dokuchaev Subject: Re: iPhone 4(S) access via gphoto2 References: <20131012175942.GA2554@regency.nsu.ru> <20131012190107.GA15100@regency.nsu.ru> <525A42CD.5020201@bitfrost.no> <20131013082210.GA65964@regency.nsu.ru> In-Reply-To: <20131013082210.GA65964@regency.nsu.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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:36:43 -0000 On 10/13/13 10:22, Alexey Dokuchaev wrote: > 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 > Hi, > 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.) No need to re-plug. > >> 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? You cannot force it. You might want to watch "usbdump -i usbusX -f Y -vvv -s 65536" while running the config descriptor dump for the broken device. Look for non-zero ERR= Might also be a corrupt USB descriptor, which the USB stack will reject. Would be interesting to know what the cause of this issue is. Are any of these iPhones JailBroken? --HPS