I'm attempting to enable the Transmit / DDS for Transmit (Tx) DMA output buffer transfers for Tx 1 on the PicoZed SDR through a script without the aid of the IIO Oscope application (and the associated IIO server daemon [iiod]).
From my understanding, in order to enable / activate the data for Tx1, I can use the following echo commands to set the following IIO parameters for the cf-ad94361-dds-core-lpc (iio:device2) device to a one (1):
echo 1 > /sys/bus/iio/devices/iio:device2/scan_elements/out_voltage0_en
echo 1 > /sys/bus/iio/devices/iio:device2/scan_elements/out_voltage1_en
echo 1 > /sys/bus/iio/devices/iio:device2/buffer/enable
However, after I a script that contains these commands, it appears that when I write data to the DMA Tx buffer the spectrum doesn't appear to change as if the data isn't being written.
Am I missing something in order to enable the DAC output buffers for Tx1?
Any feedback would be appreciated. I look forward to your response.
Can you give a little more detail on why you don't recommend using the file descriptors to control the AD9361 DDS since it's error prone? I have been using the IIO file descriptors to enable/disable several parameters of the DDS and it seems to be working for our project.
I assume you would recommend following the examples in the links you provided for generating an software application that makes the appropriate libiio calls like the application Dean put together for his project. Is that correct?
Yes, applications are better. File descriptors can enumerate differently based on the system and devices attached. With libiio you can directly use names of devices to control them, avoiding this problem. Also, you get more valuable feedback in forms of error codes when things fail.