Permissions for Serial Tap & I2C/SPI Tap on Linux

Symptoms

Starting the Serial Tap or I2C/SPI Tap plugin and pressing the Capture button yields:

Session started
Cannot start capture: Access is denied.

Details

The permission issues with USB devices is a common problem on Linux. By default, all non-standard devices can only be accessed under the root account. However, there is a way to change permissions based on the device class (e.g., by specifying VID/PID).

Solution

Most Linux distros nowadays run systemd which uses udev as the device manager. Whenever a new device arrival is detected, udev executes all applicable rules which are stored in .rule files under:

/etc/udev/rules.d/

Names of the files under /etc/udev/rules.d/ are normally prefixed by two decimal digits to explicitly specify the order in which rules are applied. In our case, there are no any particular requirements to the rule order; the only important thing is that no other file overwrites permissions for our devices.

In this folder, create a file called 50-ioninja.rules with the following contents:

# IO Ninja hardware taps

SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0e26", MODE="0666", SYMLINK+="ioninja-serial-tap"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0e27", MODE="0666", SYMLINK+="ioninja-i2c-spi-tap"

Re-plug the tap, and you shall be able to see the device /dev/ioninja-serial-tap with permissions 0666 (everyone is allowed).

Note

The SYMLINK part in the .rules file above is purely optional and can be omitted. It’s there just for ease of debugging – this way, you always can easily spot your tap inside the /dev/ directory.