01-21-2023, 02:16 PM
(This post was last modified: 01-21-2023, 02:23 PM by Zebulon Walton.)
Interesting! Looks like it needs more tweaking to work on Mobian though.
I did find that device references needed to be changed to from "device4" to "device1". (The devices 0, 1, and 2 exist. Only #1 had the required entries.)
However, when running the script after making those changes, the first invocation of media-ctl barfs up on an invalid arg. I'm not familiar enough with that program to know what it's complaining about. Here's the output including an echo of the command line that fails (I believe I got the single and double quotes to echo correctly):
I did find that device references needed to be changed to from "device4" to "device1". (The devices 0, 1, and 2 exist. Only #1 had the required entries.)
Code:
CUR_X=$(cat /sys/bus/iio/devices/iio\:device4/in_accel_x_raw)
CUR_Y=$(cat /sys/bus/iio/devices/iio\:device4/in_accel_y_raw)
...changed to...
CUR_X=$(cat /sys/bus/iio/devices/iio\:device1/in_accel_x_raw)
CUR_Y=$(cat /sys/bus/iio/devices/iio\:device1/in_accel_y_raw)
However, when running the script after making those changes, the first invocation of media-ctl barfs up on an invalid arg. I'm not familiar enough with that program to know what it's complaining about. Here's the output including an echo of the command line that fails (I believe I got the single and double quotes to echo correctly):
Code:
[mobian@mobian bin]$ ./record.sh test
portrait
**** Executing the following command:
**** media-ctl -d1 -l'"gc2145 4-003c":0->1:0[0],"ov5640 4-004c":0->1:0[1]'
Unable to parse link: Invalid argument (22)
[mobian@mobian bin]$