iio_readdev(1)
π iio_readdev β read buffers from an IIO device π
okay bestie, sit down, hydrate, because you're about to meet iio_readdev β your new fave little utility from the LibIIO Utilities family. she reads buffers off your IIO devices and yeets the results straight to standard out. main character energy, honestly. π
β¨ SYNOPSIS β¨
iio_readdev [ options ] [-n <hostname>] [-t <trigger>] [-T <timeout-ms>]
[-b <buffer-size>] [-s <samples>] <iio_device> [<channel> ...]
πΈ DESCRIPTION πΈ
iio_readdev β well, okay, the page literally says "iio_reg is a utility for reading buffers from connected IIO devices, and sending resutls to standard out." and we're not gonna gaslight you about it: yes, it says iio_reg (iconic slip β¨), and yes, it says resutls (love that for them π«Ά). What she means is: this is the utility for reading buffers from connected IIO devices and shipping the results to standard out. periodt.
π OPTIONS π
-h,--helpβ tellsiio_readdevto show you some help and then dip. bye bestie π-V,--versionβ prints the version info for this exact copy ofiio_readdev, and the version of thelibiiolibrary it's using. genuinely so useful: you can check whether the library andiio_readdevon your system are up to date, and it's also the move when you're reporting bugs. ngl, always check this first. π¦-S,--scan [backends]β scan for available IIO contexts. the optional arg lets you name 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,pidare hexadecimal numbers (no prefix needed), and"*"matches any β forpidonly. if you give no argument at all, it checks every backend that's available. π-t,--triggerβ use the specified trigger, if needed, on the specified channel.-b,--buffer-sizeβ size of the capture buffer. default is256.-s,--samplesβ number of samples (not bytes, bestie, samples) to capture.0= infinite. default is0.-T,--timeoutβ buffer timeout in milliseconds.0= no timeout. default is0.-u,--uriβ the Uniform Resource Identifier (uri) for connecting to devices. can be one of the following:ip:[address]β a 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 the network. π§usb:[device:port:instance]β normally this is what gets returned fromiio_readdev -S.serial:[port],[baud],[settings]β all of these are controlled, and they need to match theiiod(ortinyiiod) sitting on the other end of the serial port. π₯[port]is something like'/dev/ttyUSB0'on Linux, and'COM4'on Windows.[baud]is normally one of110,300,600,1200,2400,4800,9600,14400,19200,38400,57600,115200[default],128000or256000β but it can vary system to system.[settings]would normally be configured as'8n1'. this is controlled by:data_bits:β (5,6,7,8[default], or9)parity_bits:β ('n'none [default],'o'odd,'e'even,'m'mark, or's'space)stop_bits:β (1[default], or2)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. that's it, that's the whole vibe check. π
π¦ USAGE π¦
you use iio_readdev the same way you use many of the other libiio utilities. you specify an IIO device, and the specific channel to read. since this is a read, the channels must be input β no exceptions, no negotiating. π
if you don't provide a channel, iio_readdev will read from all input channels. and if you don't provide a device at all, she'll print you a few examples:
iio_readdev -a
Using auto-detected IIO context at URI "usb:3.10.5"
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage0
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage1
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage2
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage3
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc
so this next one captures 1024 samples of I and Q data from the USB-attached AD9361, and stores it (as raw binary) into the file samples.dat:
iio_readdev -a -s 1024 cf-ad9361-lpc voltage0 voltage1 > samples.dat
and then we plot the data with gnuplot. slay. πβ¨
gnuplot -e "set term png; set output 'sample.png'; plot 'sample.dat' binary format='%short%short' using 1 with lines, 'sample.dat' binary format='%short%short' using 2 with lines;"
β SEE ALSO β
iio_attr(1), iio_info(1), iio_readdev(1), iio_reg(1), iio_writedev(1), libiio(3)
(yes, iio_readdev(1) is listed in her own SEE ALSO. she's her own reference, we respect the self-love π
)
- 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
not me telling you to file your bugs where they belong, bestie. if something's cursed, that's the place. π
and that's the whole page, you ate it up fr fr. this was libiio-0.26, dated 06 February 2026, and honestly? iconic. go read some buffers now π β¨ π
π¦ where this page comes from
- ubuntu resolute: libiio-utils 0.26-2build2 Β· LGPL-2.1-or-later
- ubuntu stonking: libiio-utils 0.26-2build2 Β· LGPL-2.1-or-later
- Copyright (c) 2018-2020 Robin Getz
- Copyright (c) 2018-2020 Analog Devices Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms