First-time setup on Linux (binary distribution)
================================================

This application talks to the IODD over the SCSI generic device nodes (/dev/sg*). On Linux, if your user does not have permission to open those nodes (for example errno 13, EACCES), the firmware tool may not work.

Do either option below, or both. After a one-time setup, run the program as a normal user.


Option A: Add your user to the disk group
-----------------------------------------

1) Run:

   sudo usermod -aG disk "$USER"

2) Log out and log back in, or fully restart the session, so the new group membership applies.


Option B: Install the udev rule
--------------------------------

The archive includes udev/99-iodd-sg.rules

1) Go to the folder where you extracted the archive, then copy the rule:

   cd /path/to/extracted/folder
   sudo cp udev/99-iodd-sg.rules /etc/udev/rules.d/

   Replace /path/to/extracted/folder with the actual path.

2) Reload udev rules and re-trigger device events:

   sudo udevadm control --reload-rules
   sudo udevadm trigger

3) Unplug the IODD USB device and plug it back in so the rule applies to the sg node.

What the rule does (summary)
----------------------------

- Matches scsi_generic devices with USB vendor 04c5 and product 2028 (IODD).
- Sets GROUP=disk, MODE=0660 on the corresponding /dev/sg* node, and adds uaccess so the logged-in desktop user often gets access on systemd-based setups.


Running the program
-------------------

After setup, run as a normal user:

   cd /path/to/extracted/folder
   chmod +x ./iodd_firm_upd
   ./iodd_firm_upd

Use chmod only if the file is not executable.

The release binary is named: iodd_firm_upd

The sudo commands in Option A and B are only for one-time system configuration (installing the rule or changing group membership). You do not need to run the shipped program as root every time.
