From nobody Wed Dec 21 11:01:41 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 4NcVr90tJgz1GHfJ for ; Wed, 21 Dec 2022 11:01:45 +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 4NcVr86RGbz3nWq for ; Wed, 21 Dec 2022 11:01:44 +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 00000000029B6A95.0000000063A2E797.00008307; Wed, 21 Dec 2022 12:01:43 +0100 Date: Wed, 21 Dec 2022 12:01:41 +0100 From: Milan Obuch To: freebsd-usb@freebsd.org Cc: Tomek CEDRO , Hans HPS Petter Selasky Subject: Re: USB logic analyzer problem Message-ID: <20221221120141.0893e449@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: 4NcVr86RGbz3nWq 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 11:29:02 +0100 Tomek CEDRO wrote: > On Wed, Dec 21, 2022 at 8:44 AM Milan Obuch wrote: > > recently I've got two simple USB logic analyzers (one with analog > > channel as well), and I am trying to get them working under FreeBSD. > > They are > > > > ugen0.x: at usbus0 > > ugen0.y: at usbus0 > > > > as seen on plugging in USB port (x, y varies on attempts). These > > should be handled by sigrok and pulseview (science/sigrok* and > > science/pulseview ports). While building and installing ports was > > relatively easy, I did not managed them to work correctly. > > 1. Do you perform firmware update before using the device? If so > device may reboot and change descriptors / reenumerate after firmware > update, please verify the parameters before and after the update. Well, I don't do anything specifically, but I am sure pulseview (using some of sigrok* modules) does. I just don't know details :) > 2. # usbconfig list; note your device ugenX.Y; # usbconfig -d X.Y > dump_all_desc; see device configurations interfaces and serial number. > Maybe you will be able to provide serial number to the software as the > analyzer id? Later... > > At first, I thought problem is access rights, as all devices are > > created with mode crw-------, uid root. I did not succeed to change > > this, trying devd and/or devfs, even manually chmod. As a simple > > test, I started pulseview as root, still, no success - I can see my > > devices listed and selectable for data acquisition, but trying to > > get data yields > > > 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. I think I did it already, I am just going to repeat and verify. This takes some time (logout on my main workstation is no go at the moment, as closing everything is required before... but I have another box for test, just some time is required to end all running there), not too long, hopefully. Regards, Milan