-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support IIO devices #43
Comments
I don't seem to have an IIO hardware (at least not on my ThinkPad X230 and on my Google Nexus 4 phone), so I can't investigate for myself what's missing here.
Some general info (umockdev-record dump, /dev structure, an open/read/write/ioctl/close strace what happens if some program talks to the device) would be appreciated. Thanks! |
iio is |
@dlech: Is that the only issue that keeps iio device emulation from working? |
Probably. It doesn't use any ioctls that I know of. I haven't done anything fancy with it yet though. |
A way to manage the ring-buffers where the latest readouts are kept would be useful, but just being to instantiate the device is nice already. |
No, there are no ioctls in iio. You can emulate things with a "dummy" kernel device (if you want to compile your own kernel and check things out). I just ran into umockdev - very cool. This would be nice to use umockdev for validation automatic test of libiio - right now it's alot of manual testing when we make a release. Since libiio uses multiple backends (local, network, usb, serial), and iiod (which serve up local IIO devices to remote applications over USB or network), getting local working would be the most useful, but we eventually use all. Since usb looks like it is more supported - I will start with there to get familiar with umockdev. |
I've managed to make it work. It's not super easy, as I didn't want to rely on the It would be great if umockdev had some helper tools for that, something that could mock /dev devices which are just fancy data buffers (and which could mock See https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/317 |
A few years ago, I did some experimenting using libfuse to provide simulated sysfs devices - mainly to simulate returning errors like that. It looked promising but I didn't get very far with it. |
This will be useful on tablets and phones to test for accelerometers, compasses, quaternion sensors, etc.
In particular, accelerometers will behave differently if they have a "trigger" or not, if they have scan_elements, etc.
The text was updated successfully, but these errors were encountered: