USRP:如何解决“流媒体超时”错误

问题描述

我正在尝试在 fedora 34 上使用 uhd 4.0.0 从 USRP X310 捕获样本。 我一直遇到“超时”问题,会立即中断流媒体,但我没有找到原因,也没有互联网上的帮助...... 下面我给你详细的代码

感谢您的帮助!

PS : ./rx_samples_to_file 不带参数的结果相同

[user@computer examples]$ ./rx_samples_to_file --freq=1000000000 --bw=500000 --rate 200000  --duration=0.5 --file=x310_test.bin

Creating the usrp device with: ...
[INFO] [UHD] linux; GNU C++ version 11.0.1 20210324 (Red Hat 11.0.1-0); Boost_107500; UHD_4.0.0.0-0-unkNown
[INFO] [X300] X300 initialization sequence...
[INFO] [X300] Maximum frame size: 1472 bytes.
[INFO] [X300] Radio 1x clock: 200 MHz
Using Device: Single USRP:
  Device: X-Series Device
  Mboard 0: X310
  RX Channel: 0
    RX DSP: 0
    RX Dboard: A
    RX Subdev: TwinRX RX0
  RX Channel: 1
    RX DSP: 1
    RX Dboard: A
    RX Subdev: TwinRX RX1
  RX Channel: 2
    RX DSP: 2
    RX Dboard: B
    RX Subdev: UnkNown (0xffff) - 0
  TX Channel: 0
    TX DSP: 0
    TX Dboard: B
    TX Subdev: UnkNown (0xffff) - 0

Setting RX Rate: 0.200000 Msps...
Actual RX Rate: 0.200000 Msps...

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

Setting RX Bandwidth: 0.500000 MHz...
Actual RX Bandwidth: 0.500000 MHz...

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

Press Ctrl + C to stop streaming...
Timeout while streaming

Done!

我也尝试过基准测试功能,但结果是一样的:

编辑:我停止了 firewalld.services

[usr@computer examples]$ ./benchmark_rate --args="type=x300,addr=192.168.10.2,serial=320179E" --channels 0,1 --rx_rate 2e6 --duration 5

[INFO] [UHD] linux; GNU C++ version 11.0.1 20210324 (Red Hat 11.0.1-0); Boost_107500; UHD_4.0.0.0-0-unkNown
[00:00:00.000390] Creating the usrp device with: type=x300,serial=320179E...
[INFO] [X300] X300 initialization sequence...
[INFO] [X300] Maximum frame size: 1472 bytes.
[INFO] [X300] Radio 1x clock: 200 MHz
[WARNING] [RFNOC::GRAPH] One or more blocks timed out during flush!
Using Device: Single USRP:
  Device: X-Series Device
  Mboard 0: X310
  RX Channel: 0
    RX DSP: 0
    RX Dboard: A
    RX Subdev: TwinRX RX0
  RX Channel: 1
    RX DSP: 1
    RX Dboard: A
    RX Subdev: TwinRX RX1
  RX Channel: 2
    RX DSP: 2
    RX Dboard: B
    RX Subdev: UnkNown (0xffff) - 0
  TX Channel: 0
    TX DSP: 0
    TX Dboard: B
    TX Subdev: UnkNown (0xffff) - 0

[00:00:03.664016092] Setting device timestamp to 0...
[INFO] [MULTI_USRP]     1) catch time transition at pps edge
[INFO] [MULTI_USRP]     2) set times next pps (synchronously)
[WARNING] [0/Radio#0] Attempting to set tick rate to 0. Skipping.
[00:00:04.934122870] Testing receive rate 2.000000 Msps on 2 channels
[00:00:05.85737158] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:05.185992285] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:05.286246070] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:05.386497035] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:05.486745394] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:05.587001598] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:05.687253152] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:05.787508452] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:05.887760249] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:05.988013669] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:06.88264700] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:06.188520367] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:06.288770879] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:06.389026502] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:06.489276462] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:06.589533078] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:06.689791950] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:06.790041080] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:06.890288133] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:06.990543703] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:07.90798580] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:07.191062617] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:07.291319218] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:07.391574410] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:07.491830205] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:07.592097982] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:07.692351705] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:07.792602183] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:07.892874187] Receiver error: ERROR_CODE_TIMEOUT,continuing...
[00:00:07.993127880] Receiver error: ERROR_CODE_TIMEOUT,continuing...
O[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
O[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
OO[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
O[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
OO[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
O[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
O[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
OO[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
OO[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
OO[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
OO[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
O[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
OO[WARNING] [0/Radio#0] Cannot process RX-related async message to invalid chan 1
[00:00:10.123329222] Benchmark complete.


Benchmark rate summary:
  Num received samples:     0
  Num dropped samples:      0
  Num overruns detected:    20
  Num transmitted samples:  0
  Num sequence errors (Tx): 0
  Num sequence errors (Rx): 0
  Num underruns detected:   0
  Num late commands:        0
  Num timeouts (Tx):        0
  Num timeouts (Rx):        30


Done!

解决方法

最常见的原因是您的 PC 过滤掉了包含数据的网络数据包。例如,这可能是防火墙规则或奇怪配置的 MTU。

除此之外:

  • --bw=500000:没有任何 USRP 硬件具有可以缩小的前端过滤器。它通常也无济于事,因此您可能根本不想指定这一点
  • --rx_rate 2e5 这实际上至少是可能的采样率的最低端。这很少有用,您可能会看到数字滤波器的滚降。建议:现代 PC 速度很快。使用 1e6 作为速率,并在软件中过滤和抽取到您需要的任何速率。
  • enable_tx_dual_eth=1 省略这一点。 (因为它重新配置了网络,这也可能解决您的问题)当您的 USRP 甚至没有 TX 子板时,我不明白这有什么意义。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...