Post Go back to editing

simple ad9361 libiio example for receive only

Category: Software
Product Number: adalm pluto

Hi all,

so im trying to create a simple code for receiving data remotely via usb from ADALM pluto using libiio in C.  There's an example here in this AD wiki which essentially shows how to do it, & as shown by the author its an incomplete example.  https://wiki.analog.com/university/tools/pluto/controlling_the_transceiver_and_transferring_data

can anyone give me guidance on how to start off correctly with a similar code snippet and what the code in the link indeed is missing???

Much appreciation,

Abdalla

  • Hello, in the provided example you have the i and q variables that contain the data from the device, if you want to use them you would have to add your code for processing the examples at " /* Process here */ " in the Receiving data example.
    To obtain the iio context needed you can use the code bellow , you can also connect via USB by replacing the uri parameter with  your USB specific port (ex : "usb:2.9.5" instead of "ip:192.168.2.1" )

    struct iio_context *ctx;
     
    ctx = iio_create_context_from_uri("ip:192.168.2.1");
     
  • Worked finally like a gem!!

    Thanks,

    for some reason using ip address didnt work.  I had to change to usb