AnsweredAssumed Answered

cat: /sys/bus/iio/devices/iio:decive0/in_voltage0_rssi: No such file or directory

Question asked by JAHoney on Aug 9, 2018
Latest reply on Aug 9, 2018 by rgetz


I'm writing an application program with C language and I need to get the value of ad9361's RSSI during my program, but we encountered an error, the error is as follows:

cat: /sys/bus/iio/devices/iio:decive0/in_voltage0_rssi: No such file or directory.

And partd of my codes are as follows:

#define GET_RSSI_CMD   "cat /sys/bus/iio/devices/iio:decive0/in_voltage0_rssi"

popen(GET_RSSI_CMD, "r");

I have searched this error in Google after that, Unfortunately, I still have no idea how to solve this issue. However, I guess it is caused by the file path, there is a colon in the path of /sys/bus/iio/devices/iio:decive0/in_voltage0_rssi.

I have tried popen("cat /proc/version", "r") and popen("cd /sys/bus/iio/devices/", "r"), these could run correctly.

I would appreciate it if anyone could give me some suggestion.