iio_attr(1)

✨ iio_attr(1) ✨ β€” the LibIIO Utilities page, but make it make sense πŸ’…

okay bestie, gather round 🫢 this is iio_attr, one of the LibIIO Utilities, and she's lowkey the friend who will tell you everything about your IIO devices and also let you poke at them. no cap.

πŸ¦‹ SYNOPSIS πŸ¦‹

iio_attr [ options ] -d [device] [attr] [value]
iio_attr [ options ] -c [device] [channel] [attr] [value]
iio_attr [ options ] -D [device] [attr] [value]
iio_attr [ options ] -C [attr]
iio_attr -S <arg>
iio_attr -h

🌸 DESCRIPTION 🌸

so iio_attr is this utility that shows you info about your IIO devices β€” local ones, remote ones, all of them, she's not picky πŸ’–

and here's the cute part: if you also hand her an optional value, she will attempt to write that new value into the attribute. like, she'll try. she's giving main character energy ✨


πŸ‘‘ COMMANDS πŸ‘‘

iio_attr has a few main options, and these are the ones that decide what the app is actually doing. vibe check first, then the rest follows fr fr:

  • -d, --device-attr β€” Read and Write IIO device attributes πŸŽ€
  • -c, --channel-attr β€” Read and Write IIO channel attributes πŸ¦‹
  • -B, --buffer-attr β€” Read and Write IIO Buffer attributes 🌈
  • -C, --context-attr β€” Read and Write IIO Context attributes πŸ’œ
  • -D, --debug-attr β€” Read and Write IIO Debug attributes πŸ“
  • -h, --help β€” tells iio_attr to show you some help, and then she dips. that's it, that's the whole job ✨
  • -V, --version β€” prints the version info for this copy of iio_attr plus the version of the libiio library she's using. super useful for knowing whether your library and your iio_attr are actually up to date, and honestly iconic when you're filing a bug report 😭
  • -S, --scan [backends] β€” scan for available IIO contexts. optional arg for specific backend(s): 'ip', 'usb' or 'ip:usb'. specific options for USB include Vendor ID and Product ID, so you can limit scanning to specific devices like 'usb=0456,b673'. vid and pid are hexadecimal numbers (no prefix needed), and "*" matches any β€” that's pid only, bestie. if you give no argument at all, she checks all that are available πŸ”₯

πŸ’– OPTIONS πŸ’–

  • -u, --uri β€” the Uniform Resource Identifier (uri) for connecting to devices. can be any one of these:
    • ip:[address] network address, either numeric (192.168.0.1) or a network hostname
    • ip: blank! if it was compiled with zeroconf support, this will find an IIO device on network ✨
    • usb:[device:port:instance] normally returned from iio_attr -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.
  • -i, --input-channel β€” filters channels by input channels only 🫢
  • -o, --output-channel β€” filters channels by output channels only 🌸
  • -s, --scan-channel β€” filters channels by scan channels only ⭐
  • -I, --ignore-case β€” when pattern matching devices, channels or attributes, ignore case. lowercase girlies stay winning πŸ’…
  • -g, --generate-code <arg> β€” generate small C or python snippets that emulate what you're doing on the command line. the argument is a file name, like 'foo.c' or 'foo.py' πŸŽ€

πŸ’€ RETURN VALUE πŸ’€

if the specified device is not found, a non-zero exit code is returned. periodt. no device, no zero, we don't make the rules 😀


πŸ”— SEE ALSO πŸ”—

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/


πŸ› BUGS πŸ›

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

ngl if you found a bug, drop it there, they're tracking everything πŸ™ˆ

okay that's the whole page, you ate that bestie πŸ’… this was libiio-0.26, dated 06 February 2026 β€” consider this your cute little sign-off, mwah πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from