IIO Dummy module Experiment One - Play with iio_dummy
Notes and lessons learned about kernel build configuration and modules
Following: FLUSP Experiment
Loading the module and creating the dummy device via configfs worked on the first try. The device appeared instantly at /sys/bus/iio/devices/iio:device0. I started reading the name and a few _raw values — everything was there, exactly as the tutorial said.
The only small problem I hit was forgetting to mount configfs first (classic rookie mistake). Once I did mount -t configfs, everything just worked. No compilation errors, no permission issues, super clean.
I also tried the optional part: added a 3-axis magnetometer channel in the driver. Rebuilt, reloaded, and boom — new in_magn_* files showed up. Seeing the new attributes appear live was satisfying.
What I understood
- Configfs is the modern, easy way to spawn IIO devices without real hardware.
- Every channel and attribute is automatically exposed in sysfs — no extra work needed.
- The dummy driver is perfect for learning because you can change things and see the effect immediately.
This experiment took me literally 10 minutes and already made the whole IIO subsystem feel way less scary.