I have a picozed SDR board with LINUX from AD running on it. One of the AD9361 is connected and running as well. I am able to run the oscilloscope application (no loopback) and ad9361_iiostream.c application to send data and receive it from AD9361 (loopback). For that we put AD9361 in digital loopback mode using echo 0x1 > /sys/kernel/debug/iio/iio\:device1/loopback.
AD9361 has 2 channels (2 RX and 2 TX). Our goal is to have 2 programs running on ARM exchanging information via the FPGA by putting the 2 channels in loopback. As both the channels are in loopback , the data doesn't go into the air but is routed to the other program.
Using ad9361_iiostream.c as example we created 2 programs. One program creates RX device and buffer for the device and sends data on RX0_i and RX0_q channels. Another program creates TX device and buffer, and receives data on TX0_i and TX0_q channels. The channel 0 is in loopback , so program 1 sends data and its received by the other. However how to setup 2 way communication ? There is buffer per device and not buffer per channel. 2 programs cannot create buffer simultaneously for the same device (other program cannot use another channel of same device). Can we use the buffer to get data from one channel, and dynamically switch it to get data from another channel.
Lars Can you please help regarding the same. It would be very appreciated.