Hi @martin_mig ,
Thanks for the detailed information!
If you are trying to use the sysfs (echo 1 > /sys/bus/iio/devices/iio:device0/buffer/enable), the issue may be related to the lack of IIO trigger support on the kernel, to make it work you need to recompile the kernel adding the flag CONFIG_IIO_SYSFS_TRIGGER. You can find information on how to do it on this article.
After booting the new kernel with the flag enabled, you need to create the trigger using the following commands:
echo 0 > /sys/bus/iio/devices/iio_sysfs_trigger/add_trigger
cat /sys/bus/iio/devices/trigger0/name > /sys/bus/iio/devices/iio:device0/trigger/current_trigger
With this, you now can follow the instructions provided here to enable the continuous mode:
echo 1 > /sys/bus/iio/devices/iio\:device0/scan_elements/in_voltage0_en
echo 100 > /sys/bus/iio/devices/iio\:device0/buffer/length
echo 1 > /sys/bus/iio/devices/iio\:device0/buffer/enable
In the end, you can read the buffer data using the following command:
hexdump -e '"iio0 :" 8/2 "%04x " "\n"' /dev/iio:device0
Please let me know if it works for you or if you need any help from us.
Best regards,
Daniel Morais