Open Miavu87 opened 1 month ago
Sorry,
the solution is:
return
self._get_iio_attr(self.channel[1].name, "scale_available", False)`
Can you generate a context file for the device and provide it here? They can be created through use of the pytest-libiio module or with iio-emu.
Hi, I have continued working with my device and having problems with Device Tree and Udev. At this moment, the device isn't created and therefore iio_info doesn't work for me.
As soon as I solve it I will send you what you requested.
Thank you.
Hi, I was able to generate the XML file (attached): context_file.xml ==> The order of the channels is as expected.
I attach a file with the context from a Python script (with import iio): context_from_python.txt ==> Timestamp is channel 0
Thanks, Files_context.zip
I don't think you used the correct tool to generate the XML file. Note that you cannot use iio-genxml from libiio itself. This is different than the tools provided by iio-emu or pytest-libiio
Hi, i attached the file generated with command "gen_xml --uri local: --xml generated.xml"
Seems to be OK, but in my IDE (VsCode) I can see channel 0 as Timestamp.
Thank you.
El mar, 1 oct 2024 a las 22:34, Travis F. Collins @.***>) escribió:
Can you generate a context file for the device and provide it here? They can be created through use of the pytest-libiio module https://tfcollins.github.io/pytest-libiio/master/cli_tools/ or with iio-emu https://github.com/analogdevicesinc/iio-emu/tree/main/tools.
— Reply to this email directly, view it on GitHub https://github.com/analogdevicesinc/pyadi-iio/issues/602#issuecomment-2387020678, or unsubscribe https://github.com/notifications/unsubscribe-auth/BLYI3TADWK4DICX7NLVQIX3ZZMBMPAVCNFSM6AAAAABPGDW6B6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBXGAZDANRXHA . You are receiving this because you authored the thread.Message ID: @.***>
In your file you can see the log messages:
XML generated:
<?xml ...
Context re-creation from generated XML succeeded!
Those surrounding log messages (not xml data) only come from iio-genxml. See here https://github.com/analogdevicesinc/libiio/blob/main/utils/iio_genxml.c#L99 . The issue with using iio-genxml (not gen_xml) is that it doesn't retrieve values from the context which are required for baseline emulation
Hi, I'm sorry but I don't know how to get the XML file from pytest-libiio or iio-emu.
Could you send me an example?
Thanks again.
Can you generate a context file for the device and provide it here? They can be created through use of the pytest-libiio module or with iio-emu.
I detailed this here with these tools
Hello, I'm sorry but I am absolutely unable to compile ios-emu. I have tried thousands of things and thousands of tests.
If you like, we'll drop the matter.
Thanks for everything.
Hello, I am new to a development with AD7606 and I am trying to run the example given in the repository: "pyadi-iio/examples /ad7606.py".
The example shows an error on the line "sc = ad7606.scale_available" because it tries to read the data from channel 0.
In my device, it assigns channel 0 to the Timestamp:
On the other hand, if I run iio_info the channel Timestamp is number 8.
I fixed everything by making a new file "ad7606.py" and changing the line:
Along the line:
Is this the only solution?
THANK YOU!!