From owner-freebsd-usb@FreeBSD.ORG Mon Oct 29 15:06:51 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CBE334B5 for ; Mon, 29 Oct 2012 15:06:51 +0000 (UTC) (envelope-from toshi@ruby.ocn.ne.jp) Received: from msgw001-01.ocn.ad.jp (msgw001-01.ocn.ad.jp [180.37.203.70]) by mx1.freebsd.org (Postfix) with ESMTP id 771DB8FC12 for ; Mon, 29 Oct 2012 15:06:51 +0000 (UTC) Received: from localhost (p16200-ipngn100102sizuokaden.shizuoka.ocn.ne.jp [180.51.199.200]) by msgw001-01.ocn.ad.jp (Postfix) with ESMTP id B68C544DDD2; Tue, 30 Oct 2012 00:06:49 +0900 (JST) Date: Tue, 30 Oct 2012 00:06:48 +0900 (JST) Message-Id: <20121030.000648.193690728.toshi@ruby.ocn.ne.jp> To: freebsd-usb@freebsd.org Subject: Re: isochronous transfer for UVC camera From: SAITOU Toshihide In-Reply-To: <201210291436.08940.hselasky@c2i.net> References: <20121029.215434.122618874.toshi@ruby.ocn.ne.jp> <201210291436.08940.hselasky@c2i.net> X-GPG-fingerprint: 34B3 0B6A 8520 F5B0 EBC7 69F6 C055 9F8A 0D49 F8FC X-Mailer: Mew version 6.2.51 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: Mon, 29 Oct 2012 15:06:51 -0000 In message: <201210291436.08940.hselasky@c2i.net> Hans Petter Selasky writes: > On Monday 29 October 2012 13:54:34 SAITOU Toshihide wrote: >> #define PKT_LEN 0x1400 > > The packet length is not this value I think. > > The 0x1000 is part of the packet multiplier for High-Speed USB's > wMaxPacketSize. > > It is (1+2) * 0x400. Try that and see what happens. Thank you for your quick response. I can't use the FreeBSD now so I will try this tomorrow. But Mac OS X 10.6.8 with libus 1.0.9, callback is not invoked too with some combination of the value below: #define PKT_LEN 0x400 #define PKTS_PER_XFER 8 $ ./ex10 libusb: 0.000000 info [darwin_open] device open for access libusb: 0.285678 info [darwin_async_io_callback] an async io operation has completed libusb: 0.286030 info [op_handle_events] checking fd 4 with revents = 0 libusb: 0.286187 info [op_handle_events] checking fd 6 with revents = 1 libusb: 0.286343 info [darwin_handle_callback] handling control completion with kernel status 0 1 0 1 1 40 4b 4c 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 libusb: 0.287708 info [darwin_async_io_callback] an async io operation has completed libusb: 0.287751 info [op_handle_events] checking fd 4 with revents = 0 libusb: 0.287761 info [op_handle_events] checking fd 6 with revents = 1 libusb: 0.287775 info [darwin_handle_callback] handling control completion with kernel status 0 1 0 1 1 d0 12 13 0 0 0 0 0 0 0 0 0 0 0 0 60 9 0 0 c 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 libusb: 0.288714 info [darwin_async_io_callback] an async io operation has completed libusb: 0.288770 info [op_handle_events] checking fd 4 with revents = 0 libusb: 0.288781 info [op_handle_events] checking fd 6 with revents = 1 libusb: 0.288799 info [darwin_handle_callback] handling control completion with kernel status 0 1 0 1 1 d0 12 13 0 0 0 0 0 0 0 0 0 0 0 0 60 9 0 0 c 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 libusb: 0.289960 info [get_endpoints] building table of endpoints. libusb: 0.290151 info [darwin_claim_interface] interface opened libusb: 0.292436 info [get_endpoints] building table of endpoints. libusb: 0.292459 info [get_endpoints] interface: 1 pipe 1: dir: 1 number: 2 libusb: 0.292478 info [ep_to_pipeRef] converting ep address 0x82 to pipeRef and interface libusb: 0.292484 info [ep_to_pipeRef] pipe 1 on interface 1 matches libusb: 0.297929 info [darwin_async_io_callback] an async io operation has completed libusb: 30.289159 error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know libusb: 30.289196 error [do_close] A cancellation hasn't even been scheduled on the transfer for which the device is closing libusb: 30.290970 info [event_thread_main] thread exiting --- SAITOU Toshihide