From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 12420 invoked from network); 28 Sep 2023 06:58:42 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 28 Sep 2023 06:58:42 -0000 Received: from pb-smtp20.pobox.com ([173.228.157.52]) by 9front; Thu Sep 28 02:53:55 -0400 2023 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 0BE1F2405F for <9front@9front.org>; Thu, 28 Sep 2023 02:53:53 -0400 (EDT) (envelope-from unobe@cpan.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=message-id :to:from:date:subject:mime-version:content-type :content-transfer-encoding; s=sasl; bh=8jsxNVu97GCmbp2OnqTUPj+Az vPXpmA0qfQc9noK2NA=; b=KPDEGZCc2AKAaaUiL369xrysVLbbkK0KoA9bWWjwr JDH1CLzAUsEXpwlIHCBHHBZr3j+NVpMJhdlEsl7HyTUqAMA2jQ54SpFok53/fARj 4ny5l6PFjZ/I0aAlyjvyGKe0xFifpws/FWDx7Uh3s5fOZWKwf4BSRX9ktfrmnUE6 QE= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 042022405E for <9front@9front.org>; Thu, 28 Sep 2023 02:53:53 -0400 (EDT) (envelope-from unobe@cpan.org) Received: from strider.localdomain (unknown [75.237.252.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 3141D2405D for <9front@9front.org>; Thu, 28 Sep 2023 02:53:49 -0400 (EDT) (envelope-from unobe@cpan.org) Message-ID: To: 9front@9front.org From: Romano Date: Thu, 28 Sep 2023 06:26:06 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: C6F53EAA-5DCB-11EE-BE97-F515D2CDFF5E-09620299!pb-smtp20.pobox.com List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: stateless out-scaling YAML STM-aware pipelining manager Subject: [9front] [PATCH 3/6] nusb/ptp: add mention to nusb man page and fix implementation per spec to start with transaction id 1, not 0. Reply-To: 9front@9front.org Precedence: bulk Apple iPhones can now be used to transfer images. There is still an issue with the iPhone permission, wherein an actor has to be pretty quick on the trigger to Allow the connection from the iPhone side, but that would require a pause somewhere in the handshake that I did not have time to look into further. This patch at least allows the connection to succeed when permitted. --- diff c9c5d6455a6502ffb0f5490d5602396852261f4c 755ac2c11ce134f76d83a2a42edb07a6304d1de8 --- a/sys/man/4/nusb +++ b/sys/man/4/nusb @@ -194,6 +194,10 @@ The .B ctl file supplies the device geometry and partitions when read. +.I Ptp +configures and exposes a camera's (and often a mobile +device's) storage to allow transferring data via the +Picture Transfer Protocol (PTP). .SS Ethernet .I Ether handles USB ethernet devices. The file system provided is --- a/sys/src/cmd/nusb/ptp/ptp.c +++ b/sys/src/cmd/nusb/ptp/ptp.c @@ -75,9 +75,8 @@ static int debug = 0; static ulong time0; -static int maxpacket = 64; -static int sessionId = 1; -static int transId = 1; +static int sessionId; +static int transId; static Node **nodes; static int nnodes; @@ -556,7 +555,7 @@ } /* - * another proc migh'v come in and done it for us, + * another proc might've come in and done it for us, * so check the cache again. */ if(y = cachednode(path, &f)) @@ -1048,6 +1047,7 @@ sendp(iochan, ioproc()); sessionId = getpid(); + transId = 0; if(ptprpc(nil, OpenSession, 1, sessionId) < 0) sysfatal("open session: %r");