-
Notifications
You must be signed in to change notification settings - Fork 320
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
Restore support for reading/writing all attributes and improve compat layer #1088
Conversation
Libiio's new API does not allow reading or writing all attributes at the same time. However, old clients connected to the old interface might still try to use it. Re-implement it in IIOD on top of the new API so that old clients still work. The algorithm is based on the one in v0.25's local.c. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Check that we have an attribute before trying to read it, to avoid NULL pointer deferences. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
This function existed in the old API but was not present in the compat layer until now. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Looks good. with this - older osc still works? which boards did you test on? |
Only tested remotely with v1.0 IIOD. Later this week I will verify that it works properly with the v0.25 IIOD as well, and that it works locally too (on my ZCU102). |
Ok - thanks - would hold off on merge until you confirm older setups for compatibility. Might also want to check with https://github.com/f4exb/sdrangel - there are alot of pluto users that use that. I have not tried it with the compat layers yet. |
The network backend should be named 'ip', for three reasons: - iio_has_backend() always used "ip" as the identifier for the network backend, even in the v0.x API; instead of having to add a workaround in the compatibility layer, it's better to just rename the backend. - the network backend was the only one whose URI did not contain the backend name. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
I pushed an extra fix, and with that, all combinations work:
|
Tested iio-osc with the compat layer on top of Libiio v1.0, with the local backend, on a ZCU102. Worked perfectly. |
Not to add to your testing - but I assume you were using ip: context, not usb: or serial: ? (osc should support all). |
Provided that #1092 is merged too, the above four combinations are supported on all backends. |
Thanks for testing. (and I'm sort of glad you found things to fix because of it :) ) |
A set of three commits that IIOD to work again with the iio-oscilloscope, and also allow iio-oscilloscope to run on top of the compatibility layer.