From nobody Wed Dec 21 12:09:50 2022 X-Original-To: freebsd-usb@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with UTF8SMTP id 4NcXLp2CX1z1Ghgj for ; Wed, 21 Dec 2022 12:09:54 +0000 (UTC) (envelope-from freebsd-usb@dino.sk) Received: from cm0.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (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 UTF8SMTPS id 4NcXLp0Th8z3yfB for ; Wed, 21 Dec 2022 12:09:53 +0000 (UTC) (envelope-from freebsd-usb@dino.sk) Authentication-Results: mx1.freebsd.org; none Received: from zeta.dino.sk ([84.245.95.254]) (AUTH: LOGIN milan, TLS: TLSv1.3,256bits,TLS_AES_256_GCM_SHA384) by cm0.netlabit.sk with ESMTPSA id 00000000029B6AD2.0000000063A2F78F.00009076; Wed, 21 Dec 2022 13:09:51 +0100 Date: Wed, 21 Dec 2022 13:09:50 +0100 From: Milan Obuch To: freebsd-usb@freebsd.org Cc: Tomek CEDRO , Hans HPS Petter Selasky Subject: Re: USB logic analyzer problem Message-ID: <20221221130950.64398aac@zeta.dino.sk> In-Reply-To: References: <20221221084423.71de3559@zeta.dino.sk> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; amd64-portbld-freebsd13.1) List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4NcXLp0Th8z3yfB X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:5578, ipnet:84.245.64.0/18, country:SK] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Wed, 21 Dec 2022 12:07:07 +0100 I wrote: > On Wed, 21 Dec 2022 11:49:33 +0100 > Tomek CEDRO wrote: > > > On Wed, Dec 21, 2022 at 11:29 AM Tomek CEDRO wrote: > > > 1. # vim /etc/devfs.rules: > > > [localrules=10] > > > add path 'ugen*' mode 0660 group operator > > > add path 'usb/*' mode 0660 group operator > > > add path 'usb' mode 0770 group operator > > > > > > 2. # vim /etc/rc.conf: > > > devfs_system_ruleset="localrules" > > > > > > 3. # pw groupmod operator -m > > > > > > 4. # service devfs restart > > > > > > 5. logout and login your local user to see if access right are > > > correct now. > > > > With the above you should have (as my example Saleae logical > > analyzer): > > > > # ls -al /dev/ugen0.11 > > lrw-rw---- 1 root operator 10 21 gru 11:40 /dev/ugen0.11 -> > > usb/0.11.0 > > > > # usbconfig -d 0.11 dump_all_desc > > ugen0.11: at usbus0, cfg=0 md=HOST spd=HIGH > > (480Mbps) pwr=ON (100mA) > > > > bLength = 0x0012 > > bDescriptorType = 0x0001 > > bcdUSB = 0x0200 > > bDeviceClass = 0x00ff > > bDeviceSubClass = 0x00ff > > bDeviceProtocol = 0x00ff > > bMaxPacketSize0 = 0x0040 > > idVendor = 0x0925 > > idProduct = 0x3881 > > bcdDevice = 0x0001 > > iManufacturer = 0x0001 > > iProduct = 0x0002 > > iSerialNumber = 0x0003 > > bNumConfigurations = 0x0001 > > > > Configuration index 0 > > > > bLength = 0x0009 > > bDescriptorType = 0x0002 > > wTotalLength = 0x0019 > > bNumInterfaces = 0x0001 > > bConfigurationValue = 0x0001 > > iConfiguration = 0x0000 > > bmAttributes = 0x0080 > > bMaxPower = 0x0032 > > > > Interface 0 > > bLength = 0x0009 > > bDescriptorType = 0x0004 > > bInterfaceNumber = 0x0000 > > bAlternateSetting = 0x0000 > > bNumEndpoints = 0x0001 > > bInterfaceClass = 0x00ff > > bInterfaceSubClass = 0x00ff > > bInterfaceProtocol = 0x00ff > > iInterface = 0x0000 > > > > Endpoint 0 > > bLength = 0x0007 > > bDescriptorType = 0x0005 > > bEndpointAddress = 0x0082 > > bmAttributes = 0x0002 > > wMaxPacketSize = 0x0200 > > bInterval = 0x0000 > > bRefresh = 0x0000 > > bSynchAddress = 0x0000 > > I have exactly the same output, just one difference - 'wMaxPacketSize > = 0x0040'. Everything else matches. Maybe you have the same device > (or a clone, Saleae analyzer looks like being cloned a lot). > With permissions corrected (I did it slightly different way originally, so it did not work correctly) this difference went away. Also PulseView now works as expected. I checked the another device i've got, descriptors dumped are ugen0.6: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x00ff bDeviceSubClass = 0x00ff bDeviceProtocol = 0x00ff bMaxPacketSize0 = 0x0040 idVendor = 0x08a9 idProduct = 0x0014 bcdDevice = 0x0001 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0003 bNumConfigurations = 0x0001 Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0019 bNumInterfaces = 0x0001 bConfigurationValue = 0x0001 iConfiguration = 0x0000 bmAttributes = 0x0080 bMaxPower = 0x0032 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x00ff bInterfaceSubClass = 0x00ff bInterfaceProtocol = 0x00ff iInterface = 0x0000 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0082 bmAttributes = 0x0002 wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Almost identical, just different vendor, product, serial. This one has one additional analog channel (two, actually, hardware wise, just current firmware does not work with them both). Thanks for help. Now I need to play a bit with it to know how one works with it :) Regards, Milan