|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] change frequency in gr-ieee802-15-4 example transceiver_OQPSK.py |
Date: | Mon, 21 Sep 2015 10:51:25 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
Hi Jaeho, there's three blocks that use the "freq" variable from that WX GUI slider: * the USRP source * the USRP sink * the FFT sink The first two have an input message port; you can connect a message-emitting block to these, and send PMTs containing commands to these [1]. The WX FFT sink doesn't have such an input port, but frankly, that doesn't matter, because it only needs the center frequency to display it [2] To test your case, try a "Message strobe" block, with the message set to something like pmt.pmt_to_python.python_to_pmt({"freq":2.4e9}) Obviously, that will just periodically set the same frequency (2.4GHz) over and over again. However, as soon as you have verified that works, you can just write your own (python or C++) block that has no stream in- or outputs, but spawns a new thread that periodically sends a message out; see [1] for the syntax you'd need to use to add exact timing to the command dictionaries. Best regards, Marcus [1] https://gnuradio.org/doc/doxygen/page_uhd.html#uhd_command_syntax [2] if that bothers you, replace all the WX things in your flow graph by Qt elements; you can enable message ports on these On 21.09.2015 08:11, Jaeho wrote:
Hello. I am using Ubuntu 15.04 now. I have a question about transceiver_OQPSK.py source code. I success to run this source code on USRP X300. The thing that i want to do next is changing frequency automatically(randomly). Originally, this code choose frequency using radio button GUI to change frequency. But, i hope to change frequency automatically without any GUI working. For example, if I run this code, then frequency is changed periodically and have random value. Which block should I use to change value automatically in GRC or how can i modify in python code. Please give me advice. Thank you -- View this message in context: http://gnuradio.4.n7.nabble.com/change-frequency-in-gr-ieee802-15-4-example-transceiver-OQPSK-py-tp56164.html Sent from the GnuRadio mailing list archive at Nabble.com. _______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
[Prev in Thread] | Current Thread | [Next in Thread] |