首页 > 解决方案 > PlutoSDR AttributeError:Ubuntu 20.04 上的模块“iio”

问题描述

尝试在 GNU Radio Companion 中运行流程图时,出现以下错误: AttributeError: module 'iio' has no attribute 'pluto_source'

我正在 Windows 上为 Ubuntu 20.04 运行一个新的 VMWare 环境。

我首先为 Pluto 安装了驱动程序和 libiio 库,并且能够通过以下方式进行 SSH:ssh root@192.168.21 但是,在终端中,当我运行时,iio_info -s我得到以下与我有关的输出。

Library version: 0.21 (git tag: 9d79757)
Compiled with backends: local xml ip usb
Unable to create Local IIO context : No such file or directory (2)
Available contexts:
    0: 0456:b673 (Analog Devices Inc. PlutoSDR (ADALM-PLUTO)), serial=1044739659930006f4ff24003edc27135f [usb:1.10.5]
    1: 192.168.2.1 (Analog Devices PlutoSDR Rev.B (Z7010-AD9364)), serial=1044739659930006f4ff24003edc27135f [ip:pluto.local]

运行iio_info -u ip:192.168.2.1我得到一些可能与上述有关的错误。

Library version: 0.21 (git tag: 9d79757)
Compiled with backends: local xml ip usb
IIO context created with network backend.
Backend version: 0.21 (git tag: v0.21  )
Backend description string: 192.168.2.1 Linux (none) 4.19.0-119999-g6edc6cd #319 SMP PREEMPT Mon Jul 6 15:45:01 CEST 2020 armv7l
IIO context has 9 attributes:
    hw_model: Analog Devices PlutoSDR Rev.B (Z7010-AD9364)
    hw_model_variant: 0
    hw_serial: 1044739659930006f4ff24003edc27135f
    fw_version: v0.32
    ad9361-phy,xo_correction: 39999954
    ad9361-phy,model: ad9364
    local,kernel: 4.19.0-119999-g6edc6cd
    uri: ip:192.168.2.1
    ip,ip-addr: 192.168.2.1
...
...
                attr 10: multichip_sync ERROR: Permission denied (13)
                attr 11: rssi_gain_step_error value: lna_error: 0 0 0 0
mixer_error: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
...
...
                debug attr 180: adi,frequency-division-duplex-mode-enable value: 1
                debug attr 181: direct_reg_access value: 0x0
        No trigger on this device
    iio:device2: xadc
        10 channels found:
            voltage5: vccoddr (input)
...
...
        2 debug attributes found:
                debug attr  0: pseudorandom_err_check value: CH0 : PN9 : Out of Sync : PN Error
CH1 : PN9 : Out of Sync : PN Error
                debug attr  1: direct_reg_access value: 0x0
        No trigger on this device

我不确定错误是什么,所以我用最新的固件重新刷新了 PlutoSDR 并再次尝试。还是一样的错误。

有什么想法吗?

标签: gnugnuradiognuradio-companioniiortl-sdr

解决方案


我对 GNU Radio Companion 3.8 (GRC) 和 Adalm Pluto 也有类似的问题。根本原因是GRC需要一个“量身定做”的iio包,这与你通过“pip install pylibiio”安装的不同。我可以提出以下建议:

  1. 卸载 Python iio(如果你这样做了,以避免屏蔽)
  2. 确保按照官方指南安装 gr-iio 。
  3. 在指南中有关于制作 gr-iio 安装副本并将其位置导出到 PYTHONPATH 的说明。或者,您可以从我的经验中看到一些细节。
  4. 如果您需要在没有 GRC 的情况下将 Adalm Pluto 与 Python 一起使用,我可以建议创建一个虚拟环境 (venv) 并在那里安装 Python iio。

推荐阅读