【问题标题】:What commands can be sent on the message port of UHD USRP Sink block?UHD USRP Sink 模块的消息端口可以发送哪些命令?
【发布时间】:2022-01-27 20:25:07
【问题描述】:

我一直在尝试在 GNU Radio 伴侣的 Signal Source 块中传递消息。我可以从它的源代码中看到,我们可以传递消息来改变源的频率、幅度、偏移和相位。例如,从消息选通发送的以下消息 PMT 可以将信号的幅度更改为 0.5。

 pmt.dict_add(pmt.make_dict(), pmt.intern("ampl"), pmt.from_double(0.5))

但是当我查看 UHD USRP Sink 的代码时,我无法清楚地知道可以向该块发送哪些命令或可以更改哪些参数。我在文档中的某些地方读到,USRP Sink 的频率、增益、LO 偏移、时间戳、中心频率和其他收发器相关设置可以通过命令消息进行操作。

可以从消息选通(以 pmt 格式)向 USRP Sink 块发送哪些命令以及可以修改哪些参数(及其密钥)?

【问题讨论】:

    标签: gnuradio message-passing gnuradio-companion uhd


    【解决方案1】:

    这是官方记录的:

    https://www.gnuradio.org/doc/doxygen/page_uhd.html#uhd_command_syntax

    Command name Value Type Description
    chan int Specifies a channel. If this is not given, either all channels are chosen, or channel 0, depending on the action. A value of -1 forces 'all channels', where possible.
    gain double Sets the Tx or Rx gain (in dB). Defaults to all channels.
    power_dbm double Sets the Tx or Rx power reference level (in dBm). Defaults to all channels. Works for certain devices only, and only if calibration data is available.
    freq double Sets the Tx or Rx frequency. Defaults to all channels. If specified without lo_offset, it will set the LO offset to zero.
    lo_offset double Sets an LO offset. Defaults to all channels. Note this does not affect the effective center frequency.
    tune tune_request Like freq, but sets a full tune request (i.e. center frequency and DSP offset). Defaults to all channels.
    mtune tune_request_t Like tune, but supports a full manual tune request as uhd::tune_request_t. Defaults to all channels.
    lo_freq double For fully manual tuning: Set the LO frequency (RF frequency). Conflicts with freq, lo_offset, and tune.
    dsp_freq double For fully manual tuning: Set the DSP frequency (CORDIC frequency). Conflicts with freq, lo_offset, and tune.
    direction string Used for timed transceiver tuning to ensure tuning order is maintained. Values other than 'TX' or 'RX' will be ignored.
    rate double See usrp_block::set_samp_rate(). Always affects all channels.
    bandwidth double See usrp_block::set_bandwidth(). Defaults to all channels.
    time timestamp Sets a command time. See usrp_block::set_command_time(). A value of PMT_NIL will clear the command time.
    mboard int Specify mboard index, where applicable.
    antenna string See usrp_block::set_antenna(). Defaults to all channels.
    gpio gpio PMT dictionary including bank, attr, value, mask for GPIO. See notes.

    【讨论】:

    • 太棒了。唔。 gpio 条目显示“查看注释”。我在该文档页面上看不到其他注释。这是否意味着通常的 UHD gpio 位于:files.ettus.com/manual/page_gpio_api.html 示例对于使用消息端口(或 Python sn-ps 等)的 GR-uhd 的 gpio 非常有用。
    • Commit 9aac44a5d4 建议注释为“gpio:这是一个 PMT 字典,具有四个键/值对:bank (string)、attr (string)、value (double) 和 mask (double) .gpio 命令以字典中的元素作为参数调用set_gpio_attr。可以选择包含mboard 以指定主板。默认为0(第一个主板)“下面
    • 遗憾的是,我手头没有任何示例,而且我的 USRP 刚刚打包好准备搬家……嗯。
    猜你喜欢
    • 2011-08-31
    • 2012-09-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-13
    • 1970-01-01
    • 2018-03-01
    • 1970-01-01
    相关资源
    最近更新 更多