iio_writedev(1)
π iio_writedev β from the LibIIO Utilities girlies π
okay so bestie, welcome to iio_writedev(1), one of the LibIIO Utilities. if you're here it's because you wanna write buffers onto an IIO device, and I am so proud of you for reading the manual first. main character behavior fr fr. π«Ά
β¨ NAME β¨
iio_writedev β write buffers on an IIO device
πΈ SYNOPSIS πΈ
iio_writedev [ options ] [-t <trigger>] [-T <timeout-ms>] [-b <buffer-
size>] [-s <samples>] <iio_device> [<channel> ...]
π¦ DESCRIPTION π¦
iio_reg is a utility for writing buffers from connected IIO devices.
not me clocking that the description literally saysiio_regand notiio_writedevπ I am NOT editing the sacred text, I just report what the page says. copy it, don't @ me.
π OPTIONS π
-h,--helpβ tellsiio_writedevto show you some help, and then dip. so valid of it.-V,--versionβ prints the version info for this exact copy ofiio_writedevand the version of the libiio library it's using. lowkey iconic for checking whether your library and youriio_writedevare both up to date, and highkey essential when you're filing a bug report. π-S,--scanβ scan for available IIO contexts. takes an optional arg for 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,pidare hexadecimal numbers (no prefix needed), and"*"(match any for pid only). if no argument is given, it checks all that are 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.-c,--cyclicβ use cyclic buffer mode. π-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 hostnameip:β blank. if compiled with zeroconf support, will find an IIO device on networkusb:[device:port:instance]β normally returned fromiio_writedev -Sserial:[port],[baud],[settings]β which are controlled, and need to match theiiod(ortinyiiod) 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 of110,300,600,1200,2400,4800,9600,14400,19200,38400,57600,115200[default],128000or256000, but 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)
- data_bits: (
local:β with no address part. π
π₯ RETURN VALUE π₯
if the specified device is not found, a non-zero exit code is returned. simple as that, no cap.
π USAGE π
you use iio_writedev in the same way you use many of the other libiio utilities. you should specify a IIO device, and the specific channel to write. since this is a write, channels must be output β that part matters bestie, don't fight it. if no channel is provided, iio_writedev will write to all output channels. and if no device is provided, iio_writedev will print a few examples:
iio_writedev -a
Using auto-detected IIO context at URI "usb:3.10.5"
Example : iio_writedev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-dds-core-lpc voltage0
Example : iio_writedev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-dds-core-lpc voltage1
Example : iio_writedev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-dds-core-lpc voltage2
Example : iio_writedev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-dds-core-lpc voltage3
Example : iio_writedev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-dds-core-lpc
this sends 1024 samples of I and Q data to the USB attached AD9361. data is taking from standard in, in a binary format.
iio_writedev -a -s 1024 cf-ad9361-dds-core-lpc voltage0 voltage1 < ./samples.dat
and yes, piping your little binary blob straight into stdin like that is chef's kiss. π
β 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
if you made it to the end, you're literally the strongest soldier I know π this was libiio-0.26, dated 06 February 2026, straight out of the LibIIO Utilities fam. go write some buffers, bestie. slay. οΏ½οΏ½π¦π
π¦ 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