isch
isch

Reputation: 1

Why do I get an "sh: write error: Invalid argument" when configuring the current_trigger for an iio_sysfs_trigger?

I keep getting an sh: write error: Invalid argument when I try to configure the current_trigger for an iio device, which is for the mpu6050. I am using Yocto Kirkstone for an rpi3.

Here are the steps I take:

cd /sys/bus/iio/devices/iio_sys_fs_trigger
echo 0 > add_trigger
cd /sys/bus/iio/devices/trigger1 #trigger0 exists by default
cat name #gives sysfstrig0, as expected
cd /sys/bus/iio/devices/iio:device0
echo sysfstrig0 > trigger/current_trigger

And then the last line is where I get the error. By default, there exists a trigger0 named mpu6050-dev0. When I write to trigger/current_trigger, using the command cat mpu6050-dev0 > trigger/current_trigger, then no problem occurs. Just thought it might be something worth mentioning. Thank you in advance.

Upvotes: 0

Views: 751

Answers (0)

Related Questions