Hi Marcus.
My mistake, sorry

This is the terminal output from the E312.
---------------------------------------------------------------------------
root@ni-e31x-32132F0:~# python3 ofdm_loopback.py
[INFO] [UHD] linux; GNU C++ version 9.2.0; Boost_107100;
UHD_4.3.0.0-0-g1f8fd345
[INFO] [MPMD] Initializing 1 device(s) in parallel with args:
mgmt_addr=127.0.0.1,type=e3xx,product=e310_sg3,serial=32132F0,name=ni-e31x-32132F0,fpga=n/a,claimed=False
[INFO] [MPM.main] Launching USRP/MPM, version: 4.3.0.0-g1f8fd345
[INFO] [MPM.main] Spawning RPC process...
[WARNING] [MPM.PeriphManager] Skipping HW/SW compatibility check!
[INFO] [MPM.PeriphManager] Device serial number: 32132F0
[WARNING] [MPM.PeriphManager] Found more EEPROM paths than daughterboards.
Ignoring some of them.
[INFO] [MPM.RPCServer] RPC server ready!
[INFO] [MPM.RPCServer] Spawning watchdog task...
[INFO] [MPM.PeriphManager] init() called with device args
`fpga=n/a,mgmt_addr=127.0.0.1,name=ni-e31x-32132F0,product=e310_sg3'.
[INFO] [0/Radio#0] Performing CODEC loopback test on channel 0 ...
[INFO] [0/Radio#0] CODEC loopback test passed
[INFO] [0/Radio#0] Performing CODEC loopback test on channel 1 ...
[INFO] [0/Radio#0] CODEC loopback test passed
[WARNING] [MULTI_USRP] Calling multi_usrp::recv_async_msg() is deprecated
and can lead to unexpected behaviour. Prefer calling
tx_stream::recv_async_msg().
[INFO] [MULTI_USRP]     1) catch time transition at pps edge
[INFO] [MULTI_USRP]     2) set times next pps (synchronously)
Press Enter to quit: Fatal Python error: Segmentation fault

Thread 0xb6c09010 (most recent call first):
  File "ofdm_loopback.py", line 132 in main
  File "ofdm_loopback.py", line 140 in <module>
Segmentation fault
root@ni-e31x-32132F0:~#
------------------------------------------------------------------------

This is the python script generated from GRC
------------------------------------------------------------------------

   1. #!/usr/bin/env python3
   2. # -*- coding: utf-8 -*-
   3.
   4. #
   5. # SPDX-License-Identifier: GPL-3.0
   6. #
   7. # GNU Radio Python Flow Graph
   8. # Title: OFDM Loopback Example
   9. # Description: Transmit a pre-defined signal (a complex sine) as OFDM
   packets.
   10. # GNU Radio version: 3.8.1.0
   11.
   12. from gnuradio import blocks
   13. from gnuradio import digital
   14. from gnuradio import gr
   15. from gnuradio.filter import firdes
   16. import sys
   17. import signal
   18. from argparse import ArgumentParser
   19. from gnuradio.eng_arg import eng_float, intx
   20. from gnuradio import eng_notation
   21. from gnuradio import uhd
   22. import time
   23. import faulthandler; faulthandler.enable()
   24.
   25. class ofdm_loopback(gr.top_block):
   26.
   27.     def __init__(self):
   28.         gr.top_block.__init__(self, "OFDM Loopback Example")
   29.
   30.         ##################################################
   31.         # Variables
   32.         ##################################################
   33.         self.samp_rate = samp_rate = 100e3
   34.         self.packet_len = packet_len = 50
   35.         self.len_tag_key = len_tag_key = "packet_len"
   36.         self.frecuencia_central = frecuencia_central = 0
   37.         self.fft_len = fft_len = 64
   38.
   39.         ##################################################
   40.         # Blocks
   41.         ##################################################
   42.         self.uhd_usrp_sink_0 = uhd.usrp_sink(
   43.             ",".join(("", "")),
   44.             uhd.stream_args(
   45.                 cpu_format="fc32",
   46.                 args='',
   47.                 channels=list(range(0,1)),
   48.             ),
   49.             '',
   50.         )
   51.         self.uhd_usrp_sink_0.set_center_freq(frecuencia_central, 0)
   52.         self.uhd_usrp_sink_0.set_gain(10, 0)
   53.         self.uhd_usrp_sink_0.set_antenna('TX/RX', 0)
   54.         self.uhd_usrp_sink_0.set_samp_rate(samp_rate)
   55.         self.uhd_usrp_sink_0.set_time_unknown_pps(uhd.time_spec())
   56.         self.digital_ofdm_tx_0 = digital.ofdm_tx(
   57.             fft_len=fft_len,
   58.             cp_len=fft_len//4,
   59.             packet_length_tag_key=len_tag_key,
   60.             occupied_carriers=((-4,-3,-2,-1,1,2,3,4),),
   61.             pilot_carriers=((-6,-5,5,6),),
   62.             pilot_symbols=((-1,1,-1,1),),
   63.             sync_word1=None,
   64.             sync_word2=None,
   65.             bps_header=1,
   66.             bps_payload=2,
   67.             rolloff=0,
   68.             debug_log=False,
   69.             scramble_bits=False)
   70.         self.blocks_vector_source_x_0 =
   blocks.vector_source_b(range(packet_len), True, 1, ())
   71.         self.blocks_stream_to_tagged_stream_0 =
   blocks.stream_to_tagged_stream(gr.sizeof_char, 1, packet_len, len_tag_key)
   72.
   73.
   74.
   75.         ##################################################
   76.         # Connections
   77.         ##################################################
   78.         self.connect((self.blocks_stream_to_tagged_stream_0, 0),
   (self.digital_ofdm_tx_0, 0))
   79.         self.connect((self.blocks_vector_source_x_0, 0),
   (self.blocks_stream_to_tagged_stream_0, 0))
   80.         self.connect((self.digital_ofdm_tx_0, 0),
   (self.uhd_usrp_sink_0, 0))
   81.
   82.     def get_samp_rate(self):
   83.         return self.samp_rate
   84.
   85.     def set_samp_rate(self, samp_rate):
   86.         self.samp_rate = samp_rate
   87.         self.uhd_usrp_sink_0.set_samp_rate(self.samp_rate)
   88.
   89.     def get_packet_len(self):
   90.         return self.packet_len
   91.
   92.     def set_packet_len(self, packet_len):
   93.         self.packet_len = packet_len
   94.
   self.blocks_stream_to_tagged_stream_0.set_packet_len(self.packet_len)
   95.
   self.blocks_stream_to_tagged_stream_0.set_packet_len_pmt(self.packet_len)
   96.
   self.blocks_vector_source_x_0.set_data(range(self.packet_len), ())
   97.
   98.     def get_len_tag_key(self):
   99.         return self.len_tag_key
   100.
   101.     def set_len_tag_key(self, len_tag_key):
   102.         self.len_tag_key = len_tag_key
   103.
   104.     def get_frecuencia_central(self):
   105.         return self.frecuencia_central
   106.
   107.     def set_frecuencia_central(self, frecuencia_central):
   108.         self.frecuencia_central = frecuencia_central
   109.
   self.uhd_usrp_sink_0.set_center_freq(self.frecuencia_central, 0)
   110.
   111.     def get_fft_len(self):
   112.         return self.fft_len
   113.
   114.     def set_fft_len(self, fft_len):
   115.         self.fft_len = fft_len
   116.
   117.
   118.
   119. def main(top_block_cls=ofdm_loopback, options=None):
   120.     tb = top_block_cls()
   121.
   122.    def sig_handler(sig=None, frame=None):
   123.         tb.stop()
   124.         tb.wait()
   125.         sys.exit(0)
   126.
   127.     signal.signal(signal.SIGINT, sig_handler)
   128.     signal.signal(signal.SIGTERM, sig_handler)
   129.
   130.     tb.start()
   131.     try:
   132.         input('Press Enter to quit: ')
   133.     except EOFError:
   134.         pass
   135.     tb.stop()
   136.     tb.wait()
   137. i
   138.
   139. f __name__ == '__main__':
   140.     main()


El lun, 5 jun 2023 a las 17:33, Marcus Müller (<marcus.muel...@ettus.com>)
escribió:

> HI Jorge,
>
> you didn't attach screenshots, but that's OK: We would much rather have
> you include
> copy&pasted text. Images are always inferior when it comes to
> understanding text messages.
>
> Best regards,
> Marcus
>
> On 05.06.23 22:19, JORGE GONZALEZ ORELLANA via USRP-users wrote:
> > Hi all, I have been trying to implement the OFDM blocks on a USRP E312,
> I am currently
> > working on Ubuntu 20.04 with GRC 3.8 y UHD 4.3.
> >
> > When I try to run the python script generated from the GRC, a
> segmentation fault error
> > appears on the E312, I tried to use the faulthandler module to see the
> root of this
> > error, but i cannot get an idea of what could it be.
> >
> > I attached some screenshots, so you can see what I mean
> >
> > thanks for your time :)
> >
> > _______________________________________________
> > USRP-users mailing list -- usrp-users@lists.ettus.com
> > To unsubscribe send an email to usrp-users-le...@lists.ettus.com
> _______________________________________________
> USRP-users mailing list -- usrp-users@lists.ettus.com
> To unsubscribe send an email to usrp-users-le...@lists.ettus.com
>
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to