analogdevicesinc / pyadi-iio

Python interfaces for ADI hardware with IIO drivers (aka peyote)
https://analogdevicesinc.github.io/pyadi-iio
Other
134 stars 99 forks source link

ADI import error #486

Closed KrishnaBalasubramanian closed 8 months ago

KrishnaBalasubramanian commented 8 months ago

I have a raspberry pi (4B) with standard pi os. I trying to use it with CN0554. I had recently installed libiio from source . Everything went fine: $iio_info iio_info version: 1.0 (git tag:27276d04) Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64

installed pylibiio using pip (0.25) installed pyadi-iio using pip. (0.0.16)

However, when I import adi, I get the following error: /lib/arm-linux-gnueabihf/libiio.so.1: undefined symbol: iio_get_backends_count

I understand, from searches that the issue could be related to versions. Could you please advise how I should proceed ?

thanking you in advance

tfcollins commented 8 months ago

You need to install a released/tagged version of libiio. Latest is v0.25. libiio version 1.0 is from the main branch and is unstable.

KrishnaBalasubramanian commented 8 months ago

Thank you so much for your swift response. That really worked. However, still unable to get the CN0554 listed in the iio_info. Could you please correct my understanding as presented below:

  1. If I have Kuiper Linux, then most things are already set and pyadi should work.
  2. However, I have a standard RPi os. So, I need to build the ADI kernel according to https://wiki.analog.com/resources/tools-software/linux-build/generic/raspberrypi, before include dtoverlay in the config.txt.

I have some errors building the ADI kernel. And I know it will be huge learning for me as I havnt done anything like this before. So, I ask my question:

Do I really need to build the kernel and replace my kernel7I.img ? or can I just copy the .dtsi file into my /boot and just include the dtoverlay ?

Thanking you in advance.

Krishna

tfcollins commented 8 months ago

Kuiper is outside the support for this forum. I would start https://wiki.analog.com/resources/eval/user-guides/circuits-from-the-lab/cn0554#software_setup . If you have further questions please post them here: https://ez.analog.com/reference-designs/