I do not set TX or RX.This is my python code.Please give me some suggestions.
Thinks.
谢谢,有任何问题请随时与我联系!
——————————————————————
李泽远|研发工程师
北京曾益科技有限公司
手机:13121162044
地址:北京市海淀区中关村大街中关村SOHO 1108
网址: <http://www.zengyi-tech.com> www.zengyi-tech.com
发件人: Marcus D. Leech <patchvonbr...@gmail.com>
发送时间: 2021年12月6日 22:21
收件人: zeyuan...@zengyi-tech.com; 'Michael Dickens' <michael.dick...@ettus.com>
抄送: 'USRP list' <usrp-users@lists.ettus.com>
主题: [USRP-users] Re: 答复: Re: 答复: Re: 答复: 答复: Re: 答复: Re: How to use External LO
on N310 device?
On 2021-12-06 00:13, zeyuan...@zengyi-tech.com
<mailto:zeyuan...@zengyi-tech.com> wrote:
Hi Marcus,
I use a signal source output a tone at 5GHz .And I use N310 External LO
mode,it received signal at 2.5GHz.
But I try to change LO Source to another frequency such as 4GHz. In this
situation, the center frequency remain at 2.5GHz but not half of 4GHz.
I want to know what should I do when I try to change center frequency in
External LO mode?
Are you using external LO for TX or RX?
Perhaps you can share the code you're using to configure for external LO?
谢谢,有任何问题请随时与我联系!
——————————————————————
李泽远|研发工程师
北京曾益科技有限公司
手机:13121162044
地址:北京市海淀区中关村大街中关村SOHO 1108
网址: <http://www.zengyi-tech.com> www.zengyi-tech.com
发件人: Michael Dickens <mailto:michael.dick...@ettus.com>
<michael.dick...@ettus.com>
发送时间: 2021年10月27日 22:06
收件人: Marcus D. Leech <mailto:patchvonbr...@gmail.com> <patchvonbr...@gmail.com>
抄送: 李泽远 <mailto:zeyuan...@zengyi-tech.com> <zeyuan...@zengyi-tech.com>; USRP
list <mailto:usrp-users@lists.ettus.com> <usrp-users@lists.ettus.com>
主题: [USRP-users] Re: 答复: Re: 答复: 答复: Re: 答复: Re: How to use External LO on N310
device?
Forgot to mention earlier: at device initialization you have to supply the
external LO at 5 GHz,
as well as set the device argument as noted. Once the device is fully
initialized then you can
change the center frequency & the supplied LO must be 2x that. Hope this helps!
- MLD
On Wed, Oct 27, 2021 at 9:51 AM Marcus D. Leech <patchvonbr...@gmail.com
<mailto:patchvonbr...@gmail.com> > wrote:
On 2021-10-27 03:11, zeyuan...@zengyi-tech.com
<mailto:zeyuan...@zengyi-tech.com> wrote:
I set the correct device arguments,but it doesn’t work correctly and also there
is no error report.
I don’t what can I do next .
So I want to config this argument in mpm.conf file or usrp_hwd.conf file to try
to use external LO .
I couldn’t find this file named "usrp-hwd.conf" in “/usr” .and also “mpm.conf”
Again, modifying the MPM config file is NOT necessary to get external LO to
work.
What frequency are you trying to use?
Can you share the lines of code you use to set up the N310 for shared LO
operation--including the initial device "make" with device arguments, etc.
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
<mailto:usrp-users@lists.ettus.com>
To unsubscribe send an email to usrp-users-le...@lists.ettus.com
<mailto:usrp-users-le...@lists.ettus.com>
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: GPL-3.0
#
# GNU Radio Python Flow Graph
# Title: Not titled yet
# GNU Radio version: 3.9.1.0
from distutils.version import StrictVersion
if __name__ == '__main__':
import ctypes
import sys
if sys.platform.startswith('linux'):
try:
x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()
except:
print("Warning: failed to XInitThreads()")
from gnuradio import analog
from gnuradio import gr
from gnuradio.filter import firdes
from gnuradio.fft import window
import sys
import signal
from PyQt5 import Qt
from argparse import ArgumentParser
from gnuradio.eng_arg import eng_float, intx
from gnuradio import eng_notation
from gnuradio import uhd
import time
from gnuradio import qtgui
class aaa(gr.top_block, Qt.QWidget):
def __init__(self):
gr.top_block.__init__(self, "Not titled yet", catch_exceptions=True)
Qt.QWidget.__init__(self)
self.setWindowTitle("Not titled yet")
qtgui.util.check_set_qss()
try:
self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
except:
pass
self.top_scroll_layout = Qt.QVBoxLayout()
self.setLayout(self.top_scroll_layout)
self.top_scroll = Qt.QScrollArea()
self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
self.top_scroll_layout.addWidget(self.top_scroll)
self.top_scroll.setWidgetResizable(True)
self.top_widget = Qt.QWidget()
self.top_scroll.setWidget(self.top_widget)
self.top_layout = Qt.QVBoxLayout(self.top_widget)
self.top_grid_layout = Qt.QGridLayout()
self.top_layout.addLayout(self.top_grid_layout)
self.settings = Qt.QSettings("GNU Radio", "aaa")
try:
if StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
self.restoreGeometry(self.settings.value("geometry").toByteArray())
else:
self.restoreGeometry(self.settings.value("geometry"))
except:
pass
##################################################
# Variables
##################################################
self.samp_rate = samp_rate = 1000000
##################################################
# Blocks
##################################################
self.uhd_usrp_sink_0 = uhd.usrp_sink(
",".join(('addr=192.168.10.2', '')),
uhd.stream_args(
cpu_format="fc32",
args='',
channels=list(range(0,1)),
),
"",
)
self.uhd_usrp_sink_0.set_subdev_spec('A:0', 0)
self.uhd_usrp_sink_0.set_samp_rate(samp_rate)
self.uhd_usrp_sink_0.set_time_unknown_pps(uhd.time_spec(0))
self.uhd_usrp_sink_0.set_center_freq(4e9, 0)
self.uhd_usrp_sink_0.set_antenna("TX/RX", 0)
self.uhd_usrp_sink_0.set_gain(0, 0)
self.uhd_usrp_sink_0.set_lo_source('external', uhd.ALL_LOS, 0)
#self.uhd_usrp_sink_0.set_lo_export_enabled(False, uhd.ALL_LOS, 0)
self.analog_sig_source_x_0 = analog.sig_source_c(samp_rate,
analog.GR_COS_WAVE, 1000, 1, 0, 0)
##################################################
# Connections
##################################################
self.connect((self.analog_sig_source_x_0, 0), (self.uhd_usrp_sink_0, 0))
def closeEvent(self, event):
self.settings = Qt.QSettings("GNU Radio", "aaa")
self.settings.setValue("geometry", self.saveGeometry())
self.stop()
self.wait()
event.accept()
def get_samp_rate(self):
return self.samp_rate
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate)
self.uhd_usrp_sink_0.set_samp_rate(self.samp_rate)
def main(top_block_cls=aaa, options=None):
if StrictVersion("4.5.0") <= StrictVersion(Qt.qVersion()) <
StrictVersion("5.0.0"):
style = gr.prefs().get_string('qtgui', 'style', 'raster')
Qt.QApplication.setGraphicsSystem(style)
qapp = Qt.QApplication(sys.argv)
tb = top_block_cls()
tb.start()
tb.show()
def sig_handler(sig=None, frame=None):
tb.stop()
tb.wait()
Qt.QApplication.quit()
signal.signal(signal.SIGINT, sig_handler)
signal.signal(signal.SIGTERM, sig_handler)
timer = Qt.QTimer()
timer.start(500)
timer.timeout.connect(lambda: None)
qapp.exec_()
if __name__ == '__main__':
main()
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com