From owner-freebsd-usb@freebsd.org Thu Nov 26 14:13:59 2020 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F5484ACEF4 for ; Thu, 26 Nov 2020 14:13:59 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4ChfrR15wGz4X67 for ; Thu, 26 Nov 2020 14:13:59 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: by mailman.nyi.freebsd.org (Postfix) id 25D394AD3C2; Thu, 26 Nov 2020 14:13:59 +0000 (UTC) Delivered-To: usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2597A4AD073 for ; Thu, 26 Nov 2020 14:13:59 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: from smtp2.servers.tyknet.dk (smtp2.servers.tyknet.dk [89.233.43.78]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ChfrQ74syz4XSN for ; Thu, 26 Nov 2020 14:13:58 +0000 (UTC) (envelope-from thomas@gibfest.dk) Subject: Re: webcamd, usb and two webcams - only one works DKIM-Filter: OpenDKIM Filter v2.10.3 smtp2.servers.tyknet.dk 56150D3D To: Hans Petter Selasky Cc: usb@freebsd.org References: <9a382539-c90d-91b9-bfac-f36c0f19d3f7@selasky.org> <723be24d-b2fe-85df-4961-5483004050e8@gibfest.dk> From: Thomas Steen Rasmussen Message-ID: Date: Thu, 26 Nov 2020 15:13:49 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4ChfrQ74syz4XSN X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2020 14:13:59 -0000 On 11/26/20 2:49 PM, Hans Petter Selasky wrote: > On 11/26/20 2:34 PM, Thomas Steen Rasmussen wrote: >> >> On 11/26/20 1:18 PM, Hans Petter Selasky wrote: >>> >>> Hi Thomas, >>> >>> Try setting the resolution or framerate down, because high resolution >>> webcams need a lot of USB bandwidth! >> > > Hi, Hi :) > > Try "vga" instead of "xga". > I tried vga but it did not make a difference, it still says 640*480 and only one camera works. I removed the external USB hub (which is externally powered) from the picture and plugged both cameras directly into the APU for now, to eliminate some potential sources of issues. The issue still remains. Using usbdump I was able to see the USB back-and-forth when taking a snapshot with pwcview with the working camera. About maybe 100 lines or so, no errors. Then I tried the other camera where pwcview never returns, and it looks similar at first but then gets stuck in a loop of: ============================================= 14:05:25.408143 usbus0.3 SUBM-ISOC-EP=00000084,SPD=HIGH,NFR=128,SLEN=0,IVAL=0 14:05:25.654017 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:25.654030 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:25.654220 usbus0.3 SUBM-ISOC-EP=00000084,SPD=HIGH,NFR=128,SLEN=0,IVAL=0 14:05:25.900003 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:25.900012 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:25.900141 usbus0.3 SUBM-ISOC-EP=00000084,SPD=HIGH,NFR=128,SLEN=0,IVAL=0 14:05:26.146015 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:26.146035 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:26.146244 usbus0.3 SUBM-ISOC-EP=00000084,SPD=HIGH,NFR=128,SLEN=0,IVAL=0 14:05:26.392001 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:26.392017 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:26.392229 usbus0.3 SUBM-ISOC-EP=00000084,SPD=HIGH,NFR=128,SLEN=0,IVAL=0 ^C14:05:26.637926 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:26.637939 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:26.638104 usbus0.3 SUBM-ISOC-EP=00000084,SPD=HIGH,NFR=128,SLEN=0,IVAL=0 14:05:26.883934 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:26.883959 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:26.884114 usbus0.3 SUBM-ISOC-EP=00000084,SPD=HIGH,NFR=128,SLEN=0,IVAL=0 14:05:27.129974 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:27.129984 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:27.130124 usbus0.3 SUBM-ISOC-EP=00000084,SPD=HIGH,NFR=128,SLEN=0,IVAL=0 14:05:27.375997 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:27.376006 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:27.376182 usbus0.3 SUBM-ISOC-EP=00000084,SPD=HIGH,NFR=128,SLEN=0,IVAL=0 14:05:27.621937 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:27.621950 usbus0.3 DONE-ISOC-EP=00000084,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=TIMEOUT 14:05:27.622184 usbus0.3 SUBM-ISOC-EP=00000084,SPD=HIGH,NFR=128,SLEN=0,IVAL=0 210 packets captured 210 packets received by filter 0 packets dropped by kernel $ ============================================= Note that usbdump is completely quiet when I don't run pwcview on either camera. If the problem was that the first webcam sends too much data for the second webcam to work, wouldn't usbdump show that? This makes me think the problem is elsewhere! > > You could try to run webcamd in the foreground. It is also possible to > enable debugging when you build webcamd from ports. Also, usbdump, can > dump the traffic of these devices so that you see exactly what is going on. This is devinfo output with the two webcams plugged directly into the USB plugs on the APU3: xhci0 usbus0 uhub1 uaudio0 pcm0 uaudio1 pcm1 Where "uhub1" is uhub1: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 > > Can you show what usbconfig tell about these two devices when they are > connected? I sent the output of dump_all_desc for one of them in the initial email. I can send both or other output if needed? This is the brief output for both: =========================================== $ sudo usbconfig -d ugen0.3 dump_device_desc ugen0.3: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x00ef bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x1224 idProduct = 0x2a25 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0001 $ sudo usbconfig -d ugen0.2 dump_device_desc ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x00ef bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x1224 idProduct = 0x2a25 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0001 $ =========================================== > Are you running -stable ? > Yes, FreeBSD 12.2-STABLE r367109 GENERIC amd64. /Thomas