ADALM2000 in GNURadioCompanion issue: ModuleNotFoundError: No module named 'm2k'

With GRC I tried to put out some data on the Ḿ2K Analog Out Sink' and read in data via the 'M2K Analog In Source'.

When running my flowgraph, I am getting the error  ModuleNotFoundError: No module named 'm2k'

I followed all installation instructions on wiki.analog.com, but no I am stuck.

I would appreciate any help, thanks in advance.

Some further information:

iio_info -s 
Library version: 0.19 (git tag: v0.19)
Compiled with backends: local xml ip usb serial
Available contexts:
0: 0456:b672 (Analog Devices Inc. M2k (ADALM-2000)), serial=104473ce6991001702000c0019cd898082 [usb:2.8.5]

Scopy runs also very well

I am using GNURadioCompanion 3.8.1.0 (Python 3.8.5)

OS: Ubuntu 20.04.2 LTS (native)

Top Replies

Parents
  • +1
    •  Analog Employees 
    on Feb 1, 2021 7:27 AM 2 months ago

    Hi,

    there is a possibility that the ADALM2000 module was installed in other python package than the one GRC is using. Please check in /usr/local/lib/python3.8/dist-packages if there is any 'm2k' directory. Also check in python3 directory. If you found the 'm2k' module in python3 and not in python3.8, try to copy it and rerun GRC.

    Please tell us if it works.

    Thank you,

    Teo

  • Thank you for the quick reply!

    Yes I think your guess is in the right direction, but there is a new error message:

    Traceback (most recent call last):
    File "/home/christian/Documents/adalm2000/try1.py", line 29, in <module>
    import m2k
    File "/usr/local/lib/python3.8/dist-packages/m2k/__init__.py", line 34, in <module>
    from .m2k_swig import *
    File "/usr/local/lib/python3.8/dist-packages/m2k/m2k_swig.py", line 13, in <module>
    from . import _m2k_swig
    ImportError: /usr/local/lib/x86_64-linux-gnu/libgnuradio-m2k.so.0: undefined symbol: spi_init

    Do you have any idea what else could be wrong?

    Christian

  • 0
    •  Analog Employees 
    on Feb 1, 2021 8:37 PM 2 months ago in reply to crausch

    Hi,

    did you build gr-m2k with the digital interface enabled (-DDIGITAL=ON)? The function 'spi_init' is used only in the ADF4350 block, which is built only if the digital interface is on. If this is what you intended, then you must build libm2k with tools enabled (-DENABLE_TOOLS=ON). In gr-m2k the digital interface refers to digital parts (such as ADF4350), and not to the digital input/output interface (this one is built by default).

    Please let us know if this was the problem.

    Thank you,
    Teo P.

Reply
  • 0
    •  Analog Employees 
    on Feb 1, 2021 8:37 PM 2 months ago in reply to crausch

    Hi,

    did you build gr-m2k with the digital interface enabled (-DDIGITAL=ON)? The function 'spi_init' is used only in the ADF4350 block, which is built only if the digital interface is on. If this is what you intended, then you must build libm2k with tools enabled (-DENABLE_TOOLS=ON). In gr-m2k the digital interface refers to digital parts (such as ADF4350), and not to the digital input/output interface (this one is built by default).

    Please let us know if this was the problem.

    Thank you,
    Teo P.

Children