From owner-freebsd-usb@FreeBSD.ORG Tue Oct 30 12:39:30 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 CDDB78A8 for ; Tue, 30 Oct 2012 12:39:30 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id 3EF568FC14 for ; Tue, 30 Oct 2012 12:39:29 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 338717413; Tue, 30 Oct 2012 13:39:21 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Subject: Re: isochronous transfer for UVC camera Date: Tue, 30 Oct 2012 13:41:00 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: <20121029.215434.122618874.toshi@ruby.ocn.ne.jp> <20121030.000648.193690728.toshi@ruby.ocn.ne.jp> <20121030.202247.226801724.toshi@ruby.ocn.ne.jp> In-Reply-To: <20121030.202247.226801724.toshi@ruby.ocn.ne.jp> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210301341.00350.hselasky@c2i.net> 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: Tue, 30 Oct 2012 12:39:31 -0000 On Tuesday 30 October 2012 12:22:47 SAITOU Toshihide wrote: > In message: <20121030.000648.193690728.toshi@ruby.ocn.ne.jp> > > SAITOU Toshihide writes: > > 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: > > Hi, > > #define PKT_LEN 0x400 > > #define PKTS_PER_XFER 8 > You can compare with output when running webcamd. Make sure webcamd is not running when you start your application! > It dose not affect on the FreeBSD. PKT_LEN should be 0xC00 > > >> Also there is usbdump -i usbusX -f Y -s 65536 -vvv, which will show the > >> actual traffic. > > ! This is very useful. > > $ usbdump -i usbus2 -f 4.0 -s 65536 -vvv (unit 4) To get both READ and WRITE control requests, you should do: usbdump -i usbus2 -f 4.0 -f 4.128 -s 65536 -vvv > $ usbdump -i usbus2 -f 4.130 -s 65536 -vvv (unit 4, endpoint 0x82) > > I have compared with other application (pwcview). > > There are a lot of VS_PROBE_CONTROL transfer than expected. But it may > not be a problem because I have tried these transfer reproduced from > dump data. The problem I noticed is that the libusb_claim_interface of > my code is not logged. Is this function really implemented? The claim interface is almost like a NOP under FreeBSD. > > libusb_set_interface_alt_setting(handle, 1, 1); > libusb_control_transfer(handle, 0x01, 0x0b, 0x0100, 0x0100, NULL, 0, > TIMEOUT); --HPS