This version is outdated by a newer approved version.DiffThis version (28 Apr 2017 15:50) is a draft.
Approvals: 0/1
The Previously approved version (28 Apr 2017 11:29) is available.Diff

This is an old revision of the document!

Controlling the transceiver and transferring data

PlutoSDR runs Linux. The device drivers allowing you to control the transceiver and capture samples are therefore part of to the Linux Industrial IO (IIO) framework. IIO is a kernel subsystem for analog to digital or digital to analog converters and related hardware. IIO communicates with user space via sysfs and a character devices. From a plain user interaction point of view this is quite intuitive, since everything is just a file. However when controlling the device from software, this can be quite painful, since you simple want to call a function or method, instead of doing string manipulation and file IO. LibIIO fills this gap, provides all sorts of device abstraction and handles all kind of IIO internals. LibIIO is cross platform and also provides different language bindings, so that you can control IIO devices from C, C++, C# or Python.

If you’re not familiar with IIO, please start reading here:

Controlling the transceiver

int main (int argc, char **argv)
	struct iio_context *ctx;
	struct iio_device *phy;
	ctx =  iio_create_context_from_uri("ip:");
	phy = iio_context_find_device(ctx, "ad9361-phy");
		iio_device_find_channel(phy, "altvoltage0", true),
		iio_device_find_channel(phy, "voltage0", false),
	return 0;

Receiving data

university/tools/pluto/controlling_the_transceiver_and_transferring_data.1493387419.txt.gz · Last modified: 28 Apr 2017 15:50 by Michael Hennerich