01-21-2023, 06:42 PM
(01-21-2023, 02:16 PM)Zebulon Walton Wrote: 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.)Looks like the device number depends from phone to phone, depending possible on the distro, the kernel version, and/or the hardware revision. My PinePhone now has the accelerometer on device2. Used to be device3, which does not even exist now.
I guess we should just use a wildcard, as in:
Code:
CUR_X=$(cat /sys/bus/iio/devices/iio\:device*/in_accel_x_raw)
CUR_Y=$(cat /sys/bus/iio/devices/iio\:device*/in_accel_y_raw)
Quote:I guess the camera names are wrong. Try using 3-003c and 3-004c instead of 4-003c and 4-004c. For me, the ones with 3- are the correct ones, both back when I wrote the script and now. It looks like those names also depend on the hardware or distro, which is a problem, because the numeric IDs (5 and 7 in my case) are not stable either (e.g., I had them swapped at some point). Or print the topology withCode:[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]$
Code:
media-ctl -d1 -p