Re: USB logic analyzer problem

From: Tomek CEDRO <tomek_at_cedro.info>
Date: Wed, 21 Dec 2022 10:29:02 UTC
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: <vendor 0x08a9 product 0x0014> at usbus0
> ugen0.y: <vendor 0x0925 product 0x3881> 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.

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?


> 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 <your_user_name_to_use_usb>

4. # service devfs restart

5. logout and login your local user to see if access right are correct now.

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info