I downloaded the prebuilt image "2022_r2 Patch 1" from Analog Devices and booted the ZedBoard using the default BIN file. After connecting the AD-FMCOMMS2-EBZ to the ZedBoard , i encountered a runtime error when running GRC (GNU Radio Companion) in standalone mode. However, I could successfully run in "IIO Oscilloscope".
Error message when connected with GRC is given below
Executing: /usr/bin/python3 -u /home/analog/jdefault.py
Parsing /proc/self/auxv to extract ELF hwcaps!
Parsing /proc/self/auxv to extract ELF hwcaps!
Parsing /proc/self/auxv to extract ELF hwcaps!
Unable to write attribute out_altvoltage0_RX_LO_frequency: -13
Unable to write attribute in_voltage_rf_bandwidth: -13
Unable to write attribute in_voltage_quadrature_tracking_en: -13
Unable to write attribute in_voltage_rf_dc_offset_tracking_en: -13
Unable to write attribute in_voltage_bb_dc_offset_tracking_en: -13
Unable to write attribute in_voltage0_gain_control_mode: -13
Unable to write attribute in_voltage0_hardwaregain: -13
Unable to write attribute in_voltage1_gain_control_mode: -13
Unable to write attribute in_voltage1_hardwaregain: -13
Unable to write attribute in_voltage0_rf_port_select: -13
Traceback (most recent call last):
File "/home/analog/jdefault.py", line 176, in <module>
main()
File "/home/analog/jdefault.py", line 152, in main
tb = top_block_cls()
File "/home/analog/jdefault.py", line 119, in __init__
self.iio_fmcomms2_source_0 = iio.fmcomms2_source_f32c('local:', 101900000, 2084000, 20000000, False, True, 32768, True, True, True, 'manual', 64, 'manual', 64, 'A_BALANCED', '', True)
File "/usr/local/lib/python3/dist-packages/iio/iio_swig.py", line 199, in make
return _iio_swig.fmcomms2_source_f32c_make(*args, **kwargs)
RuntimeError: Unable to set BB rate
>>> Done (return code 1)
Test setup file of GRC is also attached
options:
parameters:
author: analog
category: '[GRC Hier Blocks]'
cmake_opt: ''
comment: ''
copyright: ''
description: ''
gen_cmake: 'On'
gen_linking: dynamic
generate_options: qt_gui
hier_block_src_path: '.:'
id: jdefault
max_nouts: '0'
output_language: python
placement: (0,0)
qt_qss_theme: ''
realtime_scheduling: ''
run: 'True'
run_command: '{python} -u {filename}'
run_options: prompt
sizing_mode: fixed
thread_safe_setters: ''
title: Not titled yet
window_size: ''
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [8, 8]
rotation: 0
state: enabled
blocks:
- name: samp_rate
id: variable
parameters:
comment: ''
value: '32000'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [184, 12]
rotation: 0
state: enabled
- name: iio_fmcomms2_source_0
id: iio_fmcomms2_source
parameters:
affinity: ''
alias: ''
auto_filter: 'True'
bandwidth: '20000000'
bbdc: 'True'
buffer_size: '32768'
comment: ''
filter: ''
frequency: '101900000'
gain1: '''manual'''
gain2: '''manual'''
manual_gain1: '64'
manual_gain2: '64'
maxoutbuf: '0'
minoutbuf: '0'
quadrature: 'True'
rf_port_select: '''A_BALANCED'''
rfdc: 'True'
rx1_en: 'False'
rx2_en: 'True'
samplerate: '2084000'
uri: 'local:'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [160, 236.0]
rotation: 0
state: true
- name: qtgui_freq_sink_x_0
id: qtgui_freq_sink_x
parameters:
affinity: ''
alias: ''
alpha1: '1.0'
alpha10: '1.0'
alpha2: '1.0'
alpha3: '1.0'
alpha4: '1.0'
alpha5: '1.0'
alpha6: '1.0'
alpha7: '1.0'
alpha8: '1.0'
alpha9: '1.0'
autoscale: 'False'
average: '1.0'
axislabels: 'True'
bw: samp_rate
color1: '"blue"'
color10: '"dark blue"'
color2: '"red"'
color3: '"green"'
color4: '"black"'
color5: '"cyan"'
color6: '"magenta"'
color7: '"yellow"'
color8: '"dark red"'
color9: '"dark green"'
comment: ''
ctrlpanel: 'False'
fc: '0'
fftsize: '1024'
freqhalf: 'True'
grid: 'False'
gui_hint: ''
label: Relative Gain
label1: ''
label10: ''''''
label2: ''''''
label3: ''''''
label4: ''''''
label5: ''''''
label6: ''''''
label7: ''''''
label8: ''''''
label9: ''''''
legend: 'True'
maxoutbuf: '0'
minoutbuf: '0'
name: '""'
nconnections: '1'
showports: 'False'
tr_chan: '0'
tr_level: '0.0'
tr_mode: qtgui.TRIG_MODE_FREE
tr_tag: '""'
type: complex
units: dB
update_time: '0.10'
width1: '1'
width10: '1'
width2: '1'
width3: '1'
width4: '1'
width5: '1'
width6: '1'
width7: '1'
width8: '1'
width9: '1'
wintype: firdes.WIN_BLACKMAN_hARRIS
ymax: '10'
ymin: '-140'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [520, 312.0]
rotation: 0
state: true
connections:
- [iio_fmcomms2_source_0, '0', qtgui_freq_sink_x_0, '0']
metadata:
file_format: 1
*******************************************************************************************************************************************************
I launched GNU radio with linux command 'sudo' . Then I encountered a 'AttributeError' when run GRC (GNU Radio Companion).
Error Message when GNU radio is launched by "sudo" linux command
<<< Welcome to GNU Radio Companion 3.8.2.0 >>>
Block paths:
/usr/share/gnuradio/grc/blocks
/usr/local/share/gnuradio/grc/blocks
Loading: "/home/analog/fmc.grc"
>>> Done
Generating: '/home/analog/jdefault.py'
Executing: /usr/bin/python3 -u /home/analog/jdefault.py
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Parsing /proc/self/auxv to extract ELF hwcaps!
Parsing /proc/self/auxv to extract ELF hwcaps!
Parsing /proc/self/auxv to extract ELF hwcaps!
Traceback (most recent call last):
File "/home/analog/jdefault.py", line 176, in <module>
main()
File "/home/analog/jdefault.py", line 152, in main
tb = top_block_cls()
File "/home/analog/jdefault.py", line 119, in __init__
self.iio_fmcomms2_source_0 = iio.fmcomms2_source_f32c('local:', 101900000, 2084000, 20000000, False, True, 32768, True, True, True, 'manual', 64, 'manual', 64, 'A_BALANCED', '', False)
AttributeError: module 'iio' has no attribute 'fmcomms2_source_f32c'
>>> Done (return code 1)
IMG_20240805_173622.jpg
If anyone has encountered a similar issue or knows a solution, please let me know.
Thanks
Regards!