iio_reg(1)

πŸ’– iio_reg(1) β€” do a low level read or write to SPI or I2C register ✨

okay bestie so this is iio_reg, part of the LibIIO Utilities crew 🫢 she's a little utility that goes ✨deep✨ into your IIO device and pokes at the SPI or I2C registers. yeah. like that.


🌸 NAME 🌸

iio_reg β€” do a low level read or write to SPI or I2C register πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

iio_reg [ options ] <device> <register> [<value>]

like… that's it. that's the whole vibe. <device>, <register>, and maybe a <value> if you're feeling spicy πŸ”₯


πŸ¦‹ DESCRIPTION πŸ¦‹

so iio_reg is a utility for debugging local or remote IIO devices. and I need you to hear me on this one:

🚨 it should NOT be used by normal users. no cap. 🚨

it's normally used by driver developers during development, or by end users who are debugging a driver, or who are sending in a feature request. she's a developer tool, she's not for vibes-only usage, okay? πŸ™ˆ

what she does is give you a mechanism to read or write SPI or I2C registers for IIO devices. which is genuinely so useful when you're troubleshooting IIO devices and trying to understand how the Linux IIO subsystem is managing the device. it's giving "peek behind the curtain" energy πŸ‘‘


✨ OPTIONS ✨

  • -h, --help β€” tells iio_reg to display some help, and then quit. she says her piece and leaves. iconic behavior πŸ’…
  • -V, --version β€” prints the version information for this particular copy of iio_reg and the version of the libiio library it is using. super handy for knowing if the version of the library and iio_reg on your system are up to date πŸ—“οΈ and also super handy when you're reporting bugs πŸ›
  • -S, --scan [backends] β€” scan for available IIO contexts! πŸ¦‹ optional arg of specific backend(s): 'ip', 'usb' or 'ip:usb'. specific options for USB include Vendor ID, Product ID to limit scanning to specific devices: 'usb=0456,b673'. vid,pid are hexadecimal numbers (no prefix needed), "*" (match any for pid only) ⭐. if no argument is given, it checks all that are available.
  • -u, --uri β€” the Uniform Resource Identifier (uri) for connecting to devices. can be one of:
    • ip:[address] β€” network address, either numeric (192.168.0.1) or network hostname 🌐
    • ip: β€” blank, if compiled with zeroconf support, will find an IIO device on network ✨
    • usb:[device:port:instance] β€” normally returned from iio_reg -S πŸ”Œ
    • serial:[port],[baud],[settings] β€” which are controlled, and need to match the iiod (or tinyiiod) on the other end of the serial port. πŸ’œ
      • [port] is something like '/dev/ttyUSB0' on Linux, and 'COM4' on Windows.
      • [baud] is is normally one of 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200 [default], 128000 or 256000, but can vary system to system.
      • [settings] would normally be configured as '8n1' β€” this is controlled by:
        • data_bits: β€” (5, 6, 7, 8 [default], or 9)
        • parity_bits: β€” ('n' none [default], 'o' odd, 'e' even, 'm' mark, or 's' space)
        • stop_bits: β€” (1 [default, or 2)
        • flow_control: β€” ('0' none [default], 'x' Xon Xoff, 'r' RTSCTS, or 'd' DTRDSR)
    • local: β€” with no address part. 🏠

πŸ‘‘ RETURN VALUE πŸ‘‘

if the specified device is not found, a non-zero exit code is returned. so like… check that exit code, bestie. don't just assume it worked 😭


🌈 SEE ALSO 🌈

iio_attr(1), iio_info(1), iio_readdev(1), iio_reg(1), iio_writedev(1), libiio(3)

libiio home page: https://wiki.analog.com/resources/tools-software/linux-software/libiio

libiio code: https://github.com/analogdevicesinc/libiio

Doxygen for libiio https://analogdevicesinc.github.io/libiio/

(go read those. iykyk πŸ“šβœ¨)


πŸ’€ BUGS πŸ’€

all bugs are tracked at: https://github.com/analogdevicesinc/libiio/issues

(if you found one, go tell them!! they wanna know fr fr πŸ›πŸ«Ά)


and that's the whole page, bestie πŸŽ€ this was iio_reg(1) from the libiio-0.26 era β€” dated 06 February 2026, which is literally so future-coded of her. stay safe out there poking registers, no cap πŸ’œβœ¨

πŸ“¦ where this page comes from