Closed michaelkimmer closed 2 months ago
You likely have an older driver version. This API was updated months back https://github.com/analogdevicesinc/pyadi-iio/commit/28917785e9a1e824420353e4062c76c0084bf9d2
v0.0.15 will contain the older driver API.
Do I understand right that you broke the code with this commit?
You likely have an older driver version. This API was updated months back 2891778
v0.0.15 will contain the older driver API.
No. The actual driver API changed that pyadi calls into. v0.0.16+ assumes a driver from Kuiper 2022-R2 or newer.
In ./adi/adrv9002.py (lines 687-721) there are wrong attributes names in setters/getters of the carrier frequencies:
Input: sdr = adi.adrv9002(uri="ip:analog.local") sdr.tx0_lo = 2400e6
Output: Traceback (most recent call last): File "", line 1, in
File "C:\Users\micha\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\adi\adrv9002.py", line 708, in tx0_lo
return self._get_iio_attr("altvoltage2", "frequency", True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\micha\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\adi\attribute.py", line 127, in _get_iio_attr
self._get_iio_attr_str(channel_name, attr_name, output, _ctrl)
File "C:\Users\micha\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\adi\attribute.py", line 122, in _get_iio_attr_str
return channel.attrs[attr_name].value