From nobody Wed Dec 21 08:55:36 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 ESMTP id 4NcS2q6Nj8z1G05K for ; Wed, 21 Dec 2022 08:55:47 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 4NcS2p2HPsz3J1g for ; Wed, 21 Dec 2022 08:55:46 +0000 (UTC) (envelope-from hps@selasky.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org; dmarc=none Received: from [10.36.2.69] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 95804260DD2; Wed, 21 Dec 2022 09:55:38 +0100 (CET) Message-ID: Date: Wed, 21 Dec 2022 09:55:36 +0100 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: USB logic analyzer problem Content-Language: en-US From: Hans Petter Selasky To: Milan Obuch , freebsd-usb@freebsd.org References: <20221221084423.71de3559@zeta.dino.sk> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-usb@freebsd.org]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_DKIM_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[selasky.org]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4NcS2p2HPsz3J1g X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 12/21/22 09:52, Hans Petter Selasky wrote: > On 12/21/22 08:44, Milan Obuch wrote: >> Hi, >> >> 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. >> >> Looking at sigrok wiki, both should work with fx2lafw driver, info at >> >> https://sigrok.org/wiki/AZDelivery_Logic_Analyzer/Info >> https://sigrok.org/wiki/Noname_LHT00SU1/Info >> >> 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 >> >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> sr: fx2lafw: resubmit_transfer: LIBUSB_ERROR_NO_DEVICE >> Acquisition took 0.07 s >> >> at best. So, data set is empty, nothing is captured. >> >> I am out of ideas. Has anybody any experience with this kind of devices? >> Any idea how to debug this issue? >> >> Regards, >> Milan >> > > Hi Milan, > > If you get a no device error on re-submit, the device has been > disconnected, but the software side has not yet done the same I believe. > Can you check that? > > --HPS > I.E. you need to regularly check that the device is connected, and close all USB handles when you see it is gone! --HPS