3

I am trying to run sigrok with real HW. However, running pulseview, there is no real HW possible. I suspected that this was due to sigrok not having the privilege to access the HW, and so I ran it as root, and I was able to access the HW.

My question is: How do I run this without root? I assume I need to change the gid or uid of the device file to be able to access it. If so:

  • How do I find out the device file for the HW?
  • How to do this cleanly? .i.e. automate this when the HW is disconnected and reconnected.
  • Which gid? is there a convention?

In case it is relevant

  • Hantek 6022BL. Currently, operating in Logic Analyzer mode and is using the driver "Saleae Logic".
  • LTS 18.04
2
  • Can someone with sufficient reputation create tag "sigrok" and/or "pulseview" please?
    – aiao
    Apr 8, 2019 at 19:12
  • Find the device name with sudo lshw or sudo lsof, or journalctl --follow as you turn the device on. Then ls -l /dev/_device_. If the device premits "group" access, use adduser to add yourself to that group, and either logout/login or newgrp. Read man adduser;man newgrp
    – waltinator
    Apr 8, 2019 at 22:53

1 Answer 1

2

There is a topic on how to run PulseView without root privileges in the web manual: https://sigrok.org/doc/pulseview/0.4.1/manual.html

If you don’t install the PulseView distro packages (as is the case when using the AppImage or building from source), PulseView will not be able to access USB and serial port devices unless it’s run as root. Since programs shouldn’t be run as root unless absolutely necessary, we provide udev configuration files that allows PulseView access to those devices without being root. Here’s how you install them:

sudo bash
cd /etc/udev/rules.d/
wget https://sigrok.org/gitweb/?p=libsigrok.git;a=blob_plain;f=contrib/60-libsigrok.rules -O 60-libsigrok.rules
wget https://sigrok.org/gitweb/?p=libsigrok.git;a=blob_plain;f=contrib/61-libsigrok-plugdev.rules -O 61-libsigrok-plugdev.rules
wget https://sigrok.org/gitweb/?p=libsigrok.git;a=blob_plain;f=contrib/61-libsigrok-uaccess.rules -O 61-libsigrok-uaccess.rules
sudo udevadm control --reload-rules

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .