0

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.

isch
  • 1
  • 3
  • Trigger should be registered in the IIO subsystem. You can’t throw arbitrary names there if u understand how it works. – 0andriy Jul 26 '23 at 19:46
  • Right, I'm not sure how you got that I am using arbitrary names though based on the steps I put. Could you provide clarification? I assume it is registered through the command `echo 0 > add_trigger`. – isch Jul 26 '23 at 21:30

0 Answers0