isaset Command in Linux



The isaset command in Linux sets registers of ISA devices. The ISA (Industry Standard Architecture) devices are hardware components that connect to a computer via the ISA bus.

The ISA bus is an expansion bus that connects network cards, graphics cards, sound cards, or modems to the motherboard. The isaset command reads and modifies the ISA registers to configure or control the behavior of hardware devices connected to the ISA bus.

Table of Contents

Here is a comprehensive guide to the options available with the isaset command −

Note − The ISA devices are largely obsolete today and replaced by PCI, AGP, and eventually PCI Express (PCIe) standards, which offer faster speeds, more bandwidth, and better plug-and-play support. However, the isaset command can still be useful for legacy device users.

Prerequisites for isaset Command

The isaset command depends upon the lm-sensors package on Linux. To install lm-sensors on Ubuntu, Kali Linux, Debian, and other Debian-based distributions, use the following command −

sudo apt install lm-sensors

To install the lm-sensors package on Arch Linux, use the following command −

sudo pacman -S lm_sensors

To install this package on CentOS, use the command given below −

sudo yum install lm_sensors

To install it on Fedora, use the command given below −

sudo dnf install lm_sensors

To verify, whether the isaset command is installed or not, check its binary path using the command given below −

which isaset
isaset Command in Linux1

Syntax of isaset Command

There are two types of isaset command syntax −

  • To Set Registers of I2C-like Devices
  • To Set Registers Flat Address Space Devices

Syntax to set the register of a device with an I2C-like interface is as follows −

isaset [options] addrreg datareg address value [mask]

The [options] field is used to specify the various options.

  • addrreg − The address register where the target register's address is set in hexadecimal format
  • datareg − The data register where the actual data value is read from or written to
  • address − The address of the specific register within the device to access
  • value − The value to write to the specified register
  • [mask] − A bitmask specifying which bits to modify, useful for updating specific bits without affecting others (optional)

Syntax to set the register of the device with Flat Address Space is as follows −

isaset [options] address value [mask]

The [options] field is used to specify the various options.

  • address − The address of the register where data is written
  • value − The value to be written to the specified address
  • [mask] − A bitmask specifying which bits of the register to update (optional)

isaset Command Options

The options of the isaset command are listed below −

Options Description
-f Enables flat address space mode
-y Disables interactive mode, performing the operation directly without confirmation (it can be useful in scripts)
-W Performs 16-bit write
-L Performs 32-bit write

Examples of isaset Command in Linux

This section demonstrates the usage of the isaset command in Linux with examples −

Note − Accessing ISA data space can be extremely risky. Running the isaset command with random parameters may lead to system crashes, data loss, and other serious issues. Be extremely careful when using this command.

I2C-like Access Mode

In this mode, four parameters are required: the address register (addrreg), data register (datareg), target register (address), and value. For example, to write data to specific registers for I2C-like interface devices, use the isaset command in the following way −

sudo isaset 0x295 0x296 0x05 0x1A

The above command writes the value 0x1A to the register at offset 0x05 within this chip. Here, the 0x295 is address register (addrreg), 0x296 is the data register (datareg) and 0x05 is the target register (address).

If only specific bits need to be written, then a bitmask can be used. For example −

sudo isaset 0x295 0x296 0x05 0x1A 0x0F

In the above command, 0x0F (0000 1111) is the mask, which means only the lowest 4 bits (1111) will be modified in the target register, while the upper 4 bits (0000) remain unaffected.

Note − Both addrreg and datareg should fall within a hexadecimal range of 0x0000 to 0x3FFF.

For Super-I/O chips, the address register is generally located at 0x2E, while the data register is found at 0x2F.

Flat Address Space Mode

In flat address space mode, the isaset requires two parameters: the address and the value. The address is the ISA address of the specific register to be written to, represented as a hexadecimal value between 0x0000 and 0xFFFF.

The full address can be calculated using the base address + offset formula. If the device base address is 0x0300 and you want to write the value 0x1A to the register at an offset of 0x05, the full address will be 0x0300 + 0x05 = 0x0305.

sudo isaset -f 0x0305 0x1A

The above command writes 0x1A to the address 0x0305.

Similarly, a bitmask can also be used −

sudo isaset -f 0x0305 0x1A 0x0F

Displaying Help

To display quick help about the isaset command, execute the command without any option −

isaset
isaset Command in Linux2

Conclusion

The isaset command in Linux configures registers of ISA devices connected via the ISA bus. To use it, the lm-sensors package must be installed. It operates in two modes: I2C-like devices and flat address space devices. Key options include -f for flat address space mode and -y to disable interactive confirmation.

Note that the isaset command is obsolete in favor of PCI and PCIe standards; however, ISA devices can still be found in specialized systems.

In this tutorial, we explained the isaset command, its installation, syntax, options, and usage in Linux with examples.

Advertisements