Post Go back to editing

Setting up ADICup3029 + CN0565

Category: Software

I have have problems setting up the ADICup3029 with the CN0565.

I use a X64 based computer running Ubuntu 22.04.

The DAPLINK drive is recognized and uploading firmware HEX files seems to work.

(using e.g. the HEX files listed on the wiki pages).

Also the necessary software to control ADICup3029+CN0565 is installed (as outlined on the wiki pages) and runs.

The ADICup3029 is listed under /dev/ttyACM0 and seems to be able to receive data (red light responses).

However, all example programs fail because the connection is not working even when the  /dev/ttyACM0 port is used.

Also direct communication with e.g. Putty does not give any response from the ADICup3029.

Any suggestions how to solve this?

Regards,

Rudolf Sprik

  • Hi Rudolf,

    I would just like to confirm if you replaced the port used in each example scripts.

    Also, what error message are you encountering? This will help us determine the cause of the problem. 

    Regards,
    Michelle

  • Hallo Michelle,

    sorry for my late response.

    I did indeed change the name of the port accordingly in the examples.

    Even the standard Command Line Interface example for the ADICup3029 without the CN0565 is not working.

    The indicated /dev/ttyACM0 port is not responding correctly to e.g. the Putty terminal program.

    The red communication light on the ADICup is responding, but no characters are send from ADICup to the host.

    All of the examples and also the CLI do work on a Windows based computer using the standard COM port found in the device manager.

    The CLI example is directly accessible from e.g. Putty.

    Also the reading examples with the CN0565 work fine.

    Although I can use a Windows computer, I would like to use a Linux (or even a simple Raspberry Pi with a ARM processor).

    Thanks for any info you can give me.

    Regards,

    Rudolf Sprik

  • Hello Rudolf,

    It appears there might be an issue with the communication between your machine and the ADICUP3029. Could you please provide a snapshot of your iio_info?

    In some cases, this problem arises due to the absence of a serial backend in your Linux device. To resolve this, you may refer to this user guide for instructions on installing and fixing the backends correctly. 

    Ensure that the serial backend is installed and available on your machine. Let me know if this works for you.

    Best regards,
    Michelle

  • Thanks,

    Rebuilding the iio library on the Ubuntu machine resolved the issue for the CLI example on the ADICup3029.

    However, the CN0565 module examples give an error message after: import adi

    AttributeError: /lib/x86_64-linux-gnu/libiio.so.1: undefined symbol: iio_get_backends_count

    I am using the HEX file for the module as mentioned on the CN0565 wiki page:

    https://wiki.analog.com/resources/eval/user-guides/circuits-from-the-lab/cn0565

    There libiio v0.23 is mentioned.

    Could it be that I am running into compatibility issues between the new 1.0 version and the older ones?

    The iio_info on my system:

    iio_info version: 1.0 (git tag:7ae48369)
    Libiio version: 1.0 (git tag: 7ae48369) backends: local ip usb xml
    IIO context created with local backend.
    Backend version: 1.0 (git tag: 7ae48369)
    Backend description string: Linux sprik-UM560 6.5.0-17-generic #17~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 16 14:32:32 UTC 2 x86_64
    IIO context has 2 attributes:
    attr 0: local,kernel value: 6.5.0-17-generic
    attr 1: uri value: local:
    IIO context has 4 devices:
    hwmon0: nvme
    2 channels found:
    temp2: (input)
    4 channel-specific attributes found:
    attr 0: input (temp2_input) value: 56850
    attr 1: label (temp2_label) value: Sensor 1
    attr 2: max (temp2_max) value: ERROR: Input/output error (-5)
    attr 3: min (temp2_min) value: ERROR: Input/output error (-5)
    temp1: (input)
    6 channel-specific attributes found:
    attr 0: alarm (temp1_alarm) value: 0
    attr 1: crit (temp1_crit) value: 79850
    attr 2: input (temp1_input) value: 40850
    attr 3: label (temp1_label) value: Composite
    attr 4: max (temp1_max) value: 69850
    attr 5: min (temp1_min) value: -20150
    No trigger on this device
    hwmon1: k10temp
    1 channels found:
    temp1: (input)
    2 channel-specific attributes found:
    attr 0: input (temp1_input) value: 46000
    attr 1: label (temp1_label) value: Tctl
    No trigger on this device
    hwmon2: amdgpu
    4 channels found:
    in1: (input)
    2 channel-specific attributes found:
    attr 0: input (in1_input) value: 787
    attr 1: label (in1_label) value: vddnb
    in0: (input)
    2 channel-specific attributes found:
    attr 0: input (in0_input) value: 662
    attr 1: label (in0_label) value: vddgfx
    power1: (input)
    2 channel-specific attributes found:
    attr 0: average (power1_average) value: 3000000
    attr 1: label (power1_label) value: PPT
    temp1: (input)
    2 channel-specific attributes found:
    attr 0: input (temp1_input) value: 45000
    attr 1: label (temp1_label) value: edge
    2 device-specific attributes found:
    attr 0: freq1_input value: 400000000
    attr 1: freq1_label value: sclk
    No trigger on this device
    hwmon3: hidpp_battery_0
    0 channels found:
    No trigger on this device

  • Hi Rudolf, 

    You may still use the LibIIO v0.23 but the CN0565 is compatible even on the latest release of the LibIIO. 

    The import adi error message occurs when there's no pyadi-iio installed on the host pc. Can you confirm if you have already installed pyadi-iio?

    Regards,
    Michelle

  • Yes I did.

    According to pip list: pyadi-ii0 version 0.0.17 is installed.

    Regards,

    Rudolf

  • Hi Rudolf,

    You may try to work on a virtual environment. Have you installed a virtual environment on your machine yet? If not, you can refer to the setup instructions provided below:

    Let me know if this works for you.

    Regards,
    Michelle

  • Hallo Michelle,
    thanks a lot for your detailed answer.
    Unfortunately this did not resolve the issue.

    Regards, Rudolf

    In short what I did:
    >>
    installed older libiio version from: github.com/.../libiio-v0
    libiio-0.25.gb6028fd-Linux-Ubuntu-22.04.deb

    [later found out that rebuilding the libiio-0.25 from the source there gave the same outcome].

    >>
    pip list after installing:
    pyadi-iio 0.0.16
    pylibiio 0.23.1

    I am actually using a Anaconda virtual environment.

    Then installed from the pyadi directory following your list:
    pip install -r requirements.txt                                 #(inluded -r)
    ....
    pip install .                                                             #(Left out the -e switch)

    No errors or warnings in this process.

    However running:
    python3 cn0565_example_single.py 0 1 1 0

    gave:
    AttributeError: /lib/x86_64-linux-gnu/libiio.so.1: undefined symbol: iio_get_backends_count

    Call to CN0565 device over USB in 'cn0565_example_single.py' was:
    cn0565 = adi.cn0565(uri="serial:COM7,230400,8n1n")

    and I edited it to:
    cn0565 = adi.cn0565(uri="serial:/dev/ttyACM0,230400,8n1n")
    where /dev/ttyACM0 is how the device is known.

    iio-info:
    iio_info version: 0.25 (git tag:v0.25)
    Libiio version: 0.25 (git tag: v0.25) backends: local xml ip usb
    IIO context created with local backend.
    Backend version: 0.25 (git tag: v0.25)
    Backend description string: Linux sprik-UM560 6.5.0-18-generic #18~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 11:40:03 UTC 2 x86_64
    IIO context has 2 attributes:
    local,kernel: 6.5.0-18-generic
    uri: local:
    ...

  • Hi Rudolf,

    Could you please share the full iio_info to verify whether the host PC successfully detected the CN0565?

    Regards,
    Michelle

  • Hallo Michelle,

    see below.

    The ADICup3029 is still listed under /dev/ttyACM0

    But I don't see it in the iio_info output (?)

    and the error in the example is still.

    AttributeError: /lib/x86_64-linux-gnu/libiio.so.1: undefined symbol: iio_get_backends_count

    Regards,

    Rudolf

    full iio_info output:

    ==============

    iio_info version: 0.25 (git tag:v0.25)
    Libiio version: 0.25 (git tag: v0.25) backends: local xml ip usb
    IIO context created with local backend.
    Backend version: 0.25 (git tag: v0.25)
    Backend description string: Linux sprik-UM560 6.5.0-18-generic #18~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 11:40:03 UTC 2 x86_64
    IIO context has 2 attributes:
    local,kernel: 6.5.0-18-generic
    uri: local:
    IIO context has 4 devices:
    hwmon0: nvme
    2 channels found:
    temp2: (input)
    4 channel-specific attributes found:
    attr 0: input value: 47850
    attr 1: label value: Sensor 1
    attr 2: max ERROR: Input/output error (5)
    attr 3: min ERROR: Input/output error (5)
    temp1: (input)
    6 channel-specific attributes found:
    attr 0: alarm value: 0
    attr 1: crit value: 79850
    attr 2: input value: 33850
    attr 3: label value: Composite
    attr 4: max value: 69850
    attr 5: min value: -20150
    No trigger on this device
    hwmon1: k10temp
    1 channels found:
    temp1: (input)
    2 channel-specific attributes found:
    attr 0: input value: 41000
    attr 1: label value: Tctl
    No trigger on this device
    hwmon2: amdgpu
    4 channels found:
    in1: (input)
    2 channel-specific attributes found:
    attr 0: input value: 787
    attr 1: label value: vddnb
    in0: (input)
    2 channel-specific attributes found:
    attr 0: input value: 793
    attr 1: label value: vddgfx
    power1: (input)
    2 channel-specific attributes found:
    attr 0: average value: 3000000
    attr 1: label value: PPT
    temp1: (input)
    2 channel-specific attributes found:
    attr 0: input value: 40000
    attr 1: label value: edge
    2 device-specific attributes found:
    attr 0: freq1_input value: 400000000
    attr 1: freq1_label value: sclk
    No trigger on this device
    hwmon3: hidpp_battery_0
    0 channels found:
    No trigger on this device