usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

UHD example rx_samples_to_file fails

TM
Thangaraj Mukara Dhakshinamoorthy
Mon, Oct 11, 2021 12:24 PM

Hello Everyone,

My system config:
Host OS: Windows 10
Guest OS: VirtualBox Ubuntu 20.04.3 LTS
UHD version: 3.15.0.0
GNU Radio version: 3.8.1.0
SDR Device : Ettus USRP N320
My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

Console logs:

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat

Creating the usrp device with: ...
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2
[INFO] [MPM.PeriphManager] init() called with device args mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'. [INFO] [MPM.Rhodium-0] init() called with args mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'
[INFO] [MPM.Rhodium-1] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'
.
.
.
.
[WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate:
Target sample rate: 5.000000 MSps
Actual sample rate: 5.015510 MSps
Actual RX Rate: 5.015510 Msps...

Setting RX Freq: 98.000000 MHz...
Setting RX LO Offset: 0.000000 MHz...
Actual RX Freq: 98.000000 MHz...

Setting RX Gain: 20.000000 dB...
Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...
DGot an overflow indication. Please consider the following:
Your write medium must sustain a rate of 20.062041MB/s.
Dropped samples will not be written to the file.
Please modify this example for your purposes.
This message will not appear again.
DDDD
Done!

[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_33) no response packet - AssertionError: bool(buff)
in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_30) packet parse error - EnvironmentError: IOError: Expected packet index: 28 Received index: 29
[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) packet parse error - EnvironmentError: IOError: Expected packet index: 566 Received index: 567

  1. What should I do in order to fix this?
  2. I tried the fm_receiver flowgraph in GNU Radio, it was running successfully but when I tune the frequency there is nothing I could hear except the first 5 seconds noise!
  3. I also tried the example 'Spectrum Analyzer' grc program, it was also running without error but there was not much changes/effects when I tune the frequency! Is there something wrong in receiver?

Thank you in advance!

Regards,
Thangz

Hello Everyone, My system config: Host OS: Windows 10 Guest OS: VirtualBox Ubuntu 20.04.3 LTS UHD version: 3.15.0.0 GNU Radio version: 3.8.1.0 SDR Device : Ettus USRP N320 My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) Console logs: komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat Creating the usrp device with: ... [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 [INFO] [MPM.PeriphManager] init() called with device args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'. [INFO] [MPM.Rhodium-0] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' [INFO] [MPM.Rhodium-1] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' . . . . [WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate: Target sample rate: 5.000000 MSps Actual sample rate: 5.015510 MSps Actual RX Rate: 5.015510 Msps... Setting RX Freq: 98.000000 MHz... Setting RX LO Offset: 0.000000 MHz... Actual RX Freq: 98.000000 MHz... Setting RX Gain: 20.000000 dB... Actual RX Gain: 20.000000 dB... Waiting for "lo_locked": ++++++++++ locked. Press Ctrl + C to stop streaming... DGot an overflow indication. Please consider the following: Your write medium must sustain a rate of 20.062041MB/s. Dropped samples will not be written to the file. Please modify this example for your purposes. This message will not appear again. DDDD Done! [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_33) no response packet - AssertionError: bool(buff) in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_30) packet parse error - EnvironmentError: IOError: Expected packet index: 28 Received index: 29 [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) packet parse error - EnvironmentError: IOError: Expected packet index: 566 Received index: 567 1. What should I do in order to fix this? 2. I tried the fm_receiver flowgraph in GNU Radio, it was running successfully but when I tune the frequency there is nothing I could hear except the first 5 seconds noise! 3. I also tried the example 'Spectrum Analyzer' grc program, it was also running without error but there was not much changes/effects when I tune the frequency! Is there something wrong in receiver? Thank you in advance! Regards, Thangz
MD
Marcus D. Leech
Mon, Oct 11, 2021 4:07 PM

On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:

Hello Everyone,

My system config:

Host OS: Windows 10

Guest OS: VirtualBox Ubuntu 20.04.3 LTS

UHD version: 3.15.0.0

GNU Radio version: 3.8.1.0

SDR Device : Ettus USRP N320

My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

Console logs:

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$
./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10
usrp_samples.dat

Creating the usrp device with: ...

[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100;
UHD_3.15.0.0-2build5

[INFO] [MPMD] Initializing 1 device(s) in parallel with args:
mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2

[INFO] [MPM.PeriphManager] init() called with device args
`mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'.

[INFO] [MPM.Rhodium-0] init() called with args
`mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'

[INFO] [MPM.Rhodium-1] init() called with args
`mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'

.

.

.

.

[WARNING] [MULTI_USRP] The hardware does not support the requested RX
sample rate:

Target sample rate: 5.000000 MSps

Actual sample rate: 5.015510 MSps

Actual RX Rate: 5.015510 Msps...

Setting RX Freq: 98.000000 MHz...

Setting RX LO Offset: 0.000000 MHz...

Actual RX Freq: 98.000000 MHz...

Setting RX Gain: 20.000000 dB...

Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...

DGot an overflow indication. Please consider the following:

  Your write medium must sustain a rate of 20.062041MB/s.

  Dropped samples will not be written to the file.

  Please modify this example for your purposes.

  This message will not appear again.

DDDD

Done!

[ERROR] [UHD] Exception caught in safe-call.

  in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with
uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]

  at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50

this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block
ctrl (CE_00_Port_33) no response packet - AssertionError: bool(buff)

  in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double)
[with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t =
long unsigned int]

  at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

[ERROR] [UHD] Exception caught in safe-call.

  in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with
uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]

  at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50

this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block
ctrl (CE_00_Port_30) packet parse error - EnvironmentError: IOError:
Expected packet index: 28 Received index: 29

[ERROR] [UHD] Exception caught in safe-call.

  in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with
uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]

  at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50

this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block
ctrl (CE_01_Port_40) packet parse error - EnvironmentError: IOError:
Expected packet index: 566 Received index: 567

Performance within a VM is often very poor.  If you replace the output
file with "/dev/null", ,does this change the behavior?

  1. What should I do in order to fix this?

  2. I tried the fm_receiver flowgraph in GNU Radio, it was running
    successfully but when I tune the frequency there is nothing I could
    hear except the first 5 seconds noise!

That would be a question for the discuss-gnuradio mailing list.

  1. I also tried the example ‚Spectrum Analyzer‘ grc program, it was
    also running without error but there was not much changes/effects when
    I tune the frequency! Is there something wrong in receiver?

What gain setting did you use?  What kind of antenna on the antenna port?

Thank you in advance!

Regards,

Thangz

On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: > > Hello Everyone, > > *_My system config:_* > > Host OS: Windows 10 > > Guest OS: VirtualBox Ubuntu 20.04.3 LTS > > UHD version: 3.15.0.0 > > GNU Radio version: 3.8.1.0 > > SDR Device : Ettus USRP N320 > > My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) > > Console logs: > > komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ > ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 > usrp_samples.dat > > Creating the usrp device with: ... > > [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; > UHD_3.15.0.0-2build5 > > [INFO] [MPMD] Initializing 1 device(s) in parallel with args: > mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 > > [INFO] [MPM.PeriphManager] init() called with device args > `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'. > > [INFO] [MPM.Rhodium-0] init() called with args > `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' > > [INFO] [MPM.Rhodium-1] init() called with args > `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' > > . > > . > > . > > . > > [WARNING] [MULTI_USRP] The hardware does not support the requested RX > sample rate: > > Target sample rate: 5.000000 MSps > > Actual sample rate: 5.015510 MSps > > Actual RX Rate: 5.015510 Msps... > > Setting RX Freq: 98.000000 MHz... > > Setting RX LO Offset: 0.000000 MHz... > > Actual RX Freq: 98.000000 MHz... > > Setting RX Gain: 20.000000 dB... > > Actual RX Gain: 20.000000 dB... > > Waiting for "lo_locked": ++++++++++ locked. > > Press Ctrl + C to stop streaming... > > DGot an overflow indication. Please consider the following: > >   Your write medium must sustain a rate of 20.062041MB/s. > >   Dropped samples will not be written to the file. > >   Please modify this example for your purposes. > >   This message will not appear again. > > DDDD > > Done! > > [ERROR] [UHD] Exception caught in safe-call. > >   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with > uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 > > this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block > ctrl (CE_00_Port_33) no response packet - AssertionError: bool(buff) > >   in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) > [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = > long unsigned int] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 > > [ERROR] [UHD] Exception caught in safe-call. > >   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with > uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 > > this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block > ctrl (CE_00_Port_30) packet parse error - EnvironmentError: IOError: > Expected packet index: 28 Received index: 29 > > [ERROR] [UHD] Exception caught in safe-call. > >   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with > uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 > > this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block > ctrl (CE_01_Port_40) packet parse error - EnvironmentError: IOError: > Expected packet index: 566 Received index: 567 > Performance within a VM is often very poor.  If you replace the output file with "/dev/null", ,does this change the behavior? > 1. What should I do in order to fix this? > > 2. I tried the fm_receiver flowgraph in GNU Radio, it was running > successfully but when I tune the frequency there is nothing I could > hear except the first 5 seconds noise! > That would be a question for the discuss-gnuradio mailing list. > 3. I also tried the example ‚Spectrum Analyzer‘ grc program, it was > also running without error but there was not much changes/effects when > I tune the frequency! Is there something wrong in receiver? > What gain setting did you use?  What kind of antenna on the antenna port? > Thank you in advance! > > Regards, > > Thangz >
TM
Thangaraj Mukara Dhakshinamoorthy
Tue, Oct 12, 2021 9:46 AM

Hello Marcus,

My system config (changed my working environment):
OS: Ubuntu 20.04.3 LTS
OS Type: 64-bit
RAM: 3.8 GB
Processor: Intel Core i5-2450M CPU @2.50GHz x4
UHD version: 3.15.0.0
GNU Radio version: 3.8.1.0
SDR Device: Ettus USRP N320
My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

  1. Performance within a VM is often very poor.  If you replace the output file with "/dev/null", ,does this change the behavior?

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10  /dev/null

Creating the usrp device with: ...
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2
[WARNING] [MPM.RPCServer] A timeout event occured!
[WARNING] [MPM.RPCServer] Attempt to read logs without valid claim from 192.168.10.1
.
.
.

Setting RX Rate: 5.000000 Msps...
[WARNING] [RFNOC] The requested decimation is odd; the user should expect passband CIC rolloff.
Select an even decimation to ensure that a halfband filter is enabled.
Decimations factorable by 4 will enable 2 halfbands, those factorable by 8 will enable 3 halfbands.
decimation = dsp_rate/samp_rate -> 49 = (245.760000 MHz)/(5.000000 MHz)

Actual RX Rate: 5.015510 Msps...

Setting RX Freq: 98.000000 MHz...
Setting RX LO Offset: 0.000000 MHz...
[WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate:
Target sample rate: 5.000000 MSps
Actual sample rate: 5.015510 MSps

Actual RX Freq: 98.000000 MHz...

Setting RX Gain: 20.000000 dB...
Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...
DGot an overflow indication. Please consider the following:
Your write medium must sustain a rate of 20.062041MB/s.
Dropped samples will not be written to the file.
Please modify this example for your purposes.
This message will not appear again.
D
Done!

  1. What gain settings did you use?

[cid:image001.png@01D7BF5E.C56E4C10]

[cid:image003.png@01D7BF5E.C56E4C10]

  1. What kind of antenna on the antenna port?
    Antenna Techincal Information
    Manufacturer                RF Solutions
    PART                            ANT-8WHIP3H-SMA
    TYPE                            90DEG HINGED WHIP
    FREQUENCY                  868MHz
    CONNECTOR                  SMA
    FORM                          HINGED WHIP
    DB GAIN                      +3dBi
    OP TEMPERATURE        -40 to +70oC

  2. Now when I ran the above spectrum analyzer flowgraph, I receive the runtime error as shown below:
    <<< Welcome to GNU Radio Companion 3.8.1.0 >>>

Block paths:
/usr/share/gnuradio/grc/blocks

Loading: "/home/komro/usrp_spectrum_analyzer.grc"

Done

Generating: '/home/komro/usrp_spectrum_analyzer.py'

Executing: /usr/bin/python3 -u /home/komro/usrp_spectrum_analyzer.py

Warning: failed to XInitThreads()
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2
[INFO] [MPM.PeriphManager] init() called with device args clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'. [INFO] [MPM.Rhodium-0] init() called with args clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'
[INFO] [MPM.Rhodium-1] init() called with args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'
[INFO] [0/Replay_0] Initializing block control (NOC ID: 0x4E91A00000000004)
[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff)
in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

[ERROR] [MPMD] Failure during block enumeration: EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff)
in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

Traceback (most recent call last):
File "/home/komro/usrp_spectrum_analyzer.py", line 192, in <module>
main()
File "/home/komro/usrp_spectrum_analyzer.py", line 170, in main
tb = top_block_cls()
File "/home/komro/usrp_spectrum_analyzer.py", line 91, in init
self.uhd_usrp_source_0 = uhd.usrp_source(
File "/usr/lib/python3/dist-packages/gnuradio/uhd/init.py", line 125, in constructor_interceptor
return old_constructor(*args)
File "/usr/lib/python3/dist-packages/gnuradio/uhd/uhd_swig.py", line 2787, in make
return _uhd_swig.usrp_source_make(device_addr, stream_args, issue_stream_cmd_on_start)
RuntimeError: RuntimeError: Failed to run enumerate_rfnoc_blocks()

What is the problem here?

PS: I can still ping the USRP device successfully!

Looking forward to your kind response.

Regards,
Thangz
Von: Marcus D. Leech patchvonbraun@gmail.com
Gesendet: Montag, 11. Oktober 2021 18:08
An: Thangaraj Mukara Dhakshinamoorthy thangaraj@komro.net; usrp-users@lists.ettus.com
Betreff: Re: UHD example rx_samples_to_file fails

On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:
Hello Everyone,

My system config:
Host OS: Windows 10
Guest OS: VirtualBox Ubuntu 20.04.3 LTS
UHD version: 3.15.0.0
GNU Radio version: 3.8.1.0
SDR Device : Ettus USRP N320
My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

Console logs:

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat

Creating the usrp device with: ...
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2
[INFO] [MPM.PeriphManager] init() called with device args mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'. [INFO] [MPM.Rhodium-0] init() called with args mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'
[INFO] [MPM.Rhodium-1] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'
.
.
.
.
[WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate:
Target sample rate: 5.000000 MSps
Actual sample rate: 5.015510 MSps
Actual RX Rate: 5.015510 Msps...

Setting RX Freq: 98.000000 MHz...
Setting RX LO Offset: 0.000000 MHz...
Actual RX Freq: 98.000000 MHz...

Setting RX Gain: 20.000000 dB...
Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...
DGot an overflow indication. Please consider the following:
Your write medium must sustain a rate of 20.062041MB/s.
Dropped samples will not be written to the file.
Please modify this example for your purposes.
This message will not appear again.
DDDD
Done!

[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_33) no response packet - AssertionError: bool(buff)
in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_30) packet parse error - EnvironmentError: IOError: Expected packet index: 28 Received index: 29
[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) packet parse error - EnvironmentError: IOError: Expected packet index: 566 Received index: 567
Performance within a VM is often very poor.  If you replace the output file with "/dev/null", ,does this change the behavior?

  1. What should I do in order to fix this?

  2. I tried the fm_receiver flowgraph in GNU Radio, it was running successfully but when I tune the frequency there is nothing I could hear except the first 5 seconds noise!
    That would be a question for the discuss-gnuradio mailing list.

  3. I also tried the example 'Spectrum Analyzer' grc program, it was also running without error but there was not much changes/effects when I tune the frequency! Is there something wrong in receiver?
    What gain setting did you use?  What kind of antenna on the antenna port?

Thank you in advance!

Regards,
Thangz

Hello Marcus, My system config (changed my working environment): OS: Ubuntu 20.04.3 LTS OS Type: 64-bit RAM: 3.8 GB Processor: Intel Core i5-2450M CPU @2.50GHz x4 UHD version: 3.15.0.0 GNU Radio version: 3.8.1.0 SDR Device: Ettus USRP N320 My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) 1. Performance within a VM is often very poor. If you replace the output file with "/dev/null", ,does this change the behavior? komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 /dev/null Creating the usrp device with: ... [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 [WARNING] [MPM.RPCServer] A timeout event occured! [WARNING] [MPM.RPCServer] Attempt to read logs without valid claim from 192.168.10.1 . . . Setting RX Rate: 5.000000 Msps... [WARNING] [RFNOC] The requested decimation is odd; the user should expect passband CIC rolloff. Select an even decimation to ensure that a halfband filter is enabled. Decimations factorable by 4 will enable 2 halfbands, those factorable by 8 will enable 3 halfbands. decimation = dsp_rate/samp_rate -> 49 = (245.760000 MHz)/(5.000000 MHz) Actual RX Rate: 5.015510 Msps... Setting RX Freq: 98.000000 MHz... Setting RX LO Offset: 0.000000 MHz... [WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate: Target sample rate: 5.000000 MSps Actual sample rate: 5.015510 MSps Actual RX Freq: 98.000000 MHz... Setting RX Gain: 20.000000 dB... Actual RX Gain: 20.000000 dB... Waiting for "lo_locked": ++++++++++ locked. Press Ctrl + C to stop streaming... DGot an overflow indication. Please consider the following: Your write medium must sustain a rate of 20.062041MB/s. Dropped samples will not be written to the file. Please modify this example for your purposes. This message will not appear again. D Done! 2. What gain settings did you use? [cid:image001.png@01D7BF5E.C56E4C10] [cid:image003.png@01D7BF5E.C56E4C10] 3. What kind of antenna on the antenna port? Antenna Techincal Information Manufacturer RF Solutions PART ANT-8WHIP3H-SMA TYPE 90DEG HINGED WHIP FREQUENCY 868MHz CONNECTOR SMA FORM HINGED WHIP DB GAIN +3dBi OP TEMPERATURE -40 to +70oC 4. Now when I ran the above spectrum analyzer flowgraph, I receive the runtime error as shown below: <<< Welcome to GNU Radio Companion 3.8.1.0 >>> Block paths: /usr/share/gnuradio/grc/blocks Loading: "/home/komro/usrp_spectrum_analyzer.grc" >>> Done Generating: '/home/komro/usrp_spectrum_analyzer.py' Executing: /usr/bin/python3 -u /home/komro/usrp_spectrum_analyzer.py Warning: failed to XInitThreads() [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 [INFO] [MPM.PeriphManager] init() called with device args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'. [INFO] [MPM.Rhodium-0] init() called with args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2' [INFO] [MPM.Rhodium-1] init() called with args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2' [INFO] [0/Replay_0] Initializing block control (NOC ID: 0x4E91A00000000004) [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff) in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 [ERROR] [MPMD] Failure during block enumeration: EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff) in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 Traceback (most recent call last): File "/home/komro/usrp_spectrum_analyzer.py", line 192, in <module> main() File "/home/komro/usrp_spectrum_analyzer.py", line 170, in main tb = top_block_cls() File "/home/komro/usrp_spectrum_analyzer.py", line 91, in __init__ self.uhd_usrp_source_0 = uhd.usrp_source( File "/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py", line 125, in constructor_interceptor return old_constructor(*args) File "/usr/lib/python3/dist-packages/gnuradio/uhd/uhd_swig.py", line 2787, in make return _uhd_swig.usrp_source_make(device_addr, stream_args, issue_stream_cmd_on_start) RuntimeError: RuntimeError: Failed to run enumerate_rfnoc_blocks() What is the problem here? PS: I can still ping the USRP device successfully! Looking forward to your kind response. Regards, Thangz Von: Marcus D. Leech <patchvonbraun@gmail.com> Gesendet: Montag, 11. Oktober 2021 18:08 An: Thangaraj Mukara Dhakshinamoorthy <thangaraj@komro.net>; usrp-users@lists.ettus.com Betreff: Re: UHD example rx_samples_to_file fails On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: Hello Everyone, My system config: Host OS: Windows 10 Guest OS: VirtualBox Ubuntu 20.04.3 LTS UHD version: 3.15.0.0 GNU Radio version: 3.8.1.0 SDR Device : Ettus USRP N320 My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) Console logs: komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat Creating the usrp device with: ... [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 [INFO] [MPM.PeriphManager] init() called with device args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'. [INFO] [MPM.Rhodium-0] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' [INFO] [MPM.Rhodium-1] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' . . . . [WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate: Target sample rate: 5.000000 MSps Actual sample rate: 5.015510 MSps Actual RX Rate: 5.015510 Msps... Setting RX Freq: 98.000000 MHz... Setting RX LO Offset: 0.000000 MHz... Actual RX Freq: 98.000000 MHz... Setting RX Gain: 20.000000 dB... Actual RX Gain: 20.000000 dB... Waiting for "lo_locked": ++++++++++ locked. Press Ctrl + C to stop streaming... DGot an overflow indication. Please consider the following: Your write medium must sustain a rate of 20.062041MB/s. Dropped samples will not be written to the file. Please modify this example for your purposes. This message will not appear again. DDDD Done! [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_33) no response packet - AssertionError: bool(buff) in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_30) packet parse error - EnvironmentError: IOError: Expected packet index: 28 Received index: 29 [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) packet parse error - EnvironmentError: IOError: Expected packet index: 566 Received index: 567 Performance within a VM is often very poor. If you replace the output file with "/dev/null", ,does this change the behavior? 1. What should I do in order to fix this? 2. I tried the fm_receiver flowgraph in GNU Radio, it was running successfully but when I tune the frequency there is nothing I could hear except the first 5 seconds noise! That would be a question for the discuss-gnuradio mailing list. 3. I also tried the example 'Spectrum Analyzer' grc program, it was also running without error but there was not much changes/effects when I tune the frequency! Is there something wrong in receiver? What gain setting did you use? What kind of antenna on the antenna port? Thank you in advance! Regards, Thangz
MD
Marcus D. Leech
Tue, Oct 12, 2021 3:02 PM

On 2021-10-12 5:46 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:

Hello Marcus,

My system config (changed my working environment):

OS: Ubuntu 20.04.3 LTS

OS Type: 64-bit

RAM: 3.8 GB

Processor: Intel Core i5-2450M CPU @2.50GHz x4

UHD version: 3.15.0.0

GNU Radio version: 3.8.1.0

SDR Device: Ettus USRP N320

My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

1.Performance within a VM is often very poor.  If you replace the
output file with "/dev/null", ,does this change the behavior?

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$
./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10
 /dev/null

Creating the usrp device with: ...

[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100;
UHD_3.15.0.0-2build5

[INFO] [MPMD] Initializing 1 device(s) in parallel with args:
mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2

[WARNING] [MPM.RPCServer] A timeout event occured!

[WARNING] [MPM.RPCServer] Attempt to read logs without valid claim
from 192.168.10.1

.

.

.

Setting RX Rate: 5.000000 Msps...

[WARNING] [RFNOC] The requested decimation is odd; the user should
expect passband CIC rolloff.

Select an even decimation to ensure that a halfband filter is enabled.

Decimations factorable by 4 will enable 2 halfbands, those factorable
by 8 will enable 3 halfbands.

decimation = dsp_rate/samp_rate -> 49 = (245.760000 MHz)/(5.000000 MHz)

Actual RX Rate: 5.015510 Msps...

Setting RX Freq: 98.000000 MHz...

Setting RX LO Offset: 0.000000 MHz...

[WARNING] [MULTI_USRP] The hardware does not support the requested RX
sample rate:

Target sample rate: 5.000000 MSps

Actual sample rate: 5.015510 MSps

Actual RX Freq: 98.000000 MHz...

Setting RX Gain: 20.000000 dB...

Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...

DGot an overflow indication. Please consider the following:

Your write medium must sustain a rate of 20.062041MB/s.

Dropped samples will not be written to the file.

Please modify this example for your purposes.

This message will not appear again.

D

Done!

So, this looks increasingly like your network interface is dropping
frames.  TO confirm--this is still under a VM, or on
  actual hardware?

What type of Ethernet interface are you using--USB-to-Ethernet devices
are known to not work very well because they cannot
 sustain high rates, and often reorder frames on the wire.   What
kind of cabling are you using?  Have you tried replacing that
  cabling?

Also, I'll note that the default master_clock_rate on the N320 is
245.76MHz, which means that your requested 5.0Msps
  sample rate cannot be precisely supported.  You can specify
"master_clock_rate=200e6" in the device arguments to
  request that as a master clock rate, which will allow a 5Msps sample
rate.

Also, the gain range on N320 goes up to 75dB, which means unless you
have a VERY strong signal, a gain setting of
 20dB will likely produce noisy/non-existent results.

2.What gain settings did you use?

3.What kind of antenna on the antenna port?
Antenna Techincal Information

Manufacturer              RF Solutions

PART                      ANT-8WHIP3H-SMA

TYPE                      90DEG HINGED WHIP

FREQUENCY 868MHz

CONNECTOR            SMA

FORM                      HINGED WHIP

DB GAIN                       +3dBi

OP TEMPERATURE         -40 to +70oC

4.Now when I ran the above spectrum analyzer flowgraph, I receive the
runtime error as shown below:

<<< Welcome to GNU Radio Companion 3.8.1.0 >>>

Block paths:

/usr/share/gnuradio/grc/blocks

Loading: "/home/komro/usrp_spectrum_analyzer.grc"

Done

Generating: '/home/komro/usrp_spectrum_analyzer.py'

Executing: /usr/bin/python3 -u /home/komro/usrp_spectrum_analyzer.py

Warning: failed to XInitThreads()

[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100;
UHD_3.15.0.0-2build5

[INFO] [MPMD] Initializing 1 device(s) in parallel with args:
mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2

[INFO] [MPM.PeriphManager] init() called with device args
`clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'.

[INFO] [MPM.Rhodium-0] init() called with args
`clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'

[INFO] [MPM.Rhodium-1] init() called with args
`clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'

[INFO] [0/Replay_0] Initializing block control (NOC ID:
0x4E91A00000000004)

[ERROR] [UHD] Exception caught in safe-call.

  in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with
uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]

  at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50

this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block
ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff)

  in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double)
[with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t =
long unsigned int]

  at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

[ERROR] [MPMD] Failure during block enumeration: EnvironmentError:
IOError: Block ctrl (CE_01_Port_40) no response packet -
AssertionError: bool(buff)

  in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double)
[with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t =
long unsigned int]

  at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

Traceback (most recent call last):

  File "/home/komro/usrp_spectrum_analyzer.py", line 192, in <module>

    main()

  File "/home/komro/usrp_spectrum_analyzer.py", line 170, in main

    tb = top_block_cls()

  File "/home/komro/usrp_spectrum_analyzer.py", line 91, in init

self.uhd_usrp_source_0 = uhd.usrp_source(

  File "/usr/lib/python3/dist-packages/gnuradio/uhd/init.py", line
125, in constructor_interceptor

    return old_constructor(*args)

  File "/usr/lib/python3/dist-packages/gnuradio/uhd/uhd_swig.py", line
2787, in make

    return _uhd_swig.usrp_source_make(device_addr, stream_args,
issue_stream_cmd_on_start)

RuntimeError: RuntimeError: Failed to run enumerate_rfnoc_blocks()

What is the problem here?

PS: I can still ping the USRP device successfully!

The fact that you got "no response packet" again indicates a
network-layer issue.

Also, I'll note that an antenna designed for 800MHz to 1GHz will be
next-to-useless for the FM
  band.

Also, there's a simple spectrum analyser application, uhd_fft, that
comes with the Gnu Radio installation
  on Ubuntu.

Looking forward to your kind response.

Regards,

Thangz

*Von:*Marcus D. Leech patchvonbraun@gmail.com
Gesendet: Montag, 11. Oktober 2021 18:08
An: Thangaraj Mukara Dhakshinamoorthy thangaraj@komro.net;
usrp-users@lists.ettus.com
Betreff: Re: UHD example rx_samples_to_file fails

On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:

 Hello Everyone,

 *_My system config:_*

 Host OS: Windows 10

 Guest OS: VirtualBox Ubuntu 20.04.3 LTS

 UHD version: 3.15.0.0

 GNU Radio version: 3.8.1.0

 SDR Device : Ettus USRP N320

 My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

 Console logs:

 komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$
 ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration
 10 usrp_samples.dat

 Creating the usrp device with: ...

 [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100;
 UHD_3.15.0.0-2build5

 [INFO] [MPMD] Initializing 1 device(s) in parallel with args:
 mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2

 [INFO] [MPM.PeriphManager] init() called with device args
 `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'.

 [INFO] [MPM.Rhodium-0] init() called with args
 `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'

 [INFO] [MPM.Rhodium-1] init() called with args
 `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'

 .

 .

 .

 .

 [WARNING] [MULTI_USRP] The hardware does not support the requested
 RX sample rate:

 Target sample rate: 5.000000 MSps

 Actual sample rate: 5.015510 MSps

 Actual RX Rate: 5.015510 Msps...

 Setting RX Freq: 98.000000 MHz...

 Setting RX LO Offset: 0.000000 MHz...

 Actual RX Freq: 98.000000 MHz...

 Setting RX Gain: 20.000000 dB...

 Actual RX Gain: 20.000000 dB...

 Waiting for "lo_locked": ++++++++++ locked.

 Press Ctrl + C to stop streaming...

 DGot an overflow indication. Please consider the following:

   Your write medium must sustain a rate of 20.062041MB/s.

   Dropped samples will not be written to the file.

   Please modify this example for your purposes.

   This message will not appear again.

 DDDD

 Done!

 [ERROR] [UHD] Exception caught in safe-call.

   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with
 uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]

   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50

 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError:
 Block ctrl (CE_00_Port_33) no response packet - AssertionError:
 bool(buff)

   in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool,
 double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG;
 uint64_t = long unsigned int]

   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

 [ERROR] [UHD] Exception caught in safe-call.

   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with
 uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]

   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50

 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError:
 Block ctrl (CE_00_Port_30) packet parse error - EnvironmentError:
 IOError: Expected packet index: 28 Received index: 29

 [ERROR] [UHD] Exception caught in safe-call.

   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with
 uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]

   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50

 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError:
 Block ctrl (CE_01_Port_40) packet parse error - EnvironmentError:
 IOError: Expected packet index: 566 Received index: 567

Performance within a VM is often very poor.  If you replace the output
file with "/dev/null", ,does this change the behavior?

 1. What should I do in order to fix this?

 2. I tried the fm_receiver flowgraph in GNU Radio, it was running
 successfully but when I tune the frequency there is nothing I
 could hear except the first 5 seconds noise!

That would be a question for the discuss-gnuradio mailing list.

 3. I also tried the example ‚Spectrum Analyzer‘ grc program, it
 was also running without error but there was not much
 changes/effects when I tune the frequency! Is there something
 wrong in receiver?

What gain setting did you use?  What kind of antenna on the antenna port?

 Thank you in advance!

 Regards,

 Thangz
On 2021-10-12 5:46 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: > > Hello Marcus, > > *_My system config (changed my working environment):_* > > OS: Ubuntu 20.04.3 LTS > > OS Type: 64-bit > > RAM: 3.8 GB > > Processor: Intel Core i5-2450M CPU @2.50GHz x4 > > UHD version: 3.15.0.0 > > GNU Radio version: 3.8.1.0 > > SDR Device: Ettus USRP N320 > > My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) > > 1.Performance within a VM is often very poor.  If you replace the > output file with "/dev/null", ,does this change the behavior? > > komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ > ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 >  /dev/null > > Creating the usrp device with: ... > > [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; > UHD_3.15.0.0-2build5 > > [INFO] [MPMD] Initializing 1 device(s) in parallel with args: > mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 > > [WARNING] [MPM.RPCServer] A timeout event occured! > > [WARNING] [MPM.RPCServer] Attempt to read logs without valid claim > from 192.168.10.1 > > . > > . > > . > > Setting RX Rate: 5.000000 Msps... > > [WARNING] [RFNOC] The requested decimation is odd; the user should > expect passband CIC rolloff. > > Select an even decimation to ensure that a halfband filter is enabled. > > Decimations factorable by 4 will enable 2 halfbands, those factorable > by 8 will enable 3 halfbands. > > decimation = dsp_rate/samp_rate -> 49 = (245.760000 MHz)/(5.000000 MHz) > > Actual RX Rate: 5.015510 Msps... > > Setting RX Freq: 98.000000 MHz... > > Setting RX LO Offset: 0.000000 MHz... > > [WARNING] [MULTI_USRP] The hardware does not support the requested RX > sample rate: > > Target sample rate: 5.000000 MSps > > Actual sample rate: 5.015510 MSps > > Actual RX Freq: 98.000000 MHz... > > Setting RX Gain: 20.000000 dB... > > Actual RX Gain: 20.000000 dB... > > Waiting for "lo_locked": ++++++++++ locked. > > Press Ctrl + C to stop streaming... > > DGot an overflow indication. Please consider the following: > > Your write medium must sustain a rate of 20.062041MB/s. > > Dropped samples will not be written to the file. > > Please modify this example for your purposes. > > This message will not appear again. > > D > > Done! > So, this looks increasingly like your *network* interface is dropping frames.  TO confirm--this is still under a VM, or on   actual hardware? What type of Ethernet interface are you using--USB-to-Ethernet devices are known to not work very well because they cannot  sustain high rates, and often *reorder* frames on the wire.   What kind of cabling are you using?  Have you tried replacing that   cabling? Also, I'll note that the default master_clock_rate on the N320 is 245.76MHz, which means that your requested 5.0Msps   sample rate cannot be precisely supported.  You can specify "master_clock_rate=200e6" in the device arguments to   request that as a master clock rate, which will allow a 5Msps sample rate. Also, the gain range on N320 goes up to 75dB, which means unless you have a VERY strong signal, a gain setting of  20dB will likely produce noisy/non-existent results. > 2.What gain settings did you use? > > *3.*What kind of antenna on the antenna port? > *Antenna Techincal Information*** > > Manufacturer              RF Solutions > > PART                      ANT-8WHIP3H-SMA > > TYPE                      90DEG HINGED WHIP > > FREQUENCY 868MHz > > CONNECTOR            SMA > > FORM                      HINGED WHIP > > DB GAIN                       +3dBi > > OP TEMPERATURE         -40 to +70oC > > 4.Now when I ran the above spectrum analyzer flowgraph, I receive the > runtime error as shown below: > > <<< Welcome to GNU Radio Companion 3.8.1.0 >>> > > Block paths: > > /usr/share/gnuradio/grc/blocks > > Loading: "/home/komro/usrp_spectrum_analyzer.grc" > > >>> Done > > Generating: '/home/komro/usrp_spectrum_analyzer.py' > > Executing: /usr/bin/python3 -u /home/komro/usrp_spectrum_analyzer.py > > Warning: failed to XInitThreads() > > [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; > UHD_3.15.0.0-2build5 > > [INFO] [MPMD] Initializing 1 device(s) in parallel with args: > mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 > > [INFO] [MPM.PeriphManager] init() called with device args > `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'. > > [INFO] [MPM.Rhodium-0] init() called with args > `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2' > > [INFO] [MPM.Rhodium-1] init() called with args > `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2' > > [INFO] [0/Replay_0] Initializing block control (NOC ID: > 0x4E91A00000000004) > > [ERROR] [UHD] Exception caught in safe-call. > >   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with > uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 > > this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block > ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff) > >   in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) > [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = > long unsigned int] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 > > [ERROR] [MPMD] Failure during block enumeration: EnvironmentError: > IOError: Block ctrl (CE_01_Port_40) no response packet - > AssertionError: bool(buff) > >   in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) > [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = > long unsigned int] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 > > Traceback (most recent call last): > >   File "/home/komro/usrp_spectrum_analyzer.py", line 192, in <module> > >     main() > >   File "/home/komro/usrp_spectrum_analyzer.py", line 170, in main > >     tb = top_block_cls() > >   File "/home/komro/usrp_spectrum_analyzer.py", line 91, in __init__ > > self.uhd_usrp_source_0 = uhd.usrp_source( > >   File "/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py", line > 125, in constructor_interceptor > >     return old_constructor(*args) > >   File "/usr/lib/python3/dist-packages/gnuradio/uhd/uhd_swig.py", line > 2787, in make > >     return _uhd_swig.usrp_source_make(device_addr, stream_args, > issue_stream_cmd_on_start) > > RuntimeError: RuntimeError: Failed to run enumerate_rfnoc_blocks() > > What is the problem here? > > PS: I can still ping the USRP device successfully! > The fact that you got "no response packet" again indicates a network-layer issue. Also, I'll note that an antenna designed for 800MHz to 1GHz will be next-to-useless for the FM   band. Also, there's a simple spectrum analyser application, uhd_fft, that comes with the Gnu Radio installation   on Ubuntu. > Looking forward to your kind response. > > Regards, > > Thangz > > *Von:*Marcus D. Leech <patchvonbraun@gmail.com> > *Gesendet:* Montag, 11. Oktober 2021 18:08 > *An:* Thangaraj Mukara Dhakshinamoorthy <thangaraj@komro.net>; > usrp-users@lists.ettus.com > *Betreff:* Re: UHD example rx_samples_to_file fails > > On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: > > Hello Everyone, > > *_My system config:_* > > Host OS: Windows 10 > > Guest OS: VirtualBox Ubuntu 20.04.3 LTS > > UHD version: 3.15.0.0 > > GNU Radio version: 3.8.1.0 > > SDR Device : Ettus USRP N320 > > My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) > > Console logs: > > komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ > ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration > 10 usrp_samples.dat > > Creating the usrp device with: ... > > [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; > UHD_3.15.0.0-2build5 > > [INFO] [MPMD] Initializing 1 device(s) in parallel with args: > mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 > > [INFO] [MPM.PeriphManager] init() called with device args > `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'. > > [INFO] [MPM.Rhodium-0] init() called with args > `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' > > [INFO] [MPM.Rhodium-1] init() called with args > `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' > > . > > . > > . > > . > > [WARNING] [MULTI_USRP] The hardware does not support the requested > RX sample rate: > > Target sample rate: 5.000000 MSps > > Actual sample rate: 5.015510 MSps > > Actual RX Rate: 5.015510 Msps... > > Setting RX Freq: 98.000000 MHz... > > Setting RX LO Offset: 0.000000 MHz... > > Actual RX Freq: 98.000000 MHz... > > Setting RX Gain: 20.000000 dB... > > Actual RX Gain: 20.000000 dB... > > Waiting for "lo_locked": ++++++++++ locked. > > Press Ctrl + C to stop streaming... > > DGot an overflow indication. Please consider the following: > >   Your write medium must sustain a rate of 20.062041MB/s. > >   Dropped samples will not be written to the file. > >   Please modify this example for your purposes. > >   This message will not appear again. > > DDDD > > Done! > > [ERROR] [UHD] Exception caught in safe-call. > >   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with > uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 > > this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: > Block ctrl (CE_00_Port_33) no response packet - AssertionError: > bool(buff) > >   in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, > double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; > uint64_t = long unsigned int] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 > > [ERROR] [UHD] Exception caught in safe-call. > >   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with > uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 > > this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: > Block ctrl (CE_00_Port_30) packet parse error - EnvironmentError: > IOError: Expected packet index: 28 Received index: 29 > > [ERROR] [UHD] Exception caught in safe-call. > >   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with > uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 > > this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: > Block ctrl (CE_01_Port_40) packet parse error - EnvironmentError: > IOError: Expected packet index: 566 Received index: 567 > > Performance within a VM is often very poor.  If you replace the output > file with "/dev/null", ,does this change the behavior? > > > > 1. What should I do in order to fix this? > > 2. I tried the fm_receiver flowgraph in GNU Radio, it was running > successfully but when I tune the frequency there is nothing I > could hear except the first 5 seconds noise! > > That would be a question for the discuss-gnuradio mailing list. > > > 3. I also tried the example ‚Spectrum Analyzer‘ grc program, it > was also running without error but there was not much > changes/effects when I tune the frequency! Is there something > wrong in receiver? > > What gain setting did you use?  What kind of antenna on the antenna port? > > > > Thank you in advance! > > Regards, > > Thangz >
TM
Thangaraj Mukara Dhakshinamoorthy
Wed, Oct 13, 2021 3:34 PM

Hello Marcus,

  1.  So, this looks increasingly like your *network* interface is dropping frames.  TO confirm--this is still under a VM, or on
    

actual hardware?
Yes, it is a seperate laptop which runs only ubuntu as main OS.
What type of Ethernet interface are you using--USB-to-Ethernet devices are known to not work very well because they cannot
sustain high rates, and often reorder frames on the wire.  What kind of cabling are you using?  Have you tried replacing that
cabling?

Now I removed the USB to Ethernet adapter and connected the ethernet cable (CAT5E 350MHz cable) directly into laptop!

Also, I'll note that the default master_clock_rate on the N320 is 245.76MHz, which means that your requested 5.0Msps
sample rate cannot be precisely supported.  You can specify "master_clock_rate=200e6" in the device arguments to
request that as a master clock rate, which will allow a 5Msps sample rate.
Done!
Also, the gain range on N320 goes up to 75dB, which means unless you have a VERY strong signal, a gain setting of
20dB will likely produce noisy/non-existent results.
There is strong signal in 868MHz frequency, but still there is no capture file created by the UHD example program!

Console logs:
komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat

Creating the usrp device with: master_clock_rate=200e6...
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.178.61,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2,master_clock_rate=200e6
[WARNING] [MPM.RPCServer] A timeout event occured!
[INFO] [MPM.PeriphManager] init() called with device args product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'. [INFO] [MPM.Rhodium-0] init() called with args product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'
[INFO] [MPM.Rhodium-1] init() called with args `product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'
.
.
.
Setting RX Rate: 5.000000 Msps...
Actual RX Rate: 5.000000 Msps...

Setting RX Freq: 868.000000 MHz...
Setting RX LO Offset: 0.000000 MHz...
Actual RX Freq: 868.000000 MHz...

Setting RX Gain: 20.000000 dB...
Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...

Done!
(but no file created)

  1. Regarding the Spectrum Analyzer Program, I reduced the sample rate to 2MHz, then it worked perfectly and the fluctuations in the graph were seen clearly without any stop! I also check the uhd_fft program which worked perfectly too!

  2. Regarding the FM receiver flowgraph,I tried tuning various FM channel frequencies (88-108 MHz) and gains, but there is no effect other than the noisy sound (always). What should I do to build a FM receiver application using N320 and which antenna should I use (please suggest for multipurpose too)?

    [cid:image005.png@01D7C058.9FC3BFE0]

PS: I followed the gnuradio tutorial on usrp fm receiver

Looking forward to your kind response :)

Regards,
Thangaraj

Von: Marcus D. Leech patchvonbraun@gmail.com
Gesendet: Dienstag, 12. Oktober 2021 17:03
An: Thangaraj Mukara Dhakshinamoorthy thangaraj@komro.net; usrp-users@lists.ettus.com
Betreff: Re: AW: UHD example rx_samples_to_file fails

On 2021-10-12 5:46 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:
Hello Marcus,

My system config (changed my working environment):
OS: Ubuntu 20.04.3 LTS
OS Type: 64-bit
RAM: 3.8 GB
Processor: Intel Core i5-2450M CPU @2.50GHz x4
UHD version: 3.15.0.0
GNU Radio version: 3.8.1.0
SDR Device: Ettus USRP N320
My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

  1.   Performance within a VM is often very poor.  If you replace the output file with "/dev/null", ,does this change the behavior?
    

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10  /dev/null

Creating the usrp device with: ...
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2
[WARNING] [MPM.RPCServer] A timeout event occured!
[WARNING] [MPM.RPCServer] Attempt to read logs without valid claim from 192.168.10.1
.
.
.

Setting RX Rate: 5.000000 Msps...
[WARNING] [RFNOC] The requested decimation is odd; the user should expect passband CIC rolloff.
Select an even decimation to ensure that a halfband filter is enabled.
Decimations factorable by 4 will enable 2 halfbands, those factorable by 8 will enable 3 halfbands.
decimation = dsp_rate/samp_rate -> 49 = (245.760000 MHz)/(5.000000 MHz)

Actual RX Rate: 5.015510 Msps...

Setting RX Freq: 98.000000 MHz...
Setting RX LO Offset: 0.000000 MHz...
[WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate:
Target sample rate: 5.000000 MSps
Actual sample rate: 5.015510 MSps

Actual RX Freq: 98.000000 MHz...

Setting RX Gain: 20.000000 dB...
Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...
DGot an overflow indication. Please consider the following:
Your write medium must sustain a rate of 20.062041MB/s.
Dropped samples will not be written to the file.
Please modify this example for your purposes.
This message will not appear again.
D
Done!

So, this looks increasingly like your network interface is dropping frames.  TO confirm--this is still under a VM, or on
actual hardware?

What type of Ethernet interface are you using--USB-to-Ethernet devices are known to not work very well because they cannot
sustain high rates, and often reorder frames on the wire.  What kind of cabling are you using?  Have you tried replacing that
cabling?

Also, I'll note that the default master_clock_rate on the N320 is 245.76MHz, which means that your requested 5.0Msps
sample rate cannot be precisely supported.  You can specify "master_clock_rate=200e6" in the device arguments to
request that as a master clock rate, which will allow a 5Msps sample rate.

Also, the gain range on N320 goes up to 75dB, which means unless you have a VERY strong signal, a gain setting of
20dB will likely produce noisy/non-existent results.

  1.   What gain settings did you use?
    

[cid:image001.png@01D7C056.3910C600]

[cid:image002.png@01D7C056.3910C600]

  1.   What kind of antenna on the antenna port?
    

Antenna Techincal Information
Manufacturer                RF Solutions
PART                            ANT-8WHIP3H-SMA
TYPE                            90DEG HINGED WHIP
FREQUENCY                  868MHz
CONNECTOR                  SMA
FORM                          HINGED WHIP
DB GAIN                      +3dBi
OP TEMPERATURE        -40 to +70oC

  1.   Now when I ran the above spectrum analyzer flowgraph, I receive the runtime error as shown below:
    

<<< Welcome to GNU Radio Companion 3.8.1.0 >>>

Block paths:
/usr/share/gnuradio/grc/blocks

Loading: "/home/komro/usrp_spectrum_analyzer.grc"

Done

Generating: '/home/komro/usrp_spectrum_analyzer.py'

Executing: /usr/bin/python3 -u /home/komro/usrp_spectrum_analyzer.py

Warning: failed to XInitThreads()
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2
[INFO] [MPM.PeriphManager] init() called with device args clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'. [INFO] [MPM.Rhodium-0] init() called with args clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'
[INFO] [MPM.Rhodium-1] init() called with args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'
[INFO] [0/Replay_0] Initializing block control (NOC ID: 0x4E91A00000000004)
[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff)
in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

[ERROR] [MPMD] Failure during block enumeration: EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff)
in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

Traceback (most recent call last):
File "/home/komro/usrp_spectrum_analyzer.py", line 192, in <module>
main()
File "/home/komro/usrp_spectrum_analyzer.py", line 170, in main
tb = top_block_cls()
File "/home/komro/usrp_spectrum_analyzer.py", line 91, in init
self.uhd_usrp_source_0 = uhd.usrp_source(
File "/usr/lib/python3/dist-packages/gnuradio/uhd/init.py", line 125, in constructor_interceptor
return old_constructor(*args)
File "/usr/lib/python3/dist-packages/gnuradio/uhd/uhd_swig.py", line 2787, in make
return _uhd_swig.usrp_source_make(device_addr, stream_args, issue_stream_cmd_on_start)
RuntimeError: RuntimeError: Failed to run enumerate_rfnoc_blocks()

What is the problem here?

PS: I can still ping the USRP device successfully!
The fact that you got "no response packet" again indicates a network-layer issue.

Also, I'll note that an antenna designed for 800MHz to 1GHz will be next-to-useless for the FM
band.

Also, there's a simple spectrum analyser application, uhd_fft, that comes with the Gnu Radio installation
on Ubuntu.

Looking forward to your kind response.

Regards,
Thangz
Von: Marcus D. Leech patchvonbraun@gmail.commailto:patchvonbraun@gmail.com
Gesendet: Montag, 11. Oktober 2021 18:08
An: Thangaraj Mukara Dhakshinamoorthy thangaraj@komro.netmailto:thangaraj@komro.net; usrp-users@lists.ettus.commailto:usrp-users@lists.ettus.com
Betreff: Re: UHD example rx_samples_to_file fails

On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:
Hello Everyone,

My system config:
Host OS: Windows 10
Guest OS: VirtualBox Ubuntu 20.04.3 LTS
UHD version: 3.15.0.0
GNU Radio version: 3.8.1.0
SDR Device : Ettus USRP N320
My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

Console logs:

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat

Creating the usrp device with: ...
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2
[INFO] [MPM.PeriphManager] init() called with device args mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'. [INFO] [MPM.Rhodium-0] init() called with args mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'
[INFO] [MPM.Rhodium-1] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'
.
.
.
.
[WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate:
Target sample rate: 5.000000 MSps
Actual sample rate: 5.015510 MSps
Actual RX Rate: 5.015510 Msps...

Setting RX Freq: 98.000000 MHz...
Setting RX LO Offset: 0.000000 MHz...
Actual RX Freq: 98.000000 MHz...

Setting RX Gain: 20.000000 dB...
Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...
DGot an overflow indication. Please consider the following:
Your write medium must sustain a rate of 20.062041MB/s.
Dropped samples will not be written to the file.
Please modify this example for your purposes.
This message will not appear again.
DDDD
Done!

[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_33) no response packet - AssertionError: bool(buff)
in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_30) packet parse error - EnvironmentError: IOError: Expected packet index: 28 Received index: 29
[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) packet parse error - EnvironmentError: IOError: Expected packet index: 566 Received index: 567
Performance within a VM is often very poor.  If you replace the output file with "/dev/null", ,does this change the behavior?

  1. What should I do in order to fix this?

  2. I tried the fm_receiver flowgraph in GNU Radio, it was running successfully but when I tune the frequency there is nothing I could hear except the first 5 seconds noise!
    That would be a question for the discuss-gnuradio mailing list.

  3. I also tried the example 'Spectrum Analyzer' grc program, it was also running without error but there was not much changes/effects when I tune the frequency! Is there something wrong in receiver?
    What gain setting did you use?  What kind of antenna on the antenna port?

Thank you in advance!

Regards,
Thangz

Hello Marcus, 1. So, this looks increasingly like your *network* interface is dropping frames. TO confirm--this is still under a VM, or on actual hardware? Yes, it is a seperate laptop which runs only ubuntu as main OS. What type of Ethernet interface are you using--USB-to-Ethernet devices are known to not work very well because they cannot sustain high rates, and often *reorder* frames on the wire. What kind of cabling are you using? Have you tried replacing that cabling? Now I removed the USB to Ethernet adapter and connected the ethernet cable (CAT5E 350MHz cable) directly into laptop! Also, I'll note that the default master_clock_rate on the N320 is 245.76MHz, which means that your requested 5.0Msps sample rate cannot be precisely supported. You can specify "master_clock_rate=200e6" in the device arguments to request that as a master clock rate, which will allow a 5Msps sample rate. Done! Also, the gain range on N320 goes up to 75dB, which means unless you have a VERY strong signal, a gain setting of 20dB will likely produce noisy/non-existent results. There is strong signal in 868MHz frequency, but still there is no capture file created by the UHD example program! Console logs: komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat Creating the usrp device with: master_clock_rate=200e6... [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.178.61,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2,master_clock_rate=200e6 [WARNING] [MPM.RPCServer] A timeout event occured! [INFO] [MPM.PeriphManager] init() called with device args `product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'. [INFO] [MPM.Rhodium-0] init() called with args `product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6' [INFO] [MPM.Rhodium-1] init() called with args `product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6' . . . Setting RX Rate: 5.000000 Msps... Actual RX Rate: 5.000000 Msps... Setting RX Freq: 868.000000 MHz... Setting RX LO Offset: 0.000000 MHz... Actual RX Freq: 868.000000 MHz... Setting RX Gain: 20.000000 dB... Actual RX Gain: 20.000000 dB... Waiting for "lo_locked": ++++++++++ locked. Press Ctrl + C to stop streaming... Done! (but no file created) 2. Regarding the Spectrum Analyzer Program, I reduced the sample rate to 2MHz, then it worked perfectly and the fluctuations in the graph were seen clearly without any stop! I also check the uhd_fft program which worked perfectly too! 3. Regarding the FM receiver flowgraph,I tried tuning various FM channel frequencies (88-108 MHz) and gains, but there is no effect other than the noisy sound (always). What should I do to build a FM receiver application using N320 and which antenna should I use (please suggest for multipurpose too)? [cid:image005.png@01D7C058.9FC3BFE0] PS: I followed the gnuradio tutorial on usrp fm receiver Looking forward to your kind response :) Regards, Thangaraj Von: Marcus D. Leech <patchvonbraun@gmail.com> Gesendet: Dienstag, 12. Oktober 2021 17:03 An: Thangaraj Mukara Dhakshinamoorthy <thangaraj@komro.net>; usrp-users@lists.ettus.com Betreff: Re: AW: UHD example rx_samples_to_file fails On 2021-10-12 5:46 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: Hello Marcus, My system config (changed my working environment): OS: Ubuntu 20.04.3 LTS OS Type: 64-bit RAM: 3.8 GB Processor: Intel Core i5-2450M CPU @2.50GHz x4 UHD version: 3.15.0.0 GNU Radio version: 3.8.1.0 SDR Device: Ettus USRP N320 My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) 1. Performance within a VM is often very poor. If you replace the output file with "/dev/null", ,does this change the behavior? komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 /dev/null Creating the usrp device with: ... [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 [WARNING] [MPM.RPCServer] A timeout event occured! [WARNING] [MPM.RPCServer] Attempt to read logs without valid claim from 192.168.10.1 . . . Setting RX Rate: 5.000000 Msps... [WARNING] [RFNOC] The requested decimation is odd; the user should expect passband CIC rolloff. Select an even decimation to ensure that a halfband filter is enabled. Decimations factorable by 4 will enable 2 halfbands, those factorable by 8 will enable 3 halfbands. decimation = dsp_rate/samp_rate -> 49 = (245.760000 MHz)/(5.000000 MHz) Actual RX Rate: 5.015510 Msps... Setting RX Freq: 98.000000 MHz... Setting RX LO Offset: 0.000000 MHz... [WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate: Target sample rate: 5.000000 MSps Actual sample rate: 5.015510 MSps Actual RX Freq: 98.000000 MHz... Setting RX Gain: 20.000000 dB... Actual RX Gain: 20.000000 dB... Waiting for "lo_locked": ++++++++++ locked. Press Ctrl + C to stop streaming... DGot an overflow indication. Please consider the following: Your write medium must sustain a rate of 20.062041MB/s. Dropped samples will not be written to the file. Please modify this example for your purposes. This message will not appear again. D Done! So, this looks increasingly like your *network* interface is dropping frames. TO confirm--this is still under a VM, or on actual hardware? What type of Ethernet interface are you using--USB-to-Ethernet devices are known to not work very well because they cannot sustain high rates, and often *reorder* frames on the wire. What kind of cabling are you using? Have you tried replacing that cabling? Also, I'll note that the default master_clock_rate on the N320 is 245.76MHz, which means that your requested 5.0Msps sample rate cannot be precisely supported. You can specify "master_clock_rate=200e6" in the device arguments to request that as a master clock rate, which will allow a 5Msps sample rate. Also, the gain range on N320 goes up to 75dB, which means unless you have a VERY strong signal, a gain setting of 20dB will likely produce noisy/non-existent results. 2. What gain settings did you use? [cid:image001.png@01D7C056.3910C600] [cid:image002.png@01D7C056.3910C600] 3. What kind of antenna on the antenna port? Antenna Techincal Information Manufacturer RF Solutions PART ANT-8WHIP3H-SMA TYPE 90DEG HINGED WHIP FREQUENCY 868MHz CONNECTOR SMA FORM HINGED WHIP DB GAIN +3dBi OP TEMPERATURE -40 to +70oC 4. Now when I ran the above spectrum analyzer flowgraph, I receive the runtime error as shown below: <<< Welcome to GNU Radio Companion 3.8.1.0 >>> Block paths: /usr/share/gnuradio/grc/blocks Loading: "/home/komro/usrp_spectrum_analyzer.grc" >>> Done Generating: '/home/komro/usrp_spectrum_analyzer.py' Executing: /usr/bin/python3 -u /home/komro/usrp_spectrum_analyzer.py Warning: failed to XInitThreads() [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 [INFO] [MPM.PeriphManager] init() called with device args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'. [INFO] [MPM.Rhodium-0] init() called with args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2' [INFO] [MPM.Rhodium-1] init() called with args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2' [INFO] [0/Replay_0] Initializing block control (NOC ID: 0x4E91A00000000004) [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff) in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 [ERROR] [MPMD] Failure during block enumeration: EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff) in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 Traceback (most recent call last): File "/home/komro/usrp_spectrum_analyzer.py", line 192, in <module> main() File "/home/komro/usrp_spectrum_analyzer.py", line 170, in main tb = top_block_cls() File "/home/komro/usrp_spectrum_analyzer.py", line 91, in __init__ self.uhd_usrp_source_0 = uhd.usrp_source( File "/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py", line 125, in constructor_interceptor return old_constructor(*args) File "/usr/lib/python3/dist-packages/gnuradio/uhd/uhd_swig.py", line 2787, in make return _uhd_swig.usrp_source_make(device_addr, stream_args, issue_stream_cmd_on_start) RuntimeError: RuntimeError: Failed to run enumerate_rfnoc_blocks() What is the problem here? PS: I can still ping the USRP device successfully! The fact that you got "no response packet" again indicates a network-layer issue. Also, I'll note that an antenna designed for 800MHz to 1GHz will be next-to-useless for the FM band. Also, there's a simple spectrum analyser application, uhd_fft, that comes with the Gnu Radio installation on Ubuntu. Looking forward to your kind response. Regards, Thangz Von: Marcus D. Leech <patchvonbraun@gmail.com><mailto:patchvonbraun@gmail.com> Gesendet: Montag, 11. Oktober 2021 18:08 An: Thangaraj Mukara Dhakshinamoorthy <thangaraj@komro.net><mailto:thangaraj@komro.net>; usrp-users@lists.ettus.com<mailto:usrp-users@lists.ettus.com> Betreff: Re: UHD example rx_samples_to_file fails On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: Hello Everyone, My system config: Host OS: Windows 10 Guest OS: VirtualBox Ubuntu 20.04.3 LTS UHD version: 3.15.0.0 GNU Radio version: 3.8.1.0 SDR Device : Ettus USRP N320 My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) Console logs: komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat Creating the usrp device with: ... [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 [INFO] [MPM.PeriphManager] init() called with device args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'. [INFO] [MPM.Rhodium-0] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' [INFO] [MPM.Rhodium-1] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' . . . . [WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate: Target sample rate: 5.000000 MSps Actual sample rate: 5.015510 MSps Actual RX Rate: 5.015510 Msps... Setting RX Freq: 98.000000 MHz... Setting RX LO Offset: 0.000000 MHz... Actual RX Freq: 98.000000 MHz... Setting RX Gain: 20.000000 dB... Actual RX Gain: 20.000000 dB... Waiting for "lo_locked": ++++++++++ locked. Press Ctrl + C to stop streaming... DGot an overflow indication. Please consider the following: Your write medium must sustain a rate of 20.062041MB/s. Dropped samples will not be written to the file. Please modify this example for your purposes. This message will not appear again. DDDD Done! [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_33) no response packet - AssertionError: bool(buff) in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_30) packet parse error - EnvironmentError: IOError: Expected packet index: 28 Received index: 29 [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) packet parse error - EnvironmentError: IOError: Expected packet index: 566 Received index: 567 Performance within a VM is often very poor. If you replace the output file with "/dev/null", ,does this change the behavior? 1. What should I do in order to fix this? 2. I tried the fm_receiver flowgraph in GNU Radio, it was running successfully but when I tune the frequency there is nothing I could hear except the first 5 seconds noise! That would be a question for the discuss-gnuradio mailing list. 3. I also tried the example 'Spectrum Analyzer' grc program, it was also running without error but there was not much changes/effects when I tune the frequency! Is there something wrong in receiver? What gain setting did you use? What kind of antenna on the antenna port? Thank you in advance! Regards, Thangz
MD
Marcus D. Leech
Wed, Oct 13, 2021 3:49 PM

On 2021-10-13 11:34 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:

Hello Marcus,

1.So, this looks increasingly like your network interface is
dropping frames.  TO confirm--this is still under a VM, or on
  actual hardware?
Yes, it is a seperate laptop which runs only ubuntu as main OS.
What type of Ethernet interface are you using--USB-to-Ethernet devices
are known to not work very well because they cannot
 sustain high rates, and often reorder frames on the wire.   What
kind of cabling are you using?  Have you tried replacing that
  cabling?

Now I removed the USB to Ethernet adapter and connected the ethernet
cable (CAT5E 350MHz cable) directly into laptop!

Also, I'll note that the default master_clock_rate on the N320 is
245.76MHz, which means that your requested 5.0Msps
  sample rate cannot be precisely supported.  You can specify
"master_clock_rate=200e6" in the device arguments to
  request that as a master clock rate, which will allow a 5Msps sample
rate.
Done!
Also, the gain range on N320 goes up to 75dB, which means unless you
have a VERY strong signal, a gain setting of
 20dB will likely produce noisy/non-existent results.
There is strong signal in 868MHz frequency, but still there is no
capture file created by the UHD example program!

Console logs:

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$
./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6
--rate 5e6 --gain 20 --duration 10 usrp_samples.dat

Creating the usrp device with: master_clock_rate=200e6...

[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100;
UHD_3.15.0.0-2build5

[INFO] [MPMD] Initializing 1 device(s) in parallel with args:
mgmt_addr=192.168.178.61,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2,master_clock_rate=200e6

[WARNING] [MPM.RPCServer] A timeout event occured!

[INFO] [MPM.PeriphManager] init() called with device args
`product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'.

[INFO] [MPM.Rhodium-0] init() called with args
`product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'

[INFO] [MPM.Rhodium-1] init() called with args
`product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'

.

.

.

Setting RX Rate: 5.000000 Msps...

Actual RX Rate: 5.000000 Msps...

Setting RX Freq: 868.000000 MHz...

Setting RX LO Offset: 0.000000 MHz...

Actual RX Freq: 868.000000 MHz...

Setting RX Gain: 20.000000 dB...

Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...

Done!

(but no file created)

TRy a longer duration?  Are you doing this in a directory where you have
write permission?

2.Regarding the Spectrum Analyzer Program, I reduced the sample rate
to 2MHz, then it worked perfectly and the fluctuations in the graph
were seen clearly without any stop! I also check the uhd_fft program
which worked perfectly too!

3.Regarding the FM receiver flowgraph,I tried tuning various FM
channel frequencies (88-108 MHz) and gains, but there is no effect
other than the noisy sound (always). What should I do to build a FM
receiver application using N320 and which antenna should I use (please
suggest for multipurpose too)?

Antennas are generally frequency-specific devices, so an antenna that is
good for UHF is likely not going to work for the low end of VHF, where
the FM band is.

You might look into a "discone" antenna, since they have broad, if
somewhat inefficient, coverage.

Can you use "uhd_fft" to confirm (or not) that you're receiving signals
on the FM band?  Do different gain settings help?

In general, asking "why does my flow-graph not work" questions belong on
the discuss-gnuradio mailing list, not here.

PS: I followed the gnuradio tutorial on usrp fm receiver

Looking forward to your kind response J

Regards,

Thangaraj

*Von:*Marcus D. Leech patchvonbraun@gmail.com
Gesendet: Dienstag, 12. Oktober 2021 17:03
An: Thangaraj Mukara Dhakshinamoorthy thangaraj@komro.net;
usrp-users@lists.ettus.com
Betreff: Re: AW: UHD example rx_samples_to_file fails

On 2021-10-12 5:46 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:

 Hello Marcus,

 *_My system config (changed my working environment):_*

 OS: Ubuntu 20.04.3 LTS

 OS Type: 64-bit

 RAM: 3.8 GB

 Processor: Intel Core i5-2450M CPU @2.50GHz x4

 UHD version: 3.15.0.0

 GNU Radio version: 3.8.1.0

 SDR Device: Ettus USRP N320

 My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

 1.Performance within a VM is often very poor.  If you replace the
 output file with "/dev/null", ,does this change the behavior?

 komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$
 ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration
 10  /dev/null

 Creating the usrp device with: ...

 [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100;
 UHD_3.15.0.0-2build5

 [INFO] [MPMD] Initializing 1 device(s) in parallel with args:
 mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2

 [WARNING] [MPM.RPCServer] A timeout event occured!

 [WARNING] [MPM.RPCServer] Attempt to read logs without valid claim
 from 192.168.10.1

 .

 .

 .

 Setting RX Rate: 5.000000 Msps...

 [WARNING] [RFNOC] The requested decimation is odd; the user should
 expect passband CIC rolloff.

 Select an even decimation to ensure that a halfband filter is enabled.

 Decimations factorable by 4 will enable 2 halfbands, those
 factorable by 8 will enable 3 halfbands.

 decimation = dsp_rate/samp_rate -> 49 = (245.760000 MHz)/(5.000000
 MHz)

 Actual RX Rate: 5.015510 Msps...

 Setting RX Freq: 98.000000 MHz...

 Setting RX LO Offset: 0.000000 MHz...

 [WARNING] [MULTI_USRP] The hardware does not support the requested
 RX sample rate:

 Target sample rate: 5.000000 MSps

 Actual sample rate: 5.015510 MSps

 Actual RX Freq: 98.000000 MHz...

 Setting RX Gain: 20.000000 dB...

 Actual RX Gain: 20.000000 dB...

 Waiting for "lo_locked": ++++++++++ locked.

 Press Ctrl + C to stop streaming...

 DGot an overflow indication. Please consider the following:

   Your write medium must sustain a rate of 20.062041MB/s.

   Dropped samples will not be written to the file.

   Please modify this example for your purposes.

   This message will not appear again.

 D

 Done!

So, this looks increasingly like your network interface is dropping
frames.  TO confirm--this is still under a VM, or on
  actual hardware?

What type of Ethernet interface are you using--USB-to-Ethernet devices
are known to not work very well because they cannot
 sustain high rates, and often reorder frames on the wire.   What
kind of cabling are you using?  Have you tried replacing that
  cabling?

Also, I'll note that the default master_clock_rate on the N320 is
245.76MHz, which means that your requested 5.0Msps
  sample rate cannot be precisely supported.  You can specify
"master_clock_rate=200e6" in the device arguments to
  request that as a master clock rate, which will allow a 5Msps sample
rate.

Also, the gain range on N320 goes up to 75dB, which means unless you
have a VERY strong signal, a gain setting of
 20dB will likely produce noisy/non-existent results.

 2.What gain settings did you use?

 3.What kind of antenna on the antenna port?
 *Antenna Techincal Information*

 Manufacturer              RF Solutions

 PART                      ANT-8WHIP3H-SMA

 TYPE                      90DEG HINGED WHIP

 FREQUENCY 868MHz

 CONNECTOR            SMA

 FORM                      HINGED WHIP

 DB GAIN                       +3dBi

 OP TEMPERATURE         -40 to +70oC

 4.Now when I ran the above spectrum analyzer flowgraph, I receive
 the runtime error as shown below:

 <<< Welcome to GNU Radio Companion 3.8.1.0 >>>

 Block paths:

 /usr/share/gnuradio/grc/blocks

 Loading: "/home/komro/usrp_spectrum_analyzer.grc"

Done

 Generating: '/home/komro/usrp_spectrum_analyzer.py'

 Executing: /usr/bin/python3 -u /home/komro/usrp_spectrum_analyzer.py

 Warning: failed to XInitThreads()

 [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100;
 UHD_3.15.0.0-2build5

 [INFO] [MPMD] Initializing 1 device(s) in parallel with args:
 mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2

 [INFO] [MPM.PeriphManager] init() called with device args
 `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'.

 [INFO] [MPM.Rhodium-0] init() called with args
 `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'

 [INFO] [MPM.Rhodium-1] init() called with args
 `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'

 [INFO] [0/Replay_0] Initializing block control (NOC ID:
 0x4E91A00000000004)

 [ERROR] [UHD] Exception caught in safe-call.

   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with
 uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]

   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50

 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError:
 Block ctrl (CE_01_Port_40) no response packet - AssertionError:
 bool(buff)

   in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool,
 double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG;
 uint64_t = long unsigned int]

   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

 [ERROR] [MPMD] Failure during block enumeration: EnvironmentError:
 IOError: Block ctrl (CE_01_Port_40) no response packet -
 AssertionError: bool(buff)

   in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool,
 double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG;
 uint64_t = long unsigned int]

   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

 Traceback (most recent call last):

   File "/home/komro/usrp_spectrum_analyzer.py", line 192, in <module>

     main()

   File "/home/komro/usrp_spectrum_analyzer.py", line 170, in main

     tb = top_block_cls()

   File "/home/komro/usrp_spectrum_analyzer.py", line 91, in __init__

 self.uhd_usrp_source_0 = uhd.usrp_source(

   File "/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py",
 line 125, in constructor_interceptor

     return old_constructor(*args)

   File "/usr/lib/python3/dist-packages/gnuradio/uhd/uhd_swig.py",
 line 2787, in make

     return _uhd_swig.usrp_source_make(device_addr, stream_args,
 issue_stream_cmd_on_start)

 RuntimeError: RuntimeError: Failed to run enumerate_rfnoc_blocks()

 What is the problem here?

 PS: I can still ping the USRP device successfully!

The fact that you got "no response packet" again indicates a
network-layer issue.

Also, I'll note that an antenna designed for 800MHz to 1GHz will be
next-to-useless for the FM
  band.

Also, there's a simple spectrum analyser application, uhd_fft, that
comes with the Gnu Radio installation
  on Ubuntu.

 Looking forward to your kind response.

 Regards,

 Thangz

 *Von:*Marcus D. Leech <patchvonbraun@gmail.com>
 <mailto:patchvonbraun@gmail.com>
 *Gesendet:* Montag, 11. Oktober 2021 18:08
 *An:* Thangaraj Mukara Dhakshinamoorthy <thangaraj@komro.net>
 <mailto:thangaraj@komro.net>; usrp-users@lists.ettus.com
 <mailto:usrp-users@lists.ettus.com>
 *Betreff:* Re: UHD example rx_samples_to_file fails

 On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:

     Hello Everyone,

     *_My system config:_*

     Host OS: Windows 10

     Guest OS: VirtualBox Ubuntu 20.04.3 LTS

     UHD version: 3.15.0.0

     GNU Radio version: 3.8.1.0

     SDR Device : Ettus USRP N320

     My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

     Console logs:

     komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$
     ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20
     --duration 10 usrp_samples.dat

     Creating the usrp device with: ...

     [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304;
     Boost_107100; UHD_3.15.0.0-2build5

     [INFO] [MPMD] Initializing 1 device(s) in parallel with args:
     mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2

     [INFO] [MPM.PeriphManager] init() called with device args
     `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'.

     [INFO] [MPM.Rhodium-0] init() called with args
     `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'

     [INFO] [MPM.Rhodium-1] init() called with args
     `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'

     .

     .

     .

     .

     [WARNING] [MULTI_USRP] The hardware does not support the
     requested RX sample rate:

     Target sample rate: 5.000000 MSps

     Actual sample rate: 5.015510 MSps

     Actual RX Rate: 5.015510 Msps...

     Setting RX Freq: 98.000000 MHz...

     Setting RX LO Offset: 0.000000 MHz...

     Actual RX Freq: 98.000000 MHz...

     Setting RX Gain: 20.000000 dB...

     Actual RX Gain: 20.000000 dB...

     Waiting for "lo_locked": ++++++++++ locked.

     Press Ctrl + C to stop streaming...

     DGot an overflow indication. Please consider the following:

       Your write medium must sustain a rate of 20.062041MB/s.

       Dropped samples will not be written to the file.

       Please modify this example for your purposes.

       This message will not appear again.

     DDDD

     Done!

     [ERROR] [UHD] Exception caught in safe-call.

       in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with
     uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]

       at
     /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50

     this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError:
     Block ctrl (CE_00_Port_33) no response packet -
     AssertionError: bool(buff)

       in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool,
     double) [with uhd::endianness_t _endianness =
     uhd::ENDIANNESS_BIG; uint64_t = long unsigned int]

       at
     /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

     [ERROR] [UHD] Exception caught in safe-call.

       in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with
     uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]

       at
     /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50

     this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError:
     Block ctrl (CE_00_Port_30) packet parse error -
     EnvironmentError: IOError: Expected packet index: 28 Received
     index: 29

     [ERROR] [UHD] Exception caught in safe-call.

       in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with
     uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]

       at
     /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50

     this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError:
     Block ctrl (CE_01_Port_40) packet parse error -
     EnvironmentError: IOError: Expected packet index: 566 Received
     index: 567

 Performance within a VM is often very poor.  If you replace the
 output file with "/dev/null", ,does this change the behavior?




     1. What should I do in order to fix this?

     2. I tried the fm_receiver flowgraph in GNU Radio, it was
     running successfully but when I tune the frequency there is
     nothing I could hear except the first 5 seconds noise!

 That would be a question for the discuss-gnuradio mailing list.



     3. I also tried the example ‚Spectrum Analyzer‘ grc program,
     it was also running without error but there was not much
     changes/effects when I tune the frequency! Is there something
     wrong in receiver?

 What gain setting did you use?  What kind of antenna on the
 antenna port?




     Thank you in advance!

     Regards,

     Thangz
On 2021-10-13 11:34 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: > > Hello Marcus, > > 1.So, this looks increasingly like your *network* interface is > dropping frames.  TO confirm--this is still under a VM, or on >   actual hardware? > Yes, it is a seperate laptop which runs only ubuntu as main OS. > What type of Ethernet interface are you using--USB-to-Ethernet devices > are known to not work very well because they cannot >  sustain high rates, and often *reorder* frames on the wire.   What > kind of cabling are you using?  Have you tried replacing that >   cabling? > > Now I removed the USB to Ethernet adapter and connected the ethernet > cable (*CAT5E 350MHz cable*) directly into laptop! > > Also, I'll note that the default master_clock_rate on the N320 is > 245.76MHz, which means that your requested 5.0Msps >   sample rate cannot be precisely supported.  You can specify > "master_clock_rate=200e6" in the device arguments to >   request that as a master clock rate, which will allow a 5Msps sample > rate. > Done! > Also, the gain range on N320 goes up to 75dB, which means unless you > have a VERY strong signal, a gain setting of >  20dB will likely produce noisy/non-existent results. > There is strong signal in 868MHz frequency, but still there is no > capture file created by the UHD example program! > > _Console logs:_ > > komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ > ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 > --rate 5e6 --gain 20 --duration 10 usrp_samples.dat > > Creating the usrp device with: master_clock_rate=200e6... > > [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; > UHD_3.15.0.0-2build5 > > [INFO] [MPMD] Initializing 1 device(s) in parallel with args: > mgmt_addr=192.168.178.61,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2,master_clock_rate=200e6 > > [WARNING] [MPM.RPCServer] A timeout event occured! > > [INFO] [MPM.PeriphManager] init() called with device args > `product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'. > > [INFO] [MPM.Rhodium-0] init() called with args > `product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6' > > [INFO] [MPM.Rhodium-1] init() called with args > `product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6' > > . > > . > > . > > Setting RX Rate: 5.000000 Msps... > > Actual RX Rate: 5.000000 Msps... > > Setting RX Freq: 868.000000 MHz... > > Setting RX LO Offset: 0.000000 MHz... > > Actual RX Freq: 868.000000 MHz... > > Setting RX Gain: 20.000000 dB... > > Actual RX Gain: 20.000000 dB... > > Waiting for "lo_locked": ++++++++++ locked. > > Press Ctrl + C to stop streaming... > > Done! > > (but no file created) > TRy a longer duration?  Are you doing this in a directory where you have write permission? > 2.Regarding the Spectrum Analyzer Program, I reduced the sample rate > to 2MHz, then it worked perfectly and the fluctuations in the graph > were seen clearly without any stop! I also check the uhd_fft program > which worked perfectly too! > > 3.Regarding the FM receiver flowgraph,I tried tuning various FM > channel frequencies (88-108 MHz) and gains, but there is no effect > other than the noisy sound (always). What should I do to build a FM > receiver application using N320 and which antenna should I use (please > suggest for multipurpose too)? > Antennas are generally frequency-specific devices, so an antenna that is good for UHF is likely not going to work for the low end of VHF, where the FM band is. You might look into a "discone" antenna, since they have broad, if somewhat inefficient, coverage. Can you use "uhd_fft" to confirm (or not) that you're receiving signals on the FM band?  Do different gain settings help? In general, asking "why does my flow-graph not work" questions belong on the discuss-gnuradio mailing list, not here. > > > > > > PS: I followed the gnuradio tutorial on usrp fm receiver > > Looking forward to your kind response J > > Regards, > > Thangaraj > > *Von:*Marcus D. Leech <patchvonbraun@gmail.com> > *Gesendet:* Dienstag, 12. Oktober 2021 17:03 > *An:* Thangaraj Mukara Dhakshinamoorthy <thangaraj@komro.net>; > usrp-users@lists.ettus.com > *Betreff:* Re: AW: UHD example rx_samples_to_file fails > > On 2021-10-12 5:46 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: > > Hello Marcus, > > *_My system config (changed my working environment):_* > > OS: Ubuntu 20.04.3 LTS > > OS Type: 64-bit > > RAM: 3.8 GB > > Processor: Intel Core i5-2450M CPU @2.50GHz x4 > > UHD version: 3.15.0.0 > > GNU Radio version: 3.8.1.0 > > SDR Device: Ettus USRP N320 > > My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) > > 1.Performance within a VM is often very poor.  If you replace the > output file with "/dev/null", ,does this change the behavior? > > komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ > ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration > 10  /dev/null > > Creating the usrp device with: ... > > [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; > UHD_3.15.0.0-2build5 > > [INFO] [MPMD] Initializing 1 device(s) in parallel with args: > mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 > > [WARNING] [MPM.RPCServer] A timeout event occured! > > [WARNING] [MPM.RPCServer] Attempt to read logs without valid claim > from 192.168.10.1 > > . > > . > > . > > Setting RX Rate: 5.000000 Msps... > > [WARNING] [RFNOC] The requested decimation is odd; the user should > expect passband CIC rolloff. > > Select an even decimation to ensure that a halfband filter is enabled. > > Decimations factorable by 4 will enable 2 halfbands, those > factorable by 8 will enable 3 halfbands. > > decimation = dsp_rate/samp_rate -> 49 = (245.760000 MHz)/(5.000000 > MHz) > > Actual RX Rate: 5.015510 Msps... > > Setting RX Freq: 98.000000 MHz... > > Setting RX LO Offset: 0.000000 MHz... > > [WARNING] [MULTI_USRP] The hardware does not support the requested > RX sample rate: > > Target sample rate: 5.000000 MSps > > Actual sample rate: 5.015510 MSps > > Actual RX Freq: 98.000000 MHz... > > Setting RX Gain: 20.000000 dB... > > Actual RX Gain: 20.000000 dB... > > Waiting for "lo_locked": ++++++++++ locked. > > Press Ctrl + C to stop streaming... > > DGot an overflow indication. Please consider the following: > >   Your write medium must sustain a rate of 20.062041MB/s. > >   Dropped samples will not be written to the file. > >   Please modify this example for your purposes. > >   This message will not appear again. > > D > > Done! > > So, this looks increasingly like your *network* interface is dropping > frames.  TO confirm--this is still under a VM, or on >   actual hardware? > > What type of Ethernet interface are you using--USB-to-Ethernet devices > are known to not work very well because they cannot >  sustain high rates, and often *reorder* frames on the wire.   What > kind of cabling are you using?  Have you tried replacing that >   cabling? > > Also, I'll note that the default master_clock_rate on the N320 is > 245.76MHz, which means that your requested 5.0Msps >   sample rate cannot be precisely supported.  You can specify > "master_clock_rate=200e6" in the device arguments to >   request that as a master clock rate, which will allow a 5Msps sample > rate. > > Also, the gain range on N320 goes up to 75dB, which means unless you > have a VERY strong signal, a gain setting of >  20dB will likely produce noisy/non-existent results. > > > 2.What gain settings did you use? > > 3.What kind of antenna on the antenna port? > *Antenna Techincal Information* > > Manufacturer              RF Solutions > > PART                      ANT-8WHIP3H-SMA > > TYPE                      90DEG HINGED WHIP > > FREQUENCY 868MHz > > CONNECTOR            SMA > > FORM                      HINGED WHIP > > DB GAIN                       +3dBi > > OP TEMPERATURE         -40 to +70oC > > 4.Now when I ran the above spectrum analyzer flowgraph, I receive > the runtime error as shown below: > > <<< Welcome to GNU Radio Companion 3.8.1.0 >>> > > Block paths: > > /usr/share/gnuradio/grc/blocks > > Loading: "/home/komro/usrp_spectrum_analyzer.grc" > > >>> Done > > Generating: '/home/komro/usrp_spectrum_analyzer.py' > > Executing: /usr/bin/python3 -u /home/komro/usrp_spectrum_analyzer.py > > Warning: failed to XInitThreads() > > [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; > UHD_3.15.0.0-2build5 > > [INFO] [MPMD] Initializing 1 device(s) in parallel with args: > mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 > > [INFO] [MPM.PeriphManager] init() called with device args > `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'. > > [INFO] [MPM.Rhodium-0] init() called with args > `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2' > > [INFO] [MPM.Rhodium-1] init() called with args > `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2' > > [INFO] [0/Replay_0] Initializing block control (NOC ID: > 0x4E91A00000000004) > > [ERROR] [UHD] Exception caught in safe-call. > >   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with > uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 > > this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: > Block ctrl (CE_01_Port_40) no response packet - AssertionError: > bool(buff) > >   in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, > double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; > uint64_t = long unsigned int] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 > > [ERROR] [MPMD] Failure during block enumeration: EnvironmentError: > IOError: Block ctrl (CE_01_Port_40) no response packet - > AssertionError: bool(buff) > >   in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, > double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; > uint64_t = long unsigned int] > >   at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 > > Traceback (most recent call last): > >   File "/home/komro/usrp_spectrum_analyzer.py", line 192, in <module> > >     main() > >   File "/home/komro/usrp_spectrum_analyzer.py", line 170, in main > >     tb = top_block_cls() > >   File "/home/komro/usrp_spectrum_analyzer.py", line 91, in __init__ > > self.uhd_usrp_source_0 = uhd.usrp_source( > >   File "/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py", > line 125, in constructor_interceptor > >     return old_constructor(*args) > >   File "/usr/lib/python3/dist-packages/gnuradio/uhd/uhd_swig.py", > line 2787, in make > >     return _uhd_swig.usrp_source_make(device_addr, stream_args, > issue_stream_cmd_on_start) > > RuntimeError: RuntimeError: Failed to run enumerate_rfnoc_blocks() > > What is the problem here? > > PS: I can still ping the USRP device successfully! > > The fact that you got "no response packet" again indicates a > network-layer issue. > > Also, I'll note that an antenna designed for 800MHz to 1GHz will be > next-to-useless for the FM >   band. > > Also, there's a simple spectrum analyser application, uhd_fft, that > comes with the Gnu Radio installation >   on Ubuntu. > > > > Looking forward to your kind response. > > Regards, > > Thangz > > *Von:*Marcus D. Leech <patchvonbraun@gmail.com> > <mailto:patchvonbraun@gmail.com> > *Gesendet:* Montag, 11. Oktober 2021 18:08 > *An:* Thangaraj Mukara Dhakshinamoorthy <thangaraj@komro.net> > <mailto:thangaraj@komro.net>; usrp-users@lists.ettus.com > <mailto:usrp-users@lists.ettus.com> > *Betreff:* Re: UHD example rx_samples_to_file fails > > On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: > > Hello Everyone, > > *_My system config:_* > > Host OS: Windows 10 > > Guest OS: VirtualBox Ubuntu 20.04.3 LTS > > UHD version: 3.15.0.0 > > GNU Radio version: 3.8.1.0 > > SDR Device : Ettus USRP N320 > > My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) > > Console logs: > > komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ > ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 > --duration 10 usrp_samples.dat > > Creating the usrp device with: ... > > [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; > Boost_107100; UHD_3.15.0.0-2build5 > > [INFO] [MPMD] Initializing 1 device(s) in parallel with args: > mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 > > [INFO] [MPM.PeriphManager] init() called with device args > `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'. > > [INFO] [MPM.Rhodium-0] init() called with args > `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' > > [INFO] [MPM.Rhodium-1] init() called with args > `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' > > . > > . > > . > > . > > [WARNING] [MULTI_USRP] The hardware does not support the > requested RX sample rate: > > Target sample rate: 5.000000 MSps > > Actual sample rate: 5.015510 MSps > > Actual RX Rate: 5.015510 Msps... > > Setting RX Freq: 98.000000 MHz... > > Setting RX LO Offset: 0.000000 MHz... > > Actual RX Freq: 98.000000 MHz... > > Setting RX Gain: 20.000000 dB... > > Actual RX Gain: 20.000000 dB... > > Waiting for "lo_locked": ++++++++++ locked. > > Press Ctrl + C to stop streaming... > > DGot an overflow indication. Please consider the following: > >   Your write medium must sustain a rate of 20.062041MB/s. > >   Dropped samples will not be written to the file. > >   Please modify this example for your purposes. > >   This message will not appear again. > > DDDD > > Done! > > [ERROR] [UHD] Exception caught in safe-call. > >   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with > uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] > >   at > /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 > > this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: > Block ctrl (CE_00_Port_33) no response packet - > AssertionError: bool(buff) > >   in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, > double) [with uhd::endianness_t _endianness = > uhd::ENDIANNESS_BIG; uint64_t = long unsigned int] > >   at > /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 > > [ERROR] [UHD] Exception caught in safe-call. > >   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with > uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] > >   at > /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 > > this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: > Block ctrl (CE_00_Port_30) packet parse error - > EnvironmentError: IOError: Expected packet index: 28 Received > index: 29 > > [ERROR] [UHD] Exception caught in safe-call. > >   in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with > uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] > >   at > /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 > > this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: > Block ctrl (CE_01_Port_40) packet parse error - > EnvironmentError: IOError: Expected packet index: 566 Received > index: 567 > > Performance within a VM is often very poor.  If you replace the > output file with "/dev/null", ,does this change the behavior? > > > > > 1. What should I do in order to fix this? > > 2. I tried the fm_receiver flowgraph in GNU Radio, it was > running successfully but when I tune the frequency there is > nothing I could hear except the first 5 seconds noise! > > That would be a question for the discuss-gnuradio mailing list. > > > > 3. I also tried the example ‚Spectrum Analyzer‘ grc program, > it was also running without error but there was not much > changes/effects when I tune the frequency! Is there something > wrong in receiver? > > What gain setting did you use?  What kind of antenna on the > antenna port? > > > > > Thank you in advance! > > Regards, > > Thangz >
TM
Thangaraj Mukara Dhakshinamoorthy
Thu, Oct 14, 2021 9:36 AM

Hello Marcus,

  1.  TRy a longer duration?  Are you doing this in a directory where you have write permission?
    

Yes, I have write permissions to ~/Desktop folder, but still no files were created! Also, longer duration doesn't bring anything!

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 5e6 --gain 20 --duration 30 ~/Desktop/usrp_samples.dat

or

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 2e6 --gain 20 --duration 30 ~/Desktop/usrp_samples.dat

or

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 2e6 --gain 20 --duration 40 ~/Desktop/usrp_samples.dat

or

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 2e6 --gain 20 --duration 20 ~/Desktop/usrp_samples.dat

or

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 2e6 --gain 20 --duration 10 ~/Desktop/usrp_samples.dat

Creating the usrp device with: master_clock_rate=200e6...

[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5

.

.

.

Setting RX Rate: 2.000000 Msps...

Actual RX Rate: 2.000000 Msps...

Setting RX Freq: 868.000000 MHz...

Setting RX LO Offset: 0.000000 MHz...

Actual RX Freq: 868.000000 MHz...

Setting RX Gain: 20.000000 dB...

Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...

Done!

(but no files were created)

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$

  1.  Can you use "uhd_fft" to confirm (or not) that you're receiving signals on the FM band?  Do different gain settings help?
    

Yes, I could receive fm signals using uhd_fft! Changing gains had some effects on signals output too! But couldn't hear anything when I tried the same frequency/gain settings in GNU Radio. Moreover the Gnuradio console outputs 'UaUaUaUaUaUa.....' when the signal is strong and there was some slight variations in the sound, far away from but a step closer to useful FM radio sound!

[cid:image005.png@01D7C0EF.B93DA2A0]

  1.  In general, asking "why does my flow-graph not work" questions belong on the discuss-gnuradio mailing list, not here.
    

Sorry for the trouble, I will do that in future!

Regards,

Thangaraj

Von: Marcus D. Leech patchvonbraun@gmail.com
Gesendet: Mittwoch, 13. Oktober 2021 17:50
An: Thangaraj Mukara Dhakshinamoorthy thangaraj@komro.net; usrp-users@lists.ettus.com
Betreff: Re: AW: AW: UHD example rx_samples_to_file fails

On 2021-10-13 11:34 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:
Hello Marcus,

  1.   So, this looks increasingly like your *network* interface is dropping frames.  TO confirm--this is still under a VM, or on
    

actual hardware?
Yes, it is a seperate laptop which runs only ubuntu as main OS.
What type of Ethernet interface are you using--USB-to-Ethernet devices are known to not work very well because they cannot
sustain high rates, and often reorder frames on the wire.  What kind of cabling are you using?  Have you tried replacing that
cabling?

Now I removed the USB to Ethernet adapter and connected the ethernet cable (CAT5E 350MHz cable) directly into laptop!

Also, I'll note that the default master_clock_rate on the N320 is 245.76MHz, which means that your requested 5.0Msps
sample rate cannot be precisely supported.  You can specify "master_clock_rate=200e6" in the device arguments to
request that as a master clock rate, which will allow a 5Msps sample rate.
Done!
Also, the gain range on N320 goes up to 75dB, which means unless you have a VERY strong signal, a gain setting of
20dB will likely produce noisy/non-existent results.
There is strong signal in 868MHz frequency, but still there is no capture file created by the UHD example program!

Console logs:
komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat

Creating the usrp device with: master_clock_rate=200e6...
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.178.61,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2,master_clock_rate=200e6
[WARNING] [MPM.RPCServer] A timeout event occured!
[INFO] [MPM.PeriphManager] init() called with device args product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'. [INFO] [MPM.Rhodium-0] init() called with args product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'
[INFO] [MPM.Rhodium-1] init() called with args `product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'
.
.
.
Setting RX Rate: 5.000000 Msps...
Actual RX Rate: 5.000000 Msps...

Setting RX Freq: 868.000000 MHz...
Setting RX LO Offset: 0.000000 MHz...
Actual RX Freq: 868.000000 MHz...

Setting RX Gain: 20.000000 dB...
Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...

Done!
(but no file created)
TRy a longer duration?  Are you doing this in a directory where you have write permission?

  1.   Regarding the Spectrum Analyzer Program, I reduced the sample rate to 2MHz, then it worked perfectly and the fluctuations in the graph were seen clearly without any stop! I also check the uhd_fft program which worked perfectly too!
    
  2.   Regarding the FM receiver flowgraph,I tried tuning various FM channel frequencies (88-108 MHz) and gains, but there is no effect other than the noisy sound (always). What should I do to build a FM receiver application using N320 and which antenna should I use (please suggest for multipurpose too)?
    

Antennas are generally frequency-specific devices, so an antenna that is good for UHF is likely not going to work for the low end of VHF, where the FM band is.

You might look into a "discone" antenna, since they have broad, if somewhat inefficient, coverage.

Can you use "uhd_fft" to confirm (or not) that you're receiving signals on the FM band?  Do different gain settings help?

In general, asking "why does my flow-graph not work" questions belong on the discuss-gnuradio mailing list, not here.

[cid:image006.png@01D7C0EF.B93DA2A0]PS: I followed the gnuradio tutorial on usrp fm receiver

Looking forward to your kind response :)

Regards,
Thangaraj

Von: Marcus D. Leech patchvonbraun@gmail.commailto:patchvonbraun@gmail.com
Gesendet: Dienstag, 12. Oktober 2021 17:03
An: Thangaraj Mukara Dhakshinamoorthy thangaraj@komro.netmailto:thangaraj@komro.net; usrp-users@lists.ettus.commailto:usrp-users@lists.ettus.com
Betreff: Re: AW: UHD example rx_samples_to_file fails

On 2021-10-12 5:46 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:
Hello Marcus,

My system config (changed my working environment):
OS: Ubuntu 20.04.3 LTS
OS Type: 64-bit
RAM: 3.8 GB
Processor: Intel Core i5-2450M CPU @2.50GHz x4
UHD version: 3.15.0.0
GNU Radio version: 3.8.1.0
SDR Device: Ettus USRP N320
My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

  1.   Performance within a VM is often very poor.  If you replace the output file with "/dev/null", ,does this change the behavior?
    

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10  /dev/null

Creating the usrp device with: ...
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2
[WARNING] [MPM.RPCServer] A timeout event occured!
[WARNING] [MPM.RPCServer] Attempt to read logs without valid claim from 192.168.10.1
.
.
.

Setting RX Rate: 5.000000 Msps...
[WARNING] [RFNOC] The requested decimation is odd; the user should expect passband CIC rolloff.
Select an even decimation to ensure that a halfband filter is enabled.
Decimations factorable by 4 will enable 2 halfbands, those factorable by 8 will enable 3 halfbands.
decimation = dsp_rate/samp_rate -> 49 = (245.760000 MHz)/(5.000000 MHz)

Actual RX Rate: 5.015510 Msps...

Setting RX Freq: 98.000000 MHz...
Setting RX LO Offset: 0.000000 MHz...
[WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate:
Target sample rate: 5.000000 MSps
Actual sample rate: 5.015510 MSps

Actual RX Freq: 98.000000 MHz...

Setting RX Gain: 20.000000 dB...
Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...
DGot an overflow indication. Please consider the following:
Your write medium must sustain a rate of 20.062041MB/s.
Dropped samples will not be written to the file.
Please modify this example for your purposes.
This message will not appear again.
D
Done!

So, this looks increasingly like your network interface is dropping frames.  TO confirm--this is still under a VM, or on
actual hardware?

What type of Ethernet interface are you using--USB-to-Ethernet devices are known to not work very well because they cannot
sustain high rates, and often reorder frames on the wire.  What kind of cabling are you using?  Have you tried replacing that
cabling?

Also, I'll note that the default master_clock_rate on the N320 is 245.76MHz, which means that your requested 5.0Msps
sample rate cannot be precisely supported.  You can specify "master_clock_rate=200e6" in the device arguments to
request that as a master clock rate, which will allow a 5Msps sample rate.

Also, the gain range on N320 goes up to 75dB, which means unless you have a VERY strong signal, a gain setting of
20dB will likely produce noisy/non-existent results.

  1.   What gain settings did you use?
    

[cid:image003.png@01D7C0EF.B91E5AD0]

[cid:image004.png@01D7C0EF.B91E5AD0]

  1.   What kind of antenna on the antenna port?
    

Antenna Techincal Information
Manufacturer                RF Solutions
PART                            ANT-8WHIP3H-SMA
TYPE                            90DEG HINGED WHIP
FREQUENCY                  868MHz
CONNECTOR                  SMA
FORM                          HINGED WHIP
DB GAIN                      +3dBi
OP TEMPERATURE        -40 to +70oC

  1.   Now when I ran the above spectrum analyzer flowgraph, I receive the runtime error as shown below:
    

<<< Welcome to GNU Radio Companion 3.8.1.0 >>>

Block paths:
/usr/share/gnuradio/grc/blocks

Loading: "/home/komro/usrp_spectrum_analyzer.grc"

Done

Generating: '/home/komro/usrp_spectrum_analyzer.py'

Executing: /usr/bin/python3 -u /home/komro/usrp_spectrum_analyzer.py

Warning: failed to XInitThreads()
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2
[INFO] [MPM.PeriphManager] init() called with device args clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'. [INFO] [MPM.Rhodium-0] init() called with args clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'
[INFO] [MPM.Rhodium-1] init() called with args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'
[INFO] [0/Replay_0] Initializing block control (NOC ID: 0x4E91A00000000004)
[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff)
in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

[ERROR] [MPMD] Failure during block enumeration: EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff)
in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

Traceback (most recent call last):
File "/home/komro/usrp_spectrum_analyzer.py", line 192, in <module>
main()
File "/home/komro/usrp_spectrum_analyzer.py", line 170, in main
tb = top_block_cls()
File "/home/komro/usrp_spectrum_analyzer.py", line 91, in init
self.uhd_usrp_source_0 = uhd.usrp_source(
File "/usr/lib/python3/dist-packages/gnuradio/uhd/init.py", line 125, in constructor_interceptor
return old_constructor(*args)
File "/usr/lib/python3/dist-packages/gnuradio/uhd/uhd_swig.py", line 2787, in make
return _uhd_swig.usrp_source_make(device_addr, stream_args, issue_stream_cmd_on_start)
RuntimeError: RuntimeError: Failed to run enumerate_rfnoc_blocks()

What is the problem here?

PS: I can still ping the USRP device successfully!
The fact that you got "no response packet" again indicates a network-layer issue.

Also, I'll note that an antenna designed for 800MHz to 1GHz will be next-to-useless for the FM
band.

Also, there's a simple spectrum analyser application, uhd_fft, that comes with the Gnu Radio installation
on Ubuntu.

Looking forward to your kind response.

Regards,
Thangz
Von: Marcus D. Leech patchvonbraun@gmail.commailto:patchvonbraun@gmail.com
Gesendet: Montag, 11. Oktober 2021 18:08
An: Thangaraj Mukara Dhakshinamoorthy thangaraj@komro.netmailto:thangaraj@komro.net; usrp-users@lists.ettus.commailto:usrp-users@lists.ettus.com
Betreff: Re: UHD example rx_samples_to_file fails

On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:
Hello Everyone,

My system config:
Host OS: Windows 10
Guest OS: VirtualBox Ubuntu 20.04.3 LTS
UHD version: 3.15.0.0
GNU Radio version: 3.8.1.0
SDR Device : Ettus USRP N320
My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer)

Console logs:

komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat

Creating the usrp device with: ...
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2
[INFO] [MPM.PeriphManager] init() called with device args mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'. [INFO] [MPM.Rhodium-0] init() called with args mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'
[INFO] [MPM.Rhodium-1] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'
.
.
.
.
[WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate:
Target sample rate: 5.000000 MSps
Actual sample rate: 5.015510 MSps
Actual RX Rate: 5.015510 Msps...

Setting RX Freq: 98.000000 MHz...
Setting RX LO Offset: 0.000000 MHz...
Actual RX Freq: 98.000000 MHz...

Setting RX Gain: 20.000000 dB...
Actual RX Gain: 20.000000 dB...

Waiting for "lo_locked": ++++++++++ locked.

Press Ctrl + C to stop streaming...
DGot an overflow indication. Please consider the following:
Your write medium must sustain a rate of 20.062041MB/s.
Dropped samples will not be written to the file.
Please modify this example for your purposes.
This message will not appear again.
DDDD
Done!

[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_33) no response packet - AssertionError: bool(buff)
in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151

[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_30) packet parse error - EnvironmentError: IOError: Expected packet index: 28 Received index: 29
[ERROR] [UHD] Exception caught in safe-call.
in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG]
at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50
this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) packet parse error - EnvironmentError: IOError: Expected packet index: 566 Received index: 567
Performance within a VM is often very poor.  If you replace the output file with "/dev/null", ,does this change the behavior?

  1. What should I do in order to fix this?

  2. I tried the fm_receiver flowgraph in GNU Radio, it was running successfully but when I tune the frequency there is nothing I could hear except the first 5 seconds noise!
    That would be a question for the discuss-gnuradio mailing list.

  3. I also tried the example 'Spectrum Analyzer' grc program, it was also running without error but there was not much changes/effects when I tune the frequency! Is there something wrong in receiver?
    What gain setting did you use?  What kind of antenna on the antenna port?

Thank you in advance!

Regards,
Thangz

Hello Marcus, 1. TRy a longer duration? Are you doing this in a directory where you have write permission? Yes, I have write permissions to ~/Desktop folder, but still no files were created! Also, longer duration doesn't bring anything! komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 5e6 --gain 20 --duration 30 ~/Desktop/usrp_samples.dat or komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 2e6 --gain 20 --duration 30 ~/Desktop/usrp_samples.dat or komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 2e6 --gain 20 --duration 40 ~/Desktop/usrp_samples.dat or komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 2e6 --gain 20 --duration 20 ~/Desktop/usrp_samples.dat or komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 2e6 --gain 20 --duration 10 ~/Desktop/usrp_samples.dat Creating the usrp device with: master_clock_rate=200e6... [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 . . . Setting RX Rate: 2.000000 Msps... Actual RX Rate: 2.000000 Msps... Setting RX Freq: 868.000000 MHz... Setting RX LO Offset: 0.000000 MHz... Actual RX Freq: 868.000000 MHz... Setting RX Gain: 20.000000 dB... Actual RX Gain: 20.000000 dB... Waiting for "lo_locked": ++++++++++ locked. Press Ctrl + C to stop streaming... Done! (but no files were created) komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ 2. Can you use "uhd_fft" to confirm (or not) that you're receiving signals on the FM band? Do different gain settings help? Yes, I could receive fm signals using uhd_fft! Changing gains had some effects on signals output too! But couldn't hear anything when I tried the same frequency/gain settings in GNU Radio. Moreover the Gnuradio console outputs 'UaUaUaUaUaUa.....' when the signal is strong and there was some slight variations in the sound, far away from but a step closer to useful FM radio sound! [cid:image005.png@01D7C0EF.B93DA2A0] 3. In general, asking "why does my flow-graph not work" questions belong on the discuss-gnuradio mailing list, not here. Sorry for the trouble, I will do that in future! Regards, Thangaraj Von: Marcus D. Leech <patchvonbraun@gmail.com> Gesendet: Mittwoch, 13. Oktober 2021 17:50 An: Thangaraj Mukara Dhakshinamoorthy <thangaraj@komro.net>; usrp-users@lists.ettus.com Betreff: Re: AW: AW: UHD example rx_samples_to_file fails On 2021-10-13 11:34 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: Hello Marcus, 1. So, this looks increasingly like your *network* interface is dropping frames. TO confirm--this is still under a VM, or on actual hardware? Yes, it is a seperate laptop which runs only ubuntu as main OS. What type of Ethernet interface are you using--USB-to-Ethernet devices are known to not work very well because they cannot sustain high rates, and often *reorder* frames on the wire. What kind of cabling are you using? Have you tried replacing that cabling? Now I removed the USB to Ethernet adapter and connected the ethernet cable (CAT5E 350MHz cable) directly into laptop! Also, I'll note that the default master_clock_rate on the N320 is 245.76MHz, which means that your requested 5.0Msps sample rate cannot be precisely supported. You can specify "master_clock_rate=200e6" in the device arguments to request that as a master clock rate, which will allow a 5Msps sample rate. Done! Also, the gain range on N320 goes up to 75dB, which means unless you have a VERY strong signal, a gain setting of 20dB will likely produce noisy/non-existent results. There is strong signal in 868MHz frequency, but still there is no capture file created by the UHD example program! Console logs: komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat Creating the usrp device with: master_clock_rate=200e6... [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.178.61,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2,master_clock_rate=200e6 [WARNING] [MPM.RPCServer] A timeout event occured! [INFO] [MPM.PeriphManager] init() called with device args `product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6'. [INFO] [MPM.Rhodium-0] init() called with args `product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6' [INFO] [MPM.Rhodium-1] init() called with args `product=n320,mgmt_addr=192.168.178.61,clock_source=internal,time_source=internal,master_clock_rate=200e6' . . . Setting RX Rate: 5.000000 Msps... Actual RX Rate: 5.000000 Msps... Setting RX Freq: 868.000000 MHz... Setting RX LO Offset: 0.000000 MHz... Actual RX Freq: 868.000000 MHz... Setting RX Gain: 20.000000 dB... Actual RX Gain: 20.000000 dB... Waiting for "lo_locked": ++++++++++ locked. Press Ctrl + C to stop streaming... Done! (but no file created) TRy a longer duration? Are you doing this in a directory where you have write permission? 2. Regarding the Spectrum Analyzer Program, I reduced the sample rate to 2MHz, then it worked perfectly and the fluctuations in the graph were seen clearly without any stop! I also check the uhd_fft program which worked perfectly too! 3. Regarding the FM receiver flowgraph,I tried tuning various FM channel frequencies (88-108 MHz) and gains, but there is no effect other than the noisy sound (always). What should I do to build a FM receiver application using N320 and which antenna should I use (please suggest for multipurpose too)? Antennas are generally frequency-specific devices, so an antenna that is good for UHF is likely not going to work for the low end of VHF, where the FM band is. You might look into a "discone" antenna, since they have broad, if somewhat inefficient, coverage. Can you use "uhd_fft" to confirm (or not) that you're receiving signals on the FM band? Do different gain settings help? In general, asking "why does my flow-graph not work" questions belong on the discuss-gnuradio mailing list, not here. [cid:image006.png@01D7C0EF.B93DA2A0]PS: I followed the gnuradio tutorial on usrp fm receiver Looking forward to your kind response :) Regards, Thangaraj Von: Marcus D. Leech <patchvonbraun@gmail.com><mailto:patchvonbraun@gmail.com> Gesendet: Dienstag, 12. Oktober 2021 17:03 An: Thangaraj Mukara Dhakshinamoorthy <thangaraj@komro.net><mailto:thangaraj@komro.net>; usrp-users@lists.ettus.com<mailto:usrp-users@lists.ettus.com> Betreff: Re: AW: UHD example rx_samples_to_file fails On 2021-10-12 5:46 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: Hello Marcus, My system config (changed my working environment): OS: Ubuntu 20.04.3 LTS OS Type: 64-bit RAM: 3.8 GB Processor: Intel Core i5-2450M CPU @2.50GHz x4 UHD version: 3.15.0.0 GNU Radio version: 3.8.1.0 SDR Device: Ettus USRP N320 My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) 1. Performance within a VM is often very poor. If you replace the output file with "/dev/null", ,does this change the behavior? komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 /dev/null Creating the usrp device with: ... [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 [WARNING] [MPM.RPCServer] A timeout event occured! [WARNING] [MPM.RPCServer] Attempt to read logs without valid claim from 192.168.10.1 . . . Setting RX Rate: 5.000000 Msps... [WARNING] [RFNOC] The requested decimation is odd; the user should expect passband CIC rolloff. Select an even decimation to ensure that a halfband filter is enabled. Decimations factorable by 4 will enable 2 halfbands, those factorable by 8 will enable 3 halfbands. decimation = dsp_rate/samp_rate -> 49 = (245.760000 MHz)/(5.000000 MHz) Actual RX Rate: 5.015510 Msps... Setting RX Freq: 98.000000 MHz... Setting RX LO Offset: 0.000000 MHz... [WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate: Target sample rate: 5.000000 MSps Actual sample rate: 5.015510 MSps Actual RX Freq: 98.000000 MHz... Setting RX Gain: 20.000000 dB... Actual RX Gain: 20.000000 dB... Waiting for "lo_locked": ++++++++++ locked. Press Ctrl + C to stop streaming... DGot an overflow indication. Please consider the following: Your write medium must sustain a rate of 20.062041MB/s. Dropped samples will not be written to the file. Please modify this example for your purposes. This message will not appear again. D Done! So, this looks increasingly like your *network* interface is dropping frames. TO confirm--this is still under a VM, or on actual hardware? What type of Ethernet interface are you using--USB-to-Ethernet devices are known to not work very well because they cannot sustain high rates, and often *reorder* frames on the wire. What kind of cabling are you using? Have you tried replacing that cabling? Also, I'll note that the default master_clock_rate on the N320 is 245.76MHz, which means that your requested 5.0Msps sample rate cannot be precisely supported. You can specify "master_clock_rate=200e6" in the device arguments to request that as a master clock rate, which will allow a 5Msps sample rate. Also, the gain range on N320 goes up to 75dB, which means unless you have a VERY strong signal, a gain setting of 20dB will likely produce noisy/non-existent results. 2. What gain settings did you use? [cid:image003.png@01D7C0EF.B91E5AD0] [cid:image004.png@01D7C0EF.B91E5AD0] 3. What kind of antenna on the antenna port? Antenna Techincal Information Manufacturer RF Solutions PART ANT-8WHIP3H-SMA TYPE 90DEG HINGED WHIP FREQUENCY 868MHz CONNECTOR SMA FORM HINGED WHIP DB GAIN +3dBi OP TEMPERATURE -40 to +70oC 4. Now when I ran the above spectrum analyzer flowgraph, I receive the runtime error as shown below: <<< Welcome to GNU Radio Companion 3.8.1.0 >>> Block paths: /usr/share/gnuradio/grc/blocks Loading: "/home/komro/usrp_spectrum_analyzer.grc" >>> Done Generating: '/home/komro/usrp_spectrum_analyzer.py' Executing: /usr/bin/python3 -u /home/komro/usrp_spectrum_analyzer.py Warning: failed to XInitThreads() [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 [INFO] [MPM.PeriphManager] init() called with device args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2'. [INFO] [MPM.Rhodium-0] init() called with args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2' [INFO] [MPM.Rhodium-1] init() called with args `clock_source=internal,time_source=internal,product=n320,mgmt_addr=192.168.10.2' [INFO] [0/Replay_0] Initializing block control (NOC ID: 0x4E91A00000000004) [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff) in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 [ERROR] [MPMD] Failure during block enumeration: EnvironmentError: IOError: Block ctrl (CE_01_Port_40) no response packet - AssertionError: bool(buff) in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 Traceback (most recent call last): File "/home/komro/usrp_spectrum_analyzer.py", line 192, in <module> main() File "/home/komro/usrp_spectrum_analyzer.py", line 170, in main tb = top_block_cls() File "/home/komro/usrp_spectrum_analyzer.py", line 91, in __init__ self.uhd_usrp_source_0 = uhd.usrp_source( File "/usr/lib/python3/dist-packages/gnuradio/uhd/__init__.py", line 125, in constructor_interceptor return old_constructor(*args) File "/usr/lib/python3/dist-packages/gnuradio/uhd/uhd_swig.py", line 2787, in make return _uhd_swig.usrp_source_make(device_addr, stream_args, issue_stream_cmd_on_start) RuntimeError: RuntimeError: Failed to run enumerate_rfnoc_blocks() What is the problem here? PS: I can still ping the USRP device successfully! The fact that you got "no response packet" again indicates a network-layer issue. Also, I'll note that an antenna designed for 800MHz to 1GHz will be next-to-useless for the FM band. Also, there's a simple spectrum analyser application, uhd_fft, that comes with the Gnu Radio installation on Ubuntu. Looking forward to your kind response. Regards, Thangz Von: Marcus D. Leech <patchvonbraun@gmail.com><mailto:patchvonbraun@gmail.com> Gesendet: Montag, 11. Oktober 2021 18:08 An: Thangaraj Mukara Dhakshinamoorthy <thangaraj@komro.net><mailto:thangaraj@komro.net>; usrp-users@lists.ettus.com<mailto:usrp-users@lists.ettus.com> Betreff: Re: UHD example rx_samples_to_file fails On 2021-10-11 8:24 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: Hello Everyone, My system config: Host OS: Windows 10 Guest OS: VirtualBox Ubuntu 20.04.3 LTS UHD version: 3.15.0.0 GNU Radio version: 3.8.1.0 SDR Device : Ettus USRP N320 My Goal: Use Ettus N320 as Analysis tool (Ex: Spectrum Analyzer) Console logs: komro@komro-HP-ProBook-6560b:/usr/lib/uhd/examples$ ./rx_samples_to_file --freq 98e6 --rate 5e6 --gain 20 --duration 10 usrp_samples.dat Creating the usrp device with: ... [INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5 [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31F43B7,claimed=False,addr=192.168.10.2 [INFO] [MPM.PeriphManager] init() called with device args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320'. [INFO] [MPM.Rhodium-0] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' [INFO] [MPM.Rhodium-1] init() called with args `mgmt_addr=192.168.10.2,time_source=internal,clock_source=internal,product=n320' . . . . [WARNING] [MULTI_USRP] The hardware does not support the requested RX sample rate: Target sample rate: 5.000000 MSps Actual sample rate: 5.015510 MSps Actual RX Rate: 5.015510 Msps... Setting RX Freq: 98.000000 MHz... Setting RX LO Offset: 0.000000 MHz... Actual RX Freq: 98.000000 MHz... Setting RX Gain: 20.000000 dB... Actual RX Gain: 20.000000 dB... Waiting for "lo_locked": ++++++++++ locked. Press Ctrl + C to stop streaming... DGot an overflow indication. Please consider the following: Your write medium must sustain a rate of 20.062041MB/s. Dropped samples will not be written to the file. Please modify this example for your purposes. This message will not appear again. DDDD Done! [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_33) no response packet - AssertionError: bool(buff) in uint64_t ctrl_iface_impl<_endianness>::wait_for_ack(bool, double) [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG; uint64_t = long unsigned int] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:151 [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_00_Port_30) packet parse error - EnvironmentError: IOError: Expected packet index: 28 Received index: 29 [ERROR] [UHD] Exception caught in safe-call. in ctrl_iface_impl<_endianness>::~ctrl_iface_impl() [with uhd::endianness_t _endianness = uhd::ENDIANNESS_BIG] at /build/uhd-FRfZNJ/uhd-3.15.0.0/host/lib/rfnoc/ctrl_iface.cpp:50 this->send_cmd_pkt(0, 0, true); -> EnvironmentError: IOError: Block ctrl (CE_01_Port_40) packet parse error - EnvironmentError: IOError: Expected packet index: 566 Received index: 567 Performance within a VM is often very poor. If you replace the output file with "/dev/null", ,does this change the behavior? 1. What should I do in order to fix this? 2. I tried the fm_receiver flowgraph in GNU Radio, it was running successfully but when I tune the frequency there is nothing I could hear except the first 5 seconds noise! That would be a question for the discuss-gnuradio mailing list. 3. I also tried the example 'Spectrum Analyzer' grc program, it was also running without error but there was not much changes/effects when I tune the frequency! Is there something wrong in receiver? What gain setting did you use? What kind of antenna on the antenna port? Thank you in advance! Regards, Thangz
MD
Marcus D. Leech
Thu, Oct 14, 2021 3:07 PM

On 2021-10-14 5:36 a.m., Thangaraj Mukara Dhakshinamoorthy wrote:

./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6
--rate 2e6 --gain 20 --duration 10 ~/Desktop/usrp_samples.dat

Use the --file argument to specify where to write the file--the
interface to this program changed a bit a while ago, so
  if you don't specify "--file" it writes to "usrp_samples.dat" in the
current directory.  Any argument that doesn't begin with a "--something"
  is quietly ignored, it seems.

It also apparently quietly ignores write errors due to permissions
issues (you were running it in the examples directory which is not
writeable to
  an ordinary user).

On 2021-10-14 5:36 a.m., Thangaraj Mukara Dhakshinamoorthy wrote: > > ./rx_samples_to_file --args="master_clock_rate=200e6" --freq 868e6 > --rate 2e6 --gain 20 --duration 10 ~/Desktop/usrp_samples.dat > Use the --file argument to specify where to write the file--the interface to this program changed a bit a while ago, so   if you don't specify "--file" it writes to "usrp_samples.dat" in the current directory.  Any argument that doesn't begin with a "--something"   is quietly ignored, it seems. It also apparently quietly ignores write errors due to permissions issues (you were running it in the examples directory which is not writeable to   an ordinary user).