https://wiki.gnuradio.org/api.php?action=feedcontributions&user=Notou&feedformat=atomGNU Radio - User contributions [en]2024-03-28T22:23:34ZUser contributionsMediaWiki 1.39.5https://wiki.gnuradio.org/index.php?title=Fast_Noise_Source&diff=13785Fast Noise Source2024-03-05T17:22:48Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Similar to the [[Noise Source]] block, except it uses less CPU by pre-generating a pool of random variates taken from the specified distribution. At runtime, samples are then uniform randomly chosen from this pool which is a very fast operation.<br />
<br />
Supports output of type complex, float, int, short<br />
<br />
== Parameters ==<br />
<br />
; Noise Type<br />
: The random distribution to use, only Gaussian and Uniform are supported<br />
<br />
; Amplitude<br />
: The standard deviation of a 1-d noise process. If this is the complex source, this parameter is split among the real and imaginary parts<br />
<br />
; Seed<br />
: Seed for random generators. Note that for uniform and Gaussian distributions, this should be a negative number.<br />
<br />
; Variate Pool Size<br />
: Number of samples to pre-generate<br />
<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/fastnoise_source_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/fastnoise_source_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/include/gnuradio/analog/fastnoise_source.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/grc/analog_fastnoise_source_x.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Noise_Source&diff=13784Noise Source2024-03-05T17:21:23Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Produces a "noise" signal using either a Gaussian or Uniform distribution<br />
<br />
Supports output of type complex, float, int, or short.<br />
<br />
== Parameters ==<br />
<br />
; Noise Type<br />
: The random distribution to use, only Gaussian and Uniform are supported<br />
<br />
; Amplitude<br />
: The standard deviation of a 1-d noise process. If this is the complex source, this parameter is split among the real and imaginary parts<br />
<br />
; Seed<br />
: Seed for random generators. If 0, the seed will be selected using the system clock such that the output sequence is different on each run. Use a non-zero seed to get the same output on each run.<br />
<br />
== Example Flowgraph ==<br />
<br />
[[File:Noise-source-ex.png]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/noise_source_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/noise_source_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/include/gnuradio/analog/noise_source.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/grc/analog_noise_source_x.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Message_Strobe&diff=13783Message Strobe2024-03-05T16:49:09Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Send message at defined interval.<br />
<br />
Takes a PMT message and sends it out every milliseconds. Useful for testing/debugging the message system.<br />
<br />
The PMT to send seems to be settable also from the input port (please confirm that)<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Message PMT (''R'')<br />
: The message to send as a PMT. For example, the following message creates a payload of a simple vector of 16 bytes that contains all 1's.<br />
<br />
pmt.cons(pmt.PMT_NIL, pmt.make_u8vector(16, 0xFF))<br />
<br />
; Period (ms) (''R'')<br />
: The specified time interval after which data is sent at the output repeatedly.<br />
<br />
== Example Flowgraph ==<br />
<br />
=== Example 1 ===<br />
In this example, a Message Strobe block sends the string "Demo" once per second.<br />
<br />
[[File:PUB_SUB_msg_demo.png]]<br />
<br />
=== Example 2 ===<br />
<br />
In another example, we change the frequency of a signal source to 1kHz after 5 seconds.<br />
<br />
[[File:Signal_source_freq_msg_port.PNG]]<br />
<br />
The message strobe settings in the above example are as follows:<br />
<br />
[[File:Message_strobe_settings.PNG | 400px]]<br />
<br />
=== Example 3 ===<br />
Another example that uses a Message Strobe block can be found in [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/examples/msg_passing gr-blocks/examples/msg_passing].<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/message_strobe_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/message_strobe_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/message_strobe.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/grc/blocks_message_strobe.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Probe_Avg_Mag%5E2&diff=13779Probe Avg Mag^22024-02-23T14:07:18Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Compute a running average of the magnitude squared of the the input. The level and indication as to whether the level exceeds threshold can be retrieved with the 'level' and 'unmuted' accessors.<br />
<br />
Use with the function probe block. Available functions to probe: level(), unmuted()<br />
<br />
If the type is set to Complex->Float, the block will also output the values computed.<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Threshold (dB) (''R'')<br />
: Threshold for muting.<br />
<br />
; Alpha (''R'')<br />
: Gain parameter for the running average filter.<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/lib/probe_avg_mag_sqrd_f_impl.cc Float input version]<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/lib/probe_avg_mag_sqrd_cf_impl.cc Complex to float version]<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/lib/probe_avg_mag_sqrd_c_impl.cc Complex input version]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/lib/probe_avg_mag_sqrd_f_impl.h Float input version]<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/lib/probe_avg_mag_sqrd_cf_impl.h Complex to float version]<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/lib/probe_avg_mag_sqrd_c_impl.h Complex input version]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/include/gnuradio/analog/probe_avg_mag_sqrd_f.h Float input version]<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/include/gnuradio/analog/probe_avg_mag_sqrd_cf.h Complex to float version]<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/include/gnuradio/analog/probe_avg_mag_sqrd_c.h Complex input version]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/grc/analog_probe_avg_mag_sqrd_x.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=CVSD_Audio_Encoder_(Raw_Bit-Level)&diff=13505CVSD Audio Encoder (Raw Bit-Level)2023-10-27T15:42:38Z<p>Notou: Created page with "Category:Block Docs This block performs CVSD audio encoding. Its design and implementation is modeled after the CVSD encoder/decoder specifications defined in the Bluetooth standard. CVSD is a method for encoding speech that seeks to reduce the bandwidth required for digital voice transmission. CVSD takes advantage of strong correlation between samples, quantizing the difference in amplitude between two consecutive samples. This difference requires fewer quantizat..."</p>
<hr />
<div>[[Category:Block Docs]]<br />
<br />
This block performs CVSD audio encoding.<br />
Its design and implementation is modeled after the CVSD encoder/decoder specifications defined in the Bluetooth standard.<br />
<br />
CVSD is a method for encoding speech that seeks to reduce the bandwidth required for digital voice transmission. CVSD takes advantage of strong correlation between samples, quantizing the difference in amplitude between two consecutive samples. This difference requires fewer quantization levels as compared to other methods that quantize the actual amplitude level, reducing the bandwidth. CVSD employs a two level quantizer (one bit) and an adaptive algorithm that allows for continuous step size adjustment. <br />
<br />
The coder can represent low amplitude signals with accuracy without sacrificing performance on large amplitude signals, a trade off that occurs in some non-adaptive modulations. <br />
<br />
The CVSD encoder effectively provides 8-to-1 compression. More specifically, each incoming audio sample is compared to an internal reference value. If the input is greater or equal to the reference, the encoder outputs a "1" bit. If the input is less than the reference, the encoder outputs a "0" bit. The reference value is then updated accordingly based on the frequency of outputted "1" or "0" bits. By grouping 8 outputs bits together, the encoder essentially produce one output byte for every 8 input audio samples. <br />
<br />
This encoder requires that input audio samples are 2-byte short signed integers. The result bandwidth conversion, therefore, is 16 input bytes of raw audio data to 1 output byte of encoded audio data. <br />
<br />
The CVSD encoder module must be prefixed by an up-converter to over-sample the audio data prior to encoding. The Bluetooth standard specifically calls for a 1-to-8 interpolating up-converter. While this reduces the overall compression of the codec, this is required so that the encoder can accurately compute the slope between adjacent audio samples and correctly update its internal reference value.<br />
<br />
References:<br />
1. Continuously Variable Slope Delta Modulation (CVSD) A Tutorial, available [http://www.eetkorea.com/ARTICLES/2003AUG/A/2003AUG29_NTEK_RFD_AN02.PDF here]<br />
2. Specification of The Bluetooth System, available: [http://grouper.ieee.org/groups/802/15/Bluetooth/core_10_b.pdf here]<br />
3. McGarrity, S., Bluetooth Full Duplex Voice and Data Transmission. 2002. Bluetooth Voice Simulink Model, available: [http://www.mathworks.com/company/newsletters/digest/nov01/bluetooth.html here]<br />
<br />
<br />
== Parameters ==<br />
<br />
None. The default parameters are modeled after the Bluetooth standard and should not be changed, except by an advanced user.<br />
<br />
<br />
== Example Flowgraph ==<br />
<br />
<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/lib/cvsd_encode_sb_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/lib/cvsd_encode_sb_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/include/gnuradio/vocoder/cvsd_encode_sb.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/grc/vocoder_cvsd_encode_sb.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=CVSD_Audio_Decoder_(Raw_Bit-Level)&diff=13504CVSD Audio Decoder (Raw Bit-Level)2023-10-27T15:39:59Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
<br />
This block performs CVSD audio decoding.<br />
Its design and implementation is modeled after the CVSD encoder/decoder specifications defined in the Bluetooth standard.<br />
<br />
CVSD is a method for encoding speech that seeks to reduce the bandwidth required for digital voice transmission. <br />
CVSD takes advantage of strong correlation between samples, quantizing the difference in amplitude between two consecutive samples. <br />
This difference requires fewer quantization levels as compared to other methods that quantize the actual amplitude level, reducing the bandwidth. <br />
CVSD employs a two level quantizer (one bit) and an adaptive algorithm that allows for continuous step size adjustment.<br />
<br />
The coder can represent low amplitude signals with accuracy without sacrificing performance on large amplitude signals, a trade off that occurs in some non-adaptive modulations.<br />
<br />
The CVSD decoder effectively provides 1-to-8 decompression. More specifically, for each incoming input bit, the decoder outputs one audio sample. If the input is a "1" bit, the internal reference is increased appropriately and then outputted as the next estimated audio sample. If the input is a "0" bit, the internal reference is decreased appropriately and then likewise outputted as the next estimated audio sample. Grouping 8 input bits together, the encoder essentially produces 8 output audio samples for everyone one input byte.<br />
<br />
This decoder requires that output audio samples are 2-byte short signed integers.<br />
The result bandwidth conversion, therefore, is 1 byte of encoded audio data to 16 output bytes of raw audio data.<br />
<br />
The CVSD decoder module must be post-fixed by a down-converter to under-sample the audio data after decoding.<br />
The Bluetooth standard specifically calls for a 8-to-1 decimating down-converter. This is required so that so that output sampling rate equals the original input sampling rate present before the encoder. In all cases, the output down-converter rate must be the inverse of the input up-converter rate before the CVSD encoder.<br />
<br />
References:<br />
1. Continuously Variable Slope Delta Modulation (CVSD) A Tutorial, available [http://www.eetkorea.com/ARTICLES/2003AUG/A/2003AUG29_NTEK_RFD_AN02.PDF here]<br />
2. Specification of The Bluetooth System, available: [http://grouper.ieee.org/groups/802/15/Bluetooth/core_10_b.pdf here]<br />
3. McGarrity, S., Bluetooth Full Duplex Voice and Data Transmission. 2002. Bluetooth Voice Simulink Model, available: [http://www.mathworks.com/company/newsletters/digest/nov01/bluetooth.html here]<br />
<br />
<br />
== Parameters ==<br />
<br />
None. The default parameters are modeled after the Bluetooth standard and should not be changed, except by an advanced user.<br />
<br />
<br />
== Example Flowgraph ==<br />
<br />
<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/lib/cvsd_decode_bs_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/lib/cvsd_decode_bs_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/include/gnuradio/vocoder/cvsd_decode_bs.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/grc/vocoder_cvsd_decode_bs.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=CVSD_Audio_Decoder_(Raw_Bit-Level)&diff=13503CVSD Audio Decoder (Raw Bit-Level)2023-10-27T15:37:46Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
<br />
This is a wrapper for the CVSD decoder that performs decimation and filtering necessary to work with the vocoding. <br />
It converts an incoming CVSD-encoded short to a float, decodes it to a float, decimates it, and scales it (by 32000; slightly below the maximum value to avoid clipping).<br />
<br />
The sampling rate can be anything, though, of course, the higher the sampling rate and the higher the interpolation rate are, the better the sound quality.<br />
<br />
When using the CVSD vocoder, appropriate sampling rates are from 8k to 64k with resampling rates from 1 to 8. A rate of 8k with a resampling rate of 8 provides a good quality signal.<br />
<br />
This block performs CVSD audio decoding.<br />
Its design and implementation is modeled after the CVSD encoder/decoder specifications defined in the Bluetooth standard.<br />
<br />
CVSD is a method for encoding speech that seeks to reduce the bandwidth required for digital voice transmission. <br />
CVSD takes advantage of strong correlation between samples, quantizing the difference in amplitude between two consecutive samples. <br />
This difference requires fewer quantization levels as compared to other methods that quantize the actual amplitude level, reducing the bandwidth. <br />
CVSD employs a two level quantizer (one bit) and an adaptive algorithm that allows for continuous step size adjustment.<br />
<br />
The coder can represent low amplitude signals with accuracy without sacrificing performance on large amplitude signals, a trade off that occurs in some non-adaptive modulations.<br />
<br />
The CVSD decoder effectively provides 1-to-8 decompression. More specifically, for each incoming input bit, the decoder outputs one audio sample. If the input is a "1" bit, the internal reference is increased appropriately and then outputted as the next estimated audio sample. If the input is a "0" bit, the internal reference is decreased appropriately and then likewise outputted as the next estimated audio sample. Grouping 8 input bits together, the encoder essentially produces 8 output audio samples for everyone one input byte.<br />
<br />
This decoder requires that output audio samples are 2-byte short signed integers.<br />
The result bandwidth conversion, therefore, is 1 byte of encoded audio data to 16 output bytes of raw audio data.<br />
<br />
The CVSD decoder module must be post-fixed by a down-converter to under-sample the audio data after decoding.<br />
The Bluetooth standard specifically calls for a 8-to-1 decimating down-converter. This is required so that so that output sampling rate equals the original input sampling rate present before the encoder. In all cases, the output down-converter rate must be the inverse of the input up-converter rate before the CVSD encoder.<br />
<br />
References:<br />
1. Continuously Variable Slope Delta Modulation (CVSD) A Tutorial, available [http://www.eetkorea.com/ARTICLES/2003AUG/A/2003AUG29_NTEK_RFD_AN02.PDF here]<br />
2. Specification of The Bluetooth System, available: [http://grouper.ieee.org/groups/802/15/Bluetooth/core_10_b.pdf here]<br />
3. McGarrity, S., Bluetooth Full Duplex Voice and Data Transmission. 2002. Bluetooth Voice Simulink Model, available: [http://www.mathworks.com/company/newsletters/digest/nov01/bluetooth.html here]<br />
<br />
<br />
== Parameters ==<br />
<br />
None. The default parameters are modeled after the Bluetooth standard and should not be changed, except by an advanced user.<br />
<br />
<br />
== Example Flowgraph ==<br />
<br />
<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/lib/cvsd_decode_bs_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/lib/cvsd_decode_bs_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/include/gnuradio/vocoder/cvsd_decode_bs.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/grc/vocoder_cvsd_decode_bs.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=CVSD_Audio_Decoder_(Raw_Bit-Level)&diff=13502CVSD Audio Decoder (Raw Bit-Level)2023-10-27T15:33:55Z<p>Notou: Created page with "Category:Block Docs This is a wrapper for the CVSD decoder that performs decimation and filtering necessary to work with the vocoding. It converts an incoming CVSD-encoded short to a float, decodes it to a float, decimates it, and scales it (by 32000; slightly below the maximum value to avoid clipping). The sampling rate can be anything, though, of course, the higher the sampling rate and the higher the interpolation rate are, the better the sound quality. When u..."</p>
<hr />
<div>[[Category:Block Docs]]<br />
<br />
This is a wrapper for the CVSD decoder that performs decimation and filtering necessary to work with the vocoding. <br />
It converts an incoming CVSD-encoded short to a float, decodes it to a float, decimates it, and scales it (by 32000; slightly below the maximum value to avoid clipping).<br />
<br />
The sampling rate can be anything, though, of course, the higher the sampling rate and the higher the interpolation rate are, the better the sound quality.<br />
<br />
When using the CVSD vocoder, appropriate sampling rates are from 8k to 64k with resampling rates from 1 to 8. A rate of 8k with a resampling rate of 8 provides a good quality signal.<br />
<br />
This block performs CVSD audio decoding.<br />
Its design and implementation is modeled after the CVSD encoder/decoder specifications defined in the Bluetooth standard.<br />
<br />
CVSD is a method for encoding speech that seeks to reduce the bandwidth required for digital voice transmission. <br />
CVSD takes advantage of strong correlation between samples, quantizing the difference in amplitude between two consecutive samples. <br />
This difference requires fewer quantization levels as compared to other methods that quantize the actual amplitude level, reducing the bandwidth. <br />
CVSD employs a two level quantizer (one bit) and an adaptive algorithm that allows for continuous step size adjustment.<br />
<br />
The coder can represent low amplitude signals with accuracy without sacrificing performance on large amplitude signals, a trade off that occurs in some non-adaptive modulations.<br />
<br />
The CVSD decoder effectively provides 1-to-8 decompression. More specifically, for each incoming input bit, the decoder outputs one audio sample. If the input is a "1" bit, the internal reference is increased appropriately and then outputted as the next estimated audio sample. If the input is a "0" bit, the internal reference is decreased appropriately and then likewise outputted as the next estimated audio sample. Grouping 8 input bits together, the encoder essentially produces 8 output audio samples for everyone one input byte.<br />
<br />
This decoder requires that output audio samples are 2-byte short signed integers.<br />
The result bandwidth conversion, therefore, is 1 byte of encoded audio data to 16 output bytes of raw audio data.<br />
<br />
The CVSD decoder module must be post-fixed by a down-converter to under-sample the audio data after decoding.<br />
The Bluetooth standard specifically calls for a 8-to-1 decimating down-converter. This is required so that so that output sampling rate equals the original input sampling rate present before the encoder. In all cases, the output down-converter rate must be the inverse of the input up-converter rate before the CVSD encoder.<br />
<br />
References:<br />
1. Continuously Variable Slope Delta Modulation (CVSD) A Tutorial, available [http://www.eetkorea.com/ARTICLES/2003AUG/A/2003AUG29_NTEK_RFD_AN02.PDF here]<br />
2. Specification of The Bluetooth System, available: [http://grouper.ieee.org/groups/802/15/Bluetooth/core_10_b.pdf here]<br />
3. McGarrity, S., Bluetooth Full Duplex Voice and Data Transmission. 2002. Bluetooth Voice Simulink Model, available: [http://www.mathworks.com/company/newsletters/digest/nov01/bluetooth.html here]<br />
<br />
<br />
== Parameters ==<br />
<br />
None. The default parameters are modeled after the Bluetooth standard,and should not be changed, except by an advanced user.<br />
<br />
<br />
== Example Flowgraph ==<br />
<br />
<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/lib/cvsd_decode_bs_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/lib/cvsd_decode_bs_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/include/gnuradio/vocoder/cvsd_decode_bs.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/grc/vocoder_cvsd_decode_bs.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=CVSD_Decoder&diff=13501CVSD Decoder2023-10-27T15:29:57Z<p>Notou: Created page with "Category:Block Docs This is a wrapper for the CVSD decoder that performs decimation and filtering necessary to work with the vocoding. It converts an incoming CVSD-encoded short to a float, decodes it to a float, decimates it, and scales it (by 32000, slightly below the maximum value to avoid clipping). The sampling rate can be anything, though, of course, the higher the sampling rate and the higher the interpolation rate are, the better the sound quality. When u..."</p>
<hr />
<div>[[Category:Block Docs]]<br />
<br />
This is a wrapper for the CVSD decoder that performs decimation and filtering necessary to work with the vocoding. <br />
It converts an incoming CVSD-encoded short to a float, decodes it to a float, decimates it, and scales it (by 32000, slightly below the maximum value to avoid clipping).<br />
<br />
The sampling rate can be anything, though, of course, the higher the sampling rate and the higher the interpolation rate are, the better the sound quality.<br />
<br />
When using the CVSD vocoder, appropriate sampling rates are from 8k to 64k with resampling rates from 1 to 8. A rate of 8k with a resampling rate of 8 provides a good quality signal.<br />
<br />
<br />
== Parameters ==<br />
<br />
; Resample<br />
: Resampling (decimation) rate after vocoder decoding<br />
<br />
; Frac. Bandwidth<br />
: Low pass filter bandwidth (relative , should be <= 0.5)<br />
<br />
<br />
== Example Flowgraph ==<br />
<br />
<br />
<br />
== Source Files ==<br />
<br />
; Python file<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/python/vocoder/cvsd.py Here]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/grc/vocoder_cvsd_decode.block.yml Yaml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=CVSD_Encoder&diff=13500CVSD Encoder2023-10-27T15:29:19Z<p>Notou: Created page with "Category:Block Docs This is a wrapper for the CVSD encoder that performs interpolation and filtering necessary to work with the vocoding. It converts an incoming float (+-1) to a short, scales it (to 32000, slightly below the maximum value), interpolates it, and then vocodes it. The sampling rate can be anything, though, of course, the higher the sampling rate and the higher the interpolation rate are, the better the sound quality. When using the CVSD vocoder, a..."</p>
<hr />
<div>[[Category:Block Docs]]<br />
<br />
<br />
This is a wrapper for the CVSD encoder that performs interpolation and filtering necessary to work with the vocoding. <br />
It converts an incoming float (+-1) to a short, scales it (to 32000, slightly below the maximum value), interpolates it, and then vocodes it.<br />
<br />
The sampling rate can be anything, though, of course, the higher the sampling rate and the higher the interpolation rate are, the better the sound quality.<br />
<br />
When using the CVSD vocoder, appropriate sampling rates are from 8k to 64k with resampling rates from 1 to 8. A rate of 8k with a resampling rate of 8 provides a good quality signal.<br />
<br />
<br />
== Parameters ==<br />
<br />
; Resample<br />
: Resampling (interpolation) rate before vocoder decoding<br />
<br />
; Frac. Bandwidth<br />
: Low pass filter bandwidth (relative , should be <= 0.5)<br />
<br />
<br />
== Example Flowgraph ==<br />
<br />
<br />
<br />
== Source Files ==<br />
<br />
; Python file<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/python/vocoder/cvsd.py Here]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-vocoder/grc/vocoder_cvsd_encode.block.yml Yaml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Decimating_FIR_Filter&diff=13499Decimating FIR Filter2023-10-27T15:21:35Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
This is GNU Radio's "normal" FIR Filter. <br />
<br />
For a large number of taps, consider using an [[FFT Filter]], see [http://www.trondeau.com/blog/2014/2/27/to-use-or-not-to-use-fft-filters.html]<br />
<br />
For standard filters such as lowpass, highpass, bandpass, etc., the filter.firdes and filter.optfir classes provide convenient generating methods.<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Decimation<br />
: Decimation rate. The output stream will have this decimation applied to it. A decimation rate of 1 simply means no decimation. If decimation is set higher than 1, make sure the filter will remove energy outside of the "output region", i.e. -Fs/2 to Fs/2 where Fs is the input sample rate divided by the decimation rate.<br />
<br />
; Taps (''R'')<br />
: Taps to use in FIR filter.<br />
<br />
; Sample Delay<br />
: Additional samples to delay by, default is 0 or no delay.<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph implements a Broadcast FM stereo receiver using basic blocks.<br />
<br />
[[File:USRP_FM_stereo_fg.png|644px]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-filter/lib/fir_filter.cc fir_filter.cc]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-filter/include/gnuradio/filter/fir_filter.h fir_filter.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-filter/grc/filter_fir_filter_xxx.block.yml filter_fir_filter_xxx.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Differential_Phasor&diff=13478Differential Phasor2023-10-11T09:36:44Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
<br />
In radio technology, Differential Phasor refers to differential decoding based on phase change. It uses the phase difference between two symbols to determine the output symbol1. This technique can be used in various applications such as demodulating multilevel differential phase-shift keyed (DxPSK) signals2.<br />
<br />
'''out[i] = in[i] * conj(in[i-1])'''<br />
<br />
== Parameters ==<br />
None<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/lib/diff_phasor_cc_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/lib/diff_phasor_cc_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/include/gnuradio/digital/diff_phasor_cc.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/grc/digital_diff_phasor_cc.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=File:Bw_vis_full.png&diff=13400File:Bw vis full.png2023-09-26T14:13:03Z<p>Notou: /* Summary */</p>
<hr />
<div>== Summary ==<br />
Illustrates a tuning with a LO offset<br />
<br />
(From Marcus Müller, @funkylab)</div>Notouhttps://wiki.gnuradio.org/index.php?title=USRP_Source&diff=13398USRP Source2023-09-26T14:09:10Z<p>Notou: Add info on using tune request in freq parameter</p>
<hr />
<div>[[Category:Block Docs]]<br />
The USRP Source Block is used to stream samples from a USRP device (i.e. act as the receiver). <br />
<br />
There is no need to use a [[Throttle]] block when a hardware source like a USRP Source is used, because the USRP acts as the throttle.<br />
<br />
There are two methods of setting parameters and adjusting them while running.<br />
<br />
; Variables and GUI Widgets<br />
: Parameters may be set by a [[Variable]] block, a GUI Widget such as [[QT GUI Range]], or directly in the block Properties. <br />
<br />
; Messages<br />
: The input message port called "command" can be used to change frequency, gain, and other parameters via [[Message Passing]]. A complete list of message commands can be found in [https://www.gnuradio.org/doc/doxygen/page_uhd.html#uhd_command_syntax_cmds Common command keys].<br />
<br />
: A common arrangement is to use the [[QT GUI Sink]]'s output message port to connect to the USRP Source's input port, so that when a user double-clicks within the GUI to change frequency, the change gets propagated to the USRP device. The [[#Example_Flowgraph|Example Flowgraph]] section shows this and other message-based methods.<br />
<br />
== Parameters ==<br />
<br />
; Output Type<br />
: This parameter controls the data type of the output stream in GNU Radio.<br />
<br />
; Wire Format<br />
: This parameter controls the form of the data over the bus/network. Complex bytes may be used to trade off precision for bandwidth. Not all formats are supported on all devices.<br />
<br />
; Stream Args<br />
: Optional arguments to be passed in the UHD streamer object. Streamer args is a list of key/value pairs; usage is determined by the implementation. [https://files.ettus.com/manual/structuhd_1_1stream__args__t.html#a4463f2eec2cc7ee70f84baacbb26e1ef Docs for stream args]<br />
<br />
; Stream Channels<br />
: Optionally used to specify which channels are used, e.g. [0,1]<br />
<br />
; Devices Address<br />
: The device address is a delimited string used to locate UHD devices on your system. If left blank, the first UHD device found will be used. Use the device address to specify a specific device or list of devices.<br />
<br />
Examples: serial=12345678<br />
addr=192.168.10.2<br />
addr0=192.168.10.2, addr1=192.168.10.3<br />
<br />
; Device Arguments<br />
: Other various arguments that can be passed to the USRP Source, see [http://files.ettus.com/manual/page_configuration.html USRP Device Configuration]<br />
<br />
; Sync<br />
: Can be used to get USRP to attempt to sync to either PC's clock, or PPS signal if it exists.<br />
<br />
; Clock Rate [Hz]<br />
: The clock rate shouldn't be confused with sample rate, but they are related. The B2X0 and E31X USRPs use a flexible clock rate that will either be equal to the requested sample rate, or a multiple of it. Best left to default unless specific behavior is needed.<br />
<br />
; Num Mboards<br />
: Selects the number of USRP motherboards (i.e. physical USRP devices) in this device configuration.<br />
<br />
; Mbx Clock Source<br />
: Where the motherboard should sync its clock references. External refers to the 10 MHz input on the USRP. O/B GPSDO is the optional onboard GPSDO module, which provides its own 10 MHz (and PPS) signals.<br />
<br />
; Mbx Time Source<br />
: Where the motherboard should sync its time references. External refers to the PPS input on the USRP. O/B GPSDO is the optional onboard GPSDO module, which provides its own PPS (and 10 MHz) signals.<br />
<br />
; Mbx Subdev Spec<br />
: Each motherboard should have its own subdevice specification and all subdevice specifications should be the same length. Select the subdevice or subdevices for each channel using a markup string. The markup string consists of a list of dboard_slot:subdev_name pairs (one pair per channel). If left blank, the UHD will try to select the first subdevice on your system. See the application notes for further details.Single channel example: ":AB"<br />
<br />
; Num Channels<br />
: Selects the total number of channels in this multi-USRP configuration. Ex: 4 motherboards with 2 channels per board = 8 channels total.<br />
<br />
; Sample Rate<br />
: The number of samples per second, which is equal to the bandwidth in Hz we wish to observe. The UHD device driver will try its best to match the requested sample rate. If the requested rate is not possible, the UHD block will print an error at runtime.<br />
<br />
; Chx Center Frequency<br />
: The center frequency is the overall frequency of the RF chain. The base option is to input an int or float value in Hz. But it is also possible to pass a [https://files.ettus.com/manual/structuhd_1_1tune__request__t.html tune_request] object for greater control on ''how'' the driver tunes the elements in the RF chain.<br />
<div class="toccolours mw-collapsible mw-collapsed"><br />
: Examples:<br />
<div class="mw-collapsible-content"><br />
: Tuning with an LO offset example: <code>uhd.tune_request(f_target, f_offset)</code><br />
[[File:Bw vis full.png|400px|center|alt={Illustration of a tune request with local oscillator offset}]]<br />
<br />
: Tuning without DSP: <code>uhd.tune_request(target_freq, dsp_freq=0, dsp_freq_policy=uhd.tune_request.POLICY_MANUAL)</code><br />
</div><br />
</div><br />
<br />
<br />
; Chx Gain Value<br />
: Value used for gain, which is either between 0 and the max gain for the USRP (usually around 70 to 90), when using the default "Absolute" Gain Type. When using "Normalized" Gain Type, it will always be 0.0 to 1.0, where 1.0 will be mapped to the max gain of the USRP being used.<br />
<br />
; Chx Gain Type<br />
: Absolute (in dB) or Normalized (0 to 1)<br />
<br />
; Chx Antenna<br />
: For subdevices with only one antenna, this may be left blank. Otherwise, the user should specify one of the possible antenna choices. See the daughter-board application notes for the possible antenna choices.<br />
<br />
; Chx Bandwidth<br />
: The bandwidth used by the USRP's anti-aliasing filter. To use the default bandwidth filter setting, this should be zero. Only certain subdevices have configurable bandwidth filters. See the daughterboard application notes for possible configurations.<br />
<br />
; Chx Enable DC Offset Correction<br />
: Attempts to remove the DC offset, i.e. the average value of a signal, which is something that will be very visible in the Frequency domain. <br />
<br />
; Chx Enable IQ Imbalance Correction<br />
: Attempts to correct any IQ imbalance, which is when there is a mismatch between the I and Q signal paths, typically causing a stretching effect to a constellation.<br />
<br />
== Example Flowgraph ==<br />
<br />
The example flowgraph below is taken from [[Guided_Tutorial_Hardware_Considerations]]. It shows how the message ports can be connected so that changing the frequency from within the [[QT GUI Sink]] (by double clicking on the X-axis) is propagated to the USRP. Even though it is hidden by the GUI Sink block, there is a connection from the output message port (freq) on the left to the input message port (freq) on the right. Variables are used to set the sample rate, RF gain, and initial tuning.<br />
<br />
[[File:HW_tutorial_fg.png]]<br />
<br />
[[File:HW_tutorial_freq.png|648px]]<br />
<br><br><br />
<hr><br />
A significant drawback to the method above is that once a frequency is selected by double clicking, the frequency displayed in the GUI Range is no longer correct. To remedy this situation, messages can be used to change all of the run-time functions. Two approaches are presented here. The first is to use a [[QT GUI Message Edit Box]]. Not only can it generate commands, but it can display commands from other sources such as a QT GUI Sink. That way, the parameter (such as frequency) is always displayed correctly. The following flowgraph using this method not only sets the frequency, but also the RF gain.<br />
<br />
[[File:USRP_Source_fg.png]]<br />
<br><br><br />
<hr><br />
A second message-based method can be found in [https://github.com/gnuradio/gnuradio/blob/master/gr-uhd/examples/grc/uhd_msg_tune.grc UHD Message Tuner]. Each of the parameters is set using a [[QT GUI Entry]] block. Every two seconds, the [[Message Strobe]] block sends all of the parameters to the USRP. Note that the initial frequency and gain values must be set using [[Variable]] blocks.<br />
<br />
[[File:Uhd_msg_tune_fg.png]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-uhd/lib/usrp_source_impl.cc usrp_source_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-uhd/lib/usrp_source_impl.h usrp_source_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-uhd/include/gnuradio/uhd/usrp_source.h usrp_source.h]</div>Notouhttps://wiki.gnuradio.org/index.php?title=File:Bw_vis_full.png&diff=13397File:Bw vis full.png2023-09-26T13:48:44Z<p>Notou: Illustrates a tuning with a LO offset</p>
<hr />
<div>== Summary ==<br />
Illustrates a tuning with a LO offset</div>Notouhttps://wiki.gnuradio.org/index.php?title=CondaInstall&diff=13306CondaInstall2023-08-11T15:25:04Z<p>Notou: </p>
<hr />
<div>= Why use conda? =<br />
<br />
Conda is a cross-platform package manager (supporting Linux, macOS, and Windows) that makes it easy to install GNU Radio, its dependencies, and out-of-tree modules in a self-contained environment. Conda lets you create independent environments with their own sets of packages, and those environments are separate from your system installation and other package managers. If you've struggled with installing GNU Radio by other methods, you want to use GNU Radio with other bleeding-edge software available through conda-forge, or you want to try out a new version without affecting your tried-and-true system installation, conda may be right for you! In addition to GNU Radio, there are also [[CondaInstall#Installing related software|related software packages]] you can install that may be of interest.<br />
<br />
== conda-forge ==<br />
<br />
The conda packages for GNU Radio are '''unofficial''' and supported through volunteer effort within the [https://conda-forge.org/ conda-forge] community. Conda-forge is a community-maintained collection of conda packages where anyone with interest can help improve or add packages. Please report and discuss any packaging-specific issues with the maintainers at the [https://github.com/conda-forge/gnuradio-feedstock/issues gnuradio feedstock]. If you'd like to help or are interested in adding other related software to conda-forge (e.g. out-of-tree modules), get in touch with [https://github.com/conda-forge/gnuradio-feedstock#feedstock-maintainers the maintainers] through Github.<br />
<br />
= Installation using radioconda =<br />
<br />
[https://github.com/ryanvolz/radioconda Radioconda] is a full conda distribution available at [https://github.com/ryanvolz/radioconda] that includes GNU Radio. You can follow the instructions there and then skip all of the installation instructions here. If you don't know much about <code>conda</code> and just want to get going, that's a good place to start. Otherwise, continue on.<br />
<br />
= Installation using conda =<br />
<br />
== Step 1: Install conda itself ==<br />
<br />
First, you will need to install a base conda ''distribution'' so that you can use the <code>conda</code> program to create an environment and install the GNU Radio packages. If you already have this and can run <code>conda</code> on a command line or use the Anaconda Navigator to install packages, skip to the next step.<br />
<br />
If this is your first time using conda, we recommend [https://github.com/conda-forge/miniforge miniforge] for the base installation. This provides a minimal environment to run <code>conda</code> that is already set up to pull packages from conda-forge (which is where you can find GNU Radio). Download and install miniforge by following the instructions at [https://github.com/conda-forge/miniforge]. Installers for many different platforms are available there, but the most relevant are the following:<br />
<br />
* [https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh Linux x86_64]<br />
* [https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh macOS x86_64]<br />
* [https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe Windows x86_64]<br />
<br />
For ''Linux and macOS'', run the downloaded installer from a console and follow the prompts:<br />
<br />
* (Linux) <code>bash Miniforge3-Linux-x86_64.sh</code><br />
* (macOS) <code>bash Miniforge3-MacOSX-x86_64.sh</code><br />
<br />
By default, this will install miniforge to your home directory at <code>~/miniforge3</code> and allow you to use the <code>conda</code> command from any console.<br />
<br />
For ''Windows'', double click on the downloaded installer executable and follow the prompts. By default, this will install miniforge to your user directory at <code>C:\Users\USERNAME\miniforge3</code> and add a "Miniforge Prompt" entry to your start menu. Running the "Miniforge Prompt" should bring up a console window where your base conda environment is activated and you can use the <code>conda</code> command.<br />
<br />
[https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html This guide] provides a nice introduction to using conda generally; it may help you better understand the rest of these instructions, but it is not necessary to read.<br />
<br />
''(Optional, recommended)'' It may be convenient to now install <code>mamba</code> in your base environment and use it in place of the <code>conda</code> command:<br />
<br />
conda install mamba<br />
<br />
Mamba is a third-party alternative to conda that is written in C instead of Python, and its main benefit is faster dependency resolution when installing packages. If you do install mamba, you can simply use the <code>mamba</code> command in place of <code>conda</code> for all subsequent steps.<br />
<br />
== Step 2: Create an environment for GNU Radio ==<br />
<br />
It's almost never a good idea to install additional packages to your base conda environment because their dependencies may interfere with conda's own dependencies. We recommend creating an environment specifically for GNU Radio and related packages. From a console with the base conda environment activated, run<br />
<br />
conda create -n gnuradio<br />
<br />
to create an empty environment called "gnuradio". Enter the environment by activating it with the command:<br />
<br />
conda activate gnuradio<br />
<br />
Before installing the GNU Radio packages, we need to ensure that the environment is set up to look for packages from [https://conda-forge.org/ conda-forge]:<br />
<br />
conda config --env --add channels conda-forge<br />
conda config --env --set channel_priority strict<br />
<br />
Now you're ready to actually install GNU Radio!<br />
<br />
== Step 3: Install GNU Radio from conda-forge ==<br />
<br />
GNU Radio on conda-forge is split into a few subpackages. Most users will be happy with the full installation provided by the <code>gnuradio</code> metapackage. From within your activated "gnuradio" environment (previous step), run the command:<br />
<br />
conda install gnuradio<br />
<br />
This will install the latest available version of GNU Radio along with the latest version of Python. If you want a specific version of the <code>gnuradio</code> package (get a list of possibilities from <code>conda search gnuradio</code>), you can specify it like<br />
<br />
conda install gnuradio=3.8.2<br />
<br />
If you want a specific version of Python, you can install it before <code>gnuradio</code> or specify them together like<br />
<br />
conda install gnuradio python=3.8<br />
<br />
To upgrade packages in your environment to their latest available versions, use the upgrade command<br />
<br />
conda upgrade --all<br />
<br />
The <code>gnuradio</code> metapackage installs all of the following subpackages:<br />
<br />
* <code>gnuradio-core</code><br />
* <code>gnuradio-grc</code><br />
* <code>gnuradio-iio</code><br />
* <code>gnuradio-qtgui</code><br />
* <code>gnuradio-soapy</code><br />
* <code>gnuradio-uhd</code><br />
* <code>gnuradio-video-sdl</code><br />
* <code>gnuradio-zeromq</code><br />
<br />
If you don't want all of those and their dependencies, you can install the ones you'd like individually like<br />
<br />
conda install gnuradio-uhd<br />
<br />
to get only the core package (always a dependency) and UHD support without any GUI elements.<br />
<br />
= Using GNU Radio from conda =<br />
<br />
You can use GNU Radio from a conda environment in mostly the same way that it is normally used, provided that you have activated your "gnuradio" environment (or whatever name you might give it). So from a fresh console, you'll need to run<br />
<br />
conda activate gnuradio<br />
<br />
and then use whatever GNU Radio scripts or programs you want, for instance<br />
<br />
gnuradio-companion<br />
<br />
Windows users will find that GNU Radio Companion can also be launched from the Start Menu. Running it from there will first activate the appropriate environment, so all you need to do is click the icon!<br />
<br />
GNU Radio will have access to the Python installed into the conda environment, and not any other installation. If you need specific Python packages to use with GNU Radio, just install them into the environment using <code>conda install</code>. As a last resort, <code>pip</code> or manual installation (<code>python setup.py install</code>) can also be used, but these will not be managed by conda and you'll have to be careful to manage your environment.<br />
<br />
= Installing related software =<br />
<br />
Beyond core GNU Radio and the in-tree modules, some out-of-tree modules and related software have also been packaged for conda. This is a non-exhaustive list of other packages that you can install using the <code>conda install</code> command:<br />
<br />
* <code>gnuradio-iridium</code><br />
* <code>gnuradio-osmosdr</code><br />
* <code>gnuradio-satellites</code><br />
* <code>gqrx</code><br />
* <code>limesuite</code><br />
* <code>rtl-sdr</code><br />
* <code>soapysdr-module-airspy</code><br />
* <code>soapysdr-module-airspyhf</code><br />
* <code>soapysdr-module-hackrf</code><br />
* <code>soapysdr-module-lms7</code><br />
* <code>soapysdr-module-plutosdr</code><br />
* <code>soapysdr-module-remote</code><br />
* <code>soapysdr-module-rtlsdr</code><br />
* <code>soapysdr-module-uhd</code><br />
* <code>uhd</code><br />
* <code>volk</code><br />
<br />
If you have other hardware or OOT modules that you'd like to see supported, first search [https://anaconda.org/ Anaconda Cloud] to see if a package not listed above already exists on conda-forge or another channel. If it doesn't, you can create your own package recipe and submit it to conda-forge (see the documentation at [https://conda-forge.org/#contribute] for details) and/or get in touch with the [https://github.com/conda-forge/gnuradio-feedstock#feedstock-maintainers maintainers of the existing packages] to see if they would be willing to help.<br />
<br />
== Building OOT modules to use with conda-installed GNU Radio ==<br />
<br />
In the event that the OOT module you want to use is not packaged for conda, it is possible to build it from source and use it within your conda environment. You can follow the following instructions, or build a conda package for the OOT module following a [https://github.com/ryanvolz/gnuradio-oot-template-feedstock recipe template]. If you do either of these, ''please'' consider contributing your recipe/procedure so that others can benefit. See the note at the end of this section.<br />
<br />
First, if you're doing this on Windows, you will need to have Visual Studio 2019 or newer installed. If you're not using VS2019 directly (e.g. VS2022), you will probably need to add its specific compiler version (MSVC v142) using the Visual Studio Installer by selecting the "MSVC v142 - VS 2019 C++ x64/x86 build tools" component under the list of "Individual Components".<br />
<br />
Then, some special setup is required to ensure that the CMake packaging tool knows where to find dependencies and where to install the OOT module. Install the packaging tools we'll need to the conda environment that contains <code>gnuradio-core</code> by installing the purpose-built meta-package:<br />
<br />
conda install gnuradio-build-deps<br />
<br />
The [https://github.com/conda-forge/gnuradio-feedstock/blob/3b2aea7b70d4992c8e1d1bcb9d5903459bb4e190/recipe/meta.yaml#L460-L494 gnuradio-build-deps metapackage] ensures that you have all required build time dependencies installed and their versions are correct. This includes, the C/C++ compiler used to compile GNU Radio as well as CMake, Ninja, NumPy, pip, pkg-config, pybind11, etc.<br />
<br />
Also make sure you have all of the OOT module's dependencies installed which might not be needed by GNU Radio itself.<br />
<br />
Re-activate your environment if you just installed <code>gnuradio-build-deps</code> for the first time to set some environment variables:<br />
<br />
(on Linux/macOS)<br />
conda activate $CONDA_DEFAULT_ENV<br />
<br />
(on Windows)<br />
conda activate %CONDA_DEFAULT_ENV%<br />
<br />
(<code>$CONDA_DEFAULT_ENV</code>/<code>%CONDA_DEFAULT_ENV</code> is an environment variable that gives the name of the currently active conda environment. It does not mean to activate your base environment!)<br />
<br />
Then run CMake like you normally would (e.g. from a build directory),<br />
<br />
mkdir build<br />
cd build<br />
<br />
adding the following flags to your <code>cmake</code> command, so <code>cmake ..</code> becomes:<br />
<br />
(on Linux/macOS)<br />
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DLIB_SUFFIX="" ..<br />
<br />
(on Windows)<br />
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%\Library" -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library" -DGR_PYTHON_DIR="%CONDA_PREFIX%\Lib\site-packages" ..<br />
<br />
It is possible that not all of these added arguments are necessary, and you might need more to help CMake locate particular libraries.<br />
<br />
Once this <code>cmake</code> step succeeds, proceed with building the OOT as you would outside of the conda environment:<br />
<br />
cmake --build .<br />
cmake --build . --target install<br />
<br />
Note: build errors due to <code>PRIu64</code> being undefined have been observed in a couple of OOT modules when building within a conda environment. This happens because the environment is built with an older version of glibc that doesn't define that macro automatically. Until conda depends on at least glibc 2.18, the workaround is to add <code>-D__STDC_FORMAT_MACROS</code> to the build's <code>CXXFLAGS</code>. This can be done either by setting the <code>CXXFLAGS</code> environment variable or, if the OOT already defines <code>CMAKE_CXX_FLAGS</code> somewhere, adding it into the existing expression in the <code>CMakeLists.txt</code> file.<br />
<br />
'''Document your results to help others:''' if you've succeeded in building an OOT in this way, please consider documenting your process in an issue filed at [https://github.com/ryanvolz/radioconda/issues the radioconda GitHub]! Helpful information to document includes the names of any extra conda packages that you needed to install as dependencies, and the exact CMake and build commands that you used.<br />
<br />
'''Extra credit:''' if you're successful and want to be extra helpful, you're halfway to creating a conda recipe! Consider following [https://docs.conda.io/projects/conda-build/en/latest/concepts/recipe.html the conda-build documentation] to finish the job in creating a recipe and then [https://conda-forge.org/#contribute submit it to conda-forge] so others can benefit. You can use [https://github.com/ryanvolz/gnuradio-oot-template-feedstock this template] or existing recipes (like [https://github.com/conda-forge/gnuradio-satellites-feedstock gnuradio-satellites]) as an example.<br />
<br />
== Adding conda support directly to an OOT module ==<br />
<br />
A template conda recipe for GNU Radio out-of-tree modules is now a part of <code>gr_modtool</code>. Beyond making it easier for anyone to bundle an OOT into a conda package, it is also straightforward to add the ability to build packages automatically through Github!<br />
<br />
For any new OOT modules created with <code>gr_modtool</code>, you can find the conda recipe and configuration in the <code>.conda</code> directory. For existing modules, you can run <code>gr_modtool newmod OOT_NAME</code> to create a "new" module and copy the <code>.conda</code> directory into the existing module. Once you have a <code>.conda</code> directory created from the template, you can follow the additional instructions found in the [https://github.com/gnuradio/gnuradio/blob/main/gr-utils/modtool/templates/gr-newmod/.conda/README.md README] in that <code>.conda</code> directory for how to modify the recipe, build the package, and add continuous integration.<br />
<br />
= Installing pre-release versions =<br />
<br />
Sometimes, pre-release versions of GNU Radio will also be available through conda-forge (on a best effort basis!). So these don't get installed over release versions, they are provided on a separate channel label. For a release candidate ("RC" pre-release), that channel is <code>conda-forge/label/gnuradio_rc</code>. You can install from a special channel by using the <code>-c</code> flag with <code>conda install</code>, as in<br />
<br />
conda install -c conda-forge/label/gnuradio_rc gnuradio<br />
<br />
Since extra packages are unlikely to also be available and compatible with a pre-release version, we recommend creating a separate environment first and installing the pre-release there. So for example,<br />
<br />
conda create -n grtest -c conda-forge/label/gnuradio_rc -c conda-forge gnuradio<br />
conda activate grtest<br />
<br />
= Building GNU Radio from source within a conda environment =<br />
<br />
Take note that this is an advanced topic that is likely to be of interest to developers only. It is possible to install all of GNU Radio's dependencies into a conda environment and then build GNU Radio from source. This can be useful for development, where the source is being updated and rebuilds are frequent.<br />
<br />
=== Create a development environment ===<br />
<br />
Create and activate a development environment called "grdev":<br />
<br />
conda create -n grdev<br />
conda activate grdev<br />
conda config --env --add channels conda-forge<br />
conda config --env --set channel_priority strict<br />
<br />
Install all of the dependencies (or a subset of them if you like):<br />
<br />
(Linux)<br />
conda install alsa-lib boost-cpp click click-plugins cmake codec2 cppzmq cxx-compiler fftw gtk3 gmp gsl libad9361-iio libcblas libiio libsndfile lxml mako ninja numpy pkg-config portaudio pybind11 pybind11-abi pygobject pyqt python pyyaml pyzmq qt qwt sdl soapysdr spdlog uhd volk zeromq libice-cos6-x86_64 libselinux-cos6-x86_64 libsm-cos6-x86_64 libx11-cos6-x86_64 libxau-cos6-x86_64 libxcb-cos6-x86_64 libxdamage-cos6-x86_64 libxext-cos6-x86_64 libxfixes-cos6-x86_64 libxrender-cos6-x86_64 libxxf86vm-cos6-x86_64 libuuid-cos6-x86_64 mesa-dri-drivers-cos6-x86_64 mesa-libgl-devel-cos6-x86_64 libudev-devel-cos6-x86_64 packaging<br />
<br />
(macOS)<br />
conda install boost-cpp click click-plugins cmake codec2 cppzmq cxx-compiler fftw gtk3 gmp gsl libad9361-iio libcblas libiio libsndfile log4cpp lxml mako ninja numpy pkg-config pybind11 pybind11-abi pygobject pyqt python pyyaml qt qwt sdl soapysdr spdlog uhd volk zeromq packaging<br />
<br />
(Windows)<br />
conda install boost-cpp click click-plugins cmake codec2 cppzmq cxx-compiler fftw gtk3 gsl libad9361-iio libcblas libiio libsndfile log4cpp lxml mako mpir ninja numpy pkg-config pybind11 pybind11-abi pygobject pyqt python pyyaml qt qwt sdl soapysdr spdlog uhd volk zeromq packaging<br />
<br />
'''On Linux only''', remove a symlink to the system udev that will get in the way of the linker:<br />
rm $CONDA_PREFIX/lib/libudev.so.0<br />
<br />
=== Pass necessary arguments to CMake ===<br />
<br />
With the development environment activated and from a build directory within the source directory, call <code>cmake</code> with the following arguments:<br />
<br />
(Linux)<br />
cmake -G "Ninja" -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DLIB_SUFFIX="" ..<br />
<br />
(macOS)<br />
cmake -G "Ninja" -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DLIB_SUFFIX="" ..<br />
<br />
(Windows)<br />
cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%\Library" -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library" -DPYTHON_EXECUTABLE="%CONDA_PREFIX%\python" -DGR_PYTHON_DIR="%CONDA_PREFIX%\Lib\site-packages" ..<br />
<br />
In time, hopefully this list of argument can be trimmed down to only specifying the prefix.<br />
<br />
=== Build as normal ===<br />
<br />
Proceed with building and installing as normal:<br />
<br />
cmake --build .<br />
cmake --build . --target install<br />
<br />
=== Test build ===<br />
<br />
To test that built binaries work correctly:<br />
<br />
ninja test<br />
<br />
= FAQ =<br />
<br />
==== When I try to run GNU Radio, why do I get a ModuleNotFoundError (no module named ...)? ====<br />
It is likely that you have another GNU Radio or Python installation interfering with your conda environment. See [[ModuleNotFoundError]] for more information on this problem in general. Verify that your Python path points to the correct directory by running<br />
<br />
python -c "import sys; print('\n'.join(sys.path))"<br />
<br />
and inspecting the output. If other directories come before your conda environment Python directory, you may have to modify your <code>PYTHONPATH</code> environment variable. If your conda environment Python directory does not appear at all, make sure that your <code>PATH</code> environment variable is set correctly to run the <code>python</code> executable from your conda environment and not some other installation of Python.<br />
<br />
==== Why do I get cryptic error messages with a new GNU Radio installation (or new major version)? ====<br />
There are a few flavors of this, but if you've just installed a new major version of GNU Radio (e.g. 3.8, 3.9), it's possible that some files from an old installation are conflicting with the new version. It can be helpful to ensure that all remnants of the older version have been purged from your system, especially if you've just installed the conda package and have previously used another package or installed from source. In particular, it can be helpful to clear the GNU Radio user preferences directory and start fresh. You can find the location of this directory by running<br />
<br />
gnuradio-config-info --userprefsdir<br />
<br />
Delete that directory or all of its contents, and you might have better luck starting GNU Radio without errors.<br />
<br />
==== Why can't GNU Radio find my hardware device? ====<br />
Provided you've installed the appropriate package for your hardware through conda (e.g. <code>uhd</code>) and the accompanying GNU Radio blocks (e.g. <code>gnuradio-uhd</code>), it's likely that you still need to follow extra steps to get your hardware running. Consult the documentation for your device and follow the additional steps it recommends beyond installing the basic software. For example:<br />
* For Ettus UHD-supported devices, you'll need to download the images package into the conda environment by running the <code>uhd_images_downloader</code> script provided by <code>uhd</code>.<br />
* Using Windows with a USB-connected device, you will probably need to install a USB driver for the device. Search for driver installation instructions for your device and follow those instructions. You will likely have to download and run [https://zadig.akeo.ie/ Zadig] to install the latest WinUSB driver for your device.<br />
Whatever you need to do, make sure your device is visible and usable outside of GNU Radio before trying to track down any GR-specific problem.<br />
<br />
==== Windows users: Interference from PothosSDR ====<br />
If you get errors that include "ImportError: DLL load failed", or GNU Radio Companion is missing blocks that should be there, then it is possible that another GNU Radio installation like PothosSDR is interfering with your conda environment. To verify that this is happening, you can run<br />
<br />
gnuradio-config-info --prefix<br />
<br />
and see if the returned path points to PothosSDR instead of your conda environment.<br />
<br />
You may not have installed PothosSDR explicitly (some apps install it themselves), so double check to make sure. If you don't need PothosSDR anymore, then it is likely that you can solve these errors by uninstalling it.<br />
<br />
The main way that PothosSDR interferes with other installations is by setting certain environment variables globally. If you want to try to keep PothosSDR while still using GNU Radio from a conda environment, then you will have to unset these variables. To do this whenever your conda environment is activated, run<br />
<br />
conda env config vars set GR_PREFIX= GRC_BLOCKS_PATH= UHD_PKG_PATH= VOLK_PREFIX=<br />
<br />
This should work if you run <code>gnuradio-companion</code> from the "Conda Prompt", but will not have any effect if you run "GNU Radio Companion" from the Start Menu.<br />
<br />
To remove the interfering environment variables from the Windows registry, run<br />
<br />
set GR_PREFIX= & setx GR_PREFIX "" & REG delete HKCU\Environment /F /V GR_PREFIX<br />
set GRC_BLOCKS_PATH= & setx GRC_BLOCKS_PATH "" & REG delete HKCU\Environment /F /V GRC_BLOCKS_PATH<br />
set UHD_PKG_PATH= & setx UHD_PKG_PATH "" & REG delete HKCU\Environment /F /V UHD_PKG_PATH<br />
set VOLK_PREFIX= & setx VOLK_PREFIX "" & REG delete HKCU\Environment /F /V VOLK_PREFIX<br />
<br />
This should work in all cases.</div>Notouhttps://wiki.gnuradio.org/index.php?title=Packet_Header_Parser&diff=13302Packet Header Parser2023-08-08T13:54:06Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Post header metadata as a PMT.<br />
In a sense, this is the inverse block to [[Packet Header Generator]]. The difference is, the parsed header is not output as a stream, but as a PMT dictionary, which is published to message port with the id "header_data".<br />
<br />
The dictionary consists of the tags created by the header formatter object, as well as the tags already present at the input of this block.<br />
Note that if several tags (created and already present) have the same key (name), only one, the last, will be output. And that may cause conflicts that are hard to investigate.<br />
<br />
== Parameters ==<br />
<br />
; Formatter Object<br />
: Header object. This should be the same as used for [[Packet Header Generator]] on the transmitter side.<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/packet_headerparser_b_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/packet_headerparser_b_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/include/gnuradio/digital/packet_headerparser_b.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/grc/digital_packet_headerparser_b.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Packet_Header_Parser_(Default)&diff=13301Packet Header Parser (Default)2023-08-08T13:53:59Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Post header metadata as a PMT. In a sense, this is the inverse block to [[Packet Header Generator (Default)]]. The difference is, the parsed header is not output as a stream, but as a PMT dictionary, which is published to message port with the id "header_data". <br />
<br />
The dictionary consists of the tags created by the header formatter object, as well as the tags already present at the input of this block.<br />
Note that if several tags (created and already present) have the same key (name), only one, the last, will be output. And that may cause conflicts that are hard to investigate.<br />
<br />
<br />
== Parameters ==<br />
; Header Length<br />
: Number of bytes per header <br />
<br />
; Length Tag Name<br />
: Length Tag Key <br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/packet_headerparser_b_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/packet_headerparser_b_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/include/gnuradio/digital/packet_headerparser_b.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/grc/digital_packet_headerparser_b.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Packet_Header_Generator&diff=13300Packet Header Generator2023-08-08T13:43:40Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Generates a header for a tagged, streamed packet.<br />
<br />
Input: A tagged stream of bytes. This is consumed entirely, it is not appended to the output stream.<br />
<br />
Output: A tagged stream containing the header. The details on the header are set in a header formatter object (of type packet_header_default or a subclass thereof). To use a default header, see [[Packet Header Generator (Default)]].<br />
<br />
== Parameters ==<br />
; Formatter Object<br />
: A header formatter object.<br />
<br />
; Length Tag Name<br />
: Length Tag Key. Note that it is irrelevant which tag names are set in the formatter object. Only this value is relevant.<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/packet_headergenerator_bb_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/packet_headergenerator_bb_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/include/gnuradio/digital/packet_headergenerator_bb.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/grc/digital_packet_headergenerator_bb_default.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Packet_Header_Generator_(Default)&diff=13299Packet Header Generator (Default)2023-08-08T13:42:53Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Generates a default header for a tagged, streamed packet based on the specified length. This block is a special case of [[Packet Header Generator]]<br />
<br />
Input: A tagged stream of bytes. This is consumed entirely, it is not appended to the output stream. Note that all 8 bits per byte are used.<br />
<br />
Output: An tagged stream containing the header. <br />
<br />
== Parameters ==<br />
<br />
; Header Length<br />
: This is the number of bits per header.<br />
<br />
; Length Tag Name<br />
: Length tag key.<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/packet_headergenerator_bb_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/packet_headergenerator_bb_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/include/gnuradio/digital/packet_headergenerator_bb.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/grc/digital_packet_headergenerator_bb_default.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Packet_Header_Generator&diff=13298Packet Header Generator2023-08-08T13:41:59Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Generates a header for a tagged, streamed packet.<br />
<br />
Input: A tagged stream of bytes. This is consumed entirely, it is not appended to the output stream.<br />
<br />
Output: A tagged stream containing the header. The details on the header are set in a header formatter object (of type packet_header_default or a subclass thereof). To use a default header, see packet_header_default.<br />
<br />
== Parameters ==<br />
; Formatter Object<br />
: A header formatter object.<br />
<br />
; Length Tag Name<br />
: Length Tag Key. Note that it is irrelevant which tag names are set in the formatter object. Only this value is relevant.<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/packet_headergenerator_bb_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/packet_headergenerator_bb_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/include/gnuradio/digital/packet_headergenerator_bb.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/grc/digital_packet_headergenerator_bb_default.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=OFDM_Serializer&diff=13276OFDM Serializer2023-08-03T15:10:37Z<p>Notou: Restore missing elements from the header doc</p>
<hr />
<div>[[Category:Block Docs]]<br />
Serializes complex modulations symbols from OFDM sub-carriers.<br />
<br />
This is the inverse block to the [[OFDM Carrier Allocator]]. It outputs the complex data symbols as a tagged stream, discarding the pilot symbols.<br />
<br />
If given, two different tags are parsed: The first key (Length Tag Key) specifies the number of OFDM symbols in the frame at the input. The second key (Packet Length Tag Key) specifies the number of complex symbols that are coded into this frame. If given, this second key is then used at the output, otherwise, Length Tag Key is used. If both are given, the packet length specifies the maximum number of output items, and the frame length specifies the exact number of consumed input items.<br />
<br />
It is possible to correct a carrier offset in this function by passing another tag with said offset.<br />
<br />
; Input: Complex vectors of length <br />
; Output: Complex scalars, in the same order as specified in occupied_carriers.<br />
<br />
== Parameters ==<br />
<br />
; FFT length<br />
: FFT length<br />
<br />
; Occupied Carriers<br />
: See [[OFDM Carrier Allocator]]<br />
<br />
; Length Tag Key<br />
: The key of the tag identifying the length of the input frame in OFDM symbols.<br />
<br />
; Packet Length Tag Key<br />
: The key of the tag identifying the number of complex symbols in this packet.<br />
<br />
; Symbols skipped<br />
: If the first symbol is not allocated as in occupied_carriers[0], set this<br />
<br />
; Carrier Offset Key<br />
: When this block should correct a carrier offset, specify the tag key of the offset here (not necessary if following an [[OFDM Frame Equalizer]])<br />
<br />
; Input is shifted<br />
: If the input has the DC carrier on index 0 (i.e. it is not FFT shifted), set this to false<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph can be found at [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/examples/ofdm/rx_ofdm.grc].<br />
<br />
[[File:Rx_ofdm_fg.png|800px]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/ofdm_serializer_vcc_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/ofdm_serializer_vcc_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/include/gnuradio/digital/ofdm_serializer_vcc.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/grc/digital_ofdm_serializer_vcc.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Unpack_K_Bits&diff=13096Unpack K Bits2023-04-25T13:24:10Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Opposite of [[Pack K Bits]] - Converts a byte with k relevant bits to k output bytes with 1 bit each, located in the LSB.<br />
<br />
In other words, this block picks the K least significant bits from a byte, and expands them into K bytes of 0 or 1.<br />
<br />
Example:<br />
<br />
k = 4<br />
<br />
in = [0xf5, 0x08]<br />
<br />
out = [0,1,0,1,1,0,0,0]<br />
<br />
Each input byte produced four output bytes (that are either 0 or 1). Remember that there is no item type of "bit" in GNU Radio, so we have to use bytes to represent single bits.<br />
<br />
== Parameters ==<br />
; K<br />
: Constant for unpacking bits<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph is taken from the [[Guided_Tutorial_PSK_Demodulation]] tutorial.<br />
<br />
[[File:stage6_grc.png|906px|]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/unpack_k_bits_bb_impl.cc Byte implementation]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/unpack_k_bits.cc Base class]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/unpack_k_bits_bb_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/unpack_k_bits_bb.h Byte implementation]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/unpack_k_bits.h Base class]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/grc/blocks_unpack_k_bits_bb.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Pack_K_Bits&diff=13095Pack K Bits2023-04-25T13:23:43Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Converts a stream of bytes with 1 bit in the LSB to a byte with K relevant bits. It's the opposite of [[Unpack K Bits]]<br />
<br />
In other words, it packs K unpacked bits (one bit per byte, since the byte is the smallest item size in GNU Radio) into a single packed byte containing K bits and 8 - K zeros.<br />
<br />
This block takes in K bytes at a time, and uses the least significant bit to form a new byte.<br />
<br />
Example: <br />
<br />
K = 4 <br />
<br />
in = [0, 1, 0, 1, 0x81, 0x00, 0x00, 0x00]<br />
<br />
out = [0x05, 0x08]<br />
<br />
The first four bytes coming in get combined to form binary 0101 which is 0x05<br />
<br />
The next four bytes get combined to form binary 1000 which is 0x08. Note that even though one of the input bytes was 0x81, all that mattered was the least significant bit, which was a 1, the rest of the bits in that byte got discarded.<br />
<br />
== Parameters ==<br />
; K<br />
: Number of bits to be packed.<br />
<br />
== Example Flowgraph ==<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/pack_k_bits_bb_impl.cc Byte implementation]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/pack_k_bits.cc Base class]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/pack_k_bits_bb_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/pack_k_bits_bb.h Byte implementation]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/pack_k_bits.h Base class]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/grc/blocks_pack_k_bits_bb.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Pack_K_Bits&diff=13094Pack K Bits2023-04-25T13:22:34Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Converts a stream of bytes with 1 bit in the LSB to a byte with K relevant bits. It's the opposite of [[Unpack K Bits]]<br />
<br />
In other words, it packs K unpacked bits (one bit per byte, since the byte is the smallest item size in GNU Radio) into a single packed byte containing K bits and 8 - K zeros.<br />
<br />
This block takes in K bytes at a time, and uses the least significant bit to form a new byte.<br />
<br />
Example: <br />
<br />
K = 4 <br />
<br />
in = [0, 1, 0, 1, 0x81, 0x00, 0x00, 0x00]<br />
<br />
out = [0x05, 0x08]<br />
<br />
The first four bytes coming in get combined to form binary 0101 which is 0x05<br />
<br />
The next four bytes get combined to form binary 1000 which is 0x08. Note that even though one of the input bytes was 0x81, all that mattered was the least significant bit, which was a 1, the rest of the bits in that byte got discarded.<br />
<br />
== Parameters ==<br />
; K<br />
: Number of bits to be packed.<br />
<br />
== Example Flowgraph ==<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/pack_k_bits_bb_impl.cc]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/pack_k_bits.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/pack_k_bits_bb_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/pack_k_bits_bb.h]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/pack_k_bits.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/grc/blocks_pack_k_bits_bb.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Unpack_K_Bits&diff=13093Unpack K Bits2023-04-25T13:22:00Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Opposite of [[Pack K Bits]] - Converts a byte with k relevant bits to k output bytes with 1 bit each, located in the LSB.<br />
<br />
In other words, this block picks the K least significant bits from a byte, and expands them into K bytes of 0 or 1.<br />
<br />
Example:<br />
<br />
k = 4<br />
<br />
in = [0xf5, 0x08]<br />
<br />
out = [0,1,0,1,1,0,0,0]<br />
<br />
Each input byte produced four output bytes (that are either 0 or 1). Remember that there is no item type of "bit" in GNU Radio, so we have to use bytes to represent single bits.<br />
<br />
== Parameters ==<br />
; K<br />
: Constant for unpacking bits<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph is taken from the [[Guided_Tutorial_PSK_Demodulation]] tutorial.<br />
<br />
[[File:stage6_grc.png|906px|]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/unpack_k_bits_bb_impl.cc]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/unpack_k_bits.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/unpack_k_bits_bb_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/unpack_k_bits_bb.h]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/unpack_k_bits.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/grc/blocks_unpack_k_bits_bb.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=UChar_To_Float&diff=13065UChar To Float2023-04-11T16:34:22Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Convert stream of unsigned chars to a stream of floats.<br />
<br />
== Example Flowgraph ==<br />
This flowgraph shows the outputs of AND, OR, and XOR logic blocks converted to Float to display in a Time Sink.<br />
<br />
[[File:And_Or_Xor_fg.png|700px]]<br />
[[File:And_Or_Xor_out.png|700px]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/uchar_to_float_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/uchar_to_float_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/uchar_to_float.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/grc/blocks_uchar_to_float.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=RRC_Filter_Taps&diff=13052RRC Filter Taps2023-04-04T15:29:07Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
This is a convenience wrapper for calling firdes.root_raised_cosine(). A root-raised-cosine (RRC) filter is one of the most common pulse shaping filters in digital communications systems, used to perform matched filtering. See [https://en.wikipedia.org/wiki/Root-raised-cosine_filter RRC filter at wikipedia] for more info on RRC filtering.<br />
<br />
== Parameters ==<br />
; Gain<br />
: Overall gain of filter (default 1.0)<br />
<br />
; Sample Rate<br />
: Sample rate in samples per second.<br />
<br />
; Symbol Rate<br />
: Symbol rate, must be a factor of sample rate. Typically ((samples/second) / (samples/symbol)).<br />
<br />
; Excess BW<br />
: Excess bandwidth factor, also known as alpha. (default: 0.35)<br />
<br />
; Num Taps<br />
: Number of taps (default: 11*samp_rate). Note that the number of generated filter coefficients will be <code>num_taps + 1</code>. <br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph can be found at [https://github.com/gnuradio/gnuradio/blob/master/gr-filter/examples/filter_taps.grc].<br />
<br />
[[File:Filter_taps_fg.png|800px]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio TODO]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio TODO]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio TODO]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio TODO]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Root_Raised_Cosine_Filter&diff=13051Root Raised Cosine Filter2023-04-04T15:28:33Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
The '''Root Raised Cosine Filter''' blocks acts as a matched filter. Its primarily purpose is extracting a known digital signal out of noise; it does this more effectively than a low-pass filter, squelch, or other blocks. <br />
<br />
[[File:Matched_Filter_Total_System.jpg|881px|thumb|right|Root Raised Cosine Filter implements match filtering to pull square pulses out of an channel containing artificial Gaussian white noise.]]<br />
<br />
This filter is a convenience wrapper for a FIR filter and a firdes taps generating function.<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; FIR Type<br />
: options: [Complex->Complex (Decimating), Complex->Complex (Interpolating), Float->Float (Decimating), Float->Float (Interpolating)]<br />
<br />
; Decimation or Interpolation<br />
: decimation or interpolation factor (depending on which type is chosen above).<br />
<br />
; Gain (''R'')<br />
: Overall gain of filter (default 1.0)<br />
<br />
; Sample Rate (''R'')<br />
: Sample rate in samples per second.<br />
<br />
; Symbol Rate (''R'')<br />
: The baud rate. The RRCF seems to work best setting this parameter to ''baud_rate * 2''<br />
<br />
; Alpha (''R'')<br />
: Excess bandwidth factor, also known as alpha. (default: 0.35) With a very small alpha, say 0.001, the RRCF block produces sinusoidal-shaped symbols and culls more noise, whereas a large alpha produces more flat-topped symbols.<br />
<br />
; Num Taps (''R'')<br />
: Number of taps. This defaults to <code>11*samp_rate</code>, but this default is not actually in the code and such a default produces extremely high CPU costs. If the number of samples per symbol is known, a better default would be <code>working_sps * num_symbols</code> which allows the filter to rolloff across <code>num_symbols</code> on either side. Its often handy to work with a small number of samples/symbol, say 8, and a reasonable rolloff for <code>num_symbols</code> may be 32, in which case Num Taps is quite small and thus the RRCF block consumes fewer CPU resources. Experiment with this number to find a useful range for the filter in your situation. Note that the number of generated filter coefficients will be <code>num_taps + 1</code>. <br />
<br />
== Example Flowgraph ==<br />
<br />
=== Frequency-Shift Keying ===<br />
<br />
If you have demodulated Frequency-Shift Keying signal using a [[Quadrature Demod]] block, and you know the baud rate of the signal, and thus the duration of each symbol, the RRCS is useful for pulling these symbols out of the noise. In the process, the RRCS generates sinusoidal waves in place of the original square-wave symbols, rising from and falling to 0 and peaking at the center of each symbol. This result is extremely advantageous for clock recovery, as blocks like [[Symbol Sync]] need to lock onto the center of each symbol in order to reliably extract bits. The RRCS accomplishes both steps at once.<br />
<br />
In the below example, the RRCF performs match filtering against a Frequency-Shift Keying signal. No noise has been introduced in this example; it just isolates the narrow channel containing the signal, demodulates it, and then performs match filtering. In this example, Symbol Rate is set to <code>baud_rate * 2</code>.<br />
<br />
<gallery mode="packed"><br />
File:RRCF_flowgraph.png|An example flowgraph of this block, demonstrating how the RRCF implements a match filter against the demodulated FSK signal.<br />
File:RRCF_example.png|The RRCF isolates the square-wave symbols and produces sinusoidal waves, peaking in the center of each symbol.<br />
</gallery><br />
<br />
=== Waveform Shaping ===<br />
<br />
This flowgraph can be found at [https://github.com/duggabe/gr-morse-code-gen/blob/master/MorseGen_xmt.grc]. Two Root Raised Cosine Filters in series produce a Raised Cosine Filter which is used for keying waveform shaping, thereby reducing key clicks.<br />
<br />
[[File:MorseGen_xmt_fg.png|800px]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-filter/lib/firdes.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio TODO]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-filter/include/gnuradio/filter/firdes.h#L320 Taps creation]<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-filter/include/gnuradio/filter/interp_fir_filter.h Filter definition]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-filter/grc/filter_root_raised_cosine_filter.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Constellation_Decoder&diff=13022Constellation Decoder2023-03-22T14:24:01Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Decode a constellation's points from a complex space to (unpacked) bits based on the map of the object. See [[Constellation Soft Decoder]] for a soft output.<br />
<br />
== Parameters ==<br />
; Constellation<br />
: A constellation object, see [[Constellation Object]]<br />
<br />
== Example Flowgraph ==<br />
<br />
See [[Constellation Soft Decoder]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/lib/constellation_decoder_cb_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/lib/constellation_decoder_cb_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/include/gnuradio/digital/constellation_decoder_cb.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/grc/digital_constellation_decoder_cb.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Schmidl_%26_Cox_OFDM_synch.&diff=12961Schmidl & Cox OFDM synch.2023-02-27T17:06:25Z<p>Notou: Fix formatting issues, and missing words</p>
<hr />
<div>[[Category:Block Docs]]<br />
Schmidl & Cox synchronisation for OFDM.<br />
<br />
; Input: complex samples.<br />
; Output 0: Fine frequency offset, scaled by the OFDM symbol duration. This is <math>\hat{\varphi}</math> in [1]. The normalized frequency offset is then 2.0*output0/fft_len. <br />
; Output 1: Beginning of the first OFDM symbol after the first (doubled) OFDM symbol. The beginning is marked with a 1 (it's 0 everywhere else).<br />
<br />
The evaluation of the coarse frequency offset is '''''not''''' done in this block. <br />
Also, the initial equalizer taps are not calculated here.<br />
<br />
Note that we use a different normalization factor in the timing metric than the authors do in their original work[1]. If the timing metric (8) is <math>M(d) = \frac{|P(d)|^2}{(R(d))^2}</math>, we calculate the normalization as <math>R(d) = \frac{1}{2} \sum_{k=0}^{N-1} |r_{k+d}|^2</math> (N=fft_len), <br />
<br />
meaning that we estimate the energy from '''''both''''' half-symbols. This avoids spurious detects at the end of a burst, when the energy level suddenly drops.<br />
<br />
[1] Schmidl, T.M. and Cox, D.C., "Robust frequency and timing synchronization for OFDM", Communications, IEEE Transactions on, 1997.<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; FFT Length<br />
: FFT Length<br />
<br />
; Cyclic Prefix Length<br />
: Length of the guard interval (cyclic prefix) in samples<br />
<br />
; Preamble Carriers<br />
: If true, the carriers in the sync preamble are occupied such that the even carriers are used (0, 2, 4, ...). If you use all carriers, that would include the DC carrier, so be careful.<br />
<br />
; Threshold (''R'')<br />
: detection threshold. Default is 0.9.<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph can be found at [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/examples/ofdm/rx_ofdm.grc].<br />
<br />
[[File:Rx_ofdm_fg.png|800px]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/ofdm_sync_sc_cfb_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/include/gnuradio/digital/ofdm_sync_sc_cfb.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/grc/digital_ofdm_sync_sc_cfb.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=OFDM_Cyclic_Prefixer&diff=12658OFDM Cyclic Prefixer2022-11-23T13:26:59Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Adds a cyclic prefix and performs pulse shaping on OFDM symbols.<br />
<br />
; Input: OFDM symbols (in the time domain, i.e. after the IFFT). Optionally, entire frames can be processed. In this case, Length Tag Key must be specified which holds the key of the tag that denotes how many OFDM symbols are in a frame.<br />
<br />
; Output: A stream of (scalar) complex symbols, which include the cyclic prefix and the pulse shaping. <br />
: Note: If complete frames are processed, and Rolloff is greater than zero, the final OFDM symbol is followed by the delay line of the pulse shaping.<br />
<br />
The pulse shape is a raised cosine in the time domain.<br />
<br />
== Parameters ==<br />
<br />
; FFT Length<br />
: FFT Length (i.e. length of the OFDM symbols)<br />
<br />
; CP Length<br />
: Cyclic prefix length (in samples)<br />
<br />
; Rolloff<br />
: Length of the rolloff flank (in samples). That parameter can sometimes be found described as a percentage of the FFT Length, so that would be Rolloff (%) = (Rolloff (samples)/ FFT_len) * 100.<br />
: An explanation of this parameter can be found [https://rfmw.em.keysight.com/wireless/helpfiles/n7615b/Content/Main/ofdm_cosine_windowing.htm here]<br />
<br />
; Length Tag Key<br />
: For framed processing, the key of the length tag<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph can be found at [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/examples/ofdm/tx_ofdm.grc].<br />
<br />
[[File:Tx_ofdm_fg.png|800px]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/ofdm_cyclic_prefixer_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/ofdm_cyclic_prefixer_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/include/gnuradio/digital/ofdm_cyclic_prefixer.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/grc/digital_ofdm_cyclic_prefixer.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=OFDM_Cyclic_Prefixer&diff=12657OFDM Cyclic Prefixer2022-11-23T13:06:54Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Adds a cyclic prefix and performs pulse shaping on OFDM symbols.<br />
<br />
; Input: OFDM symbols (in the time domain, i.e. after the IFFT). Optionally, entire frames can be processed. In this case, Length Tag Key must be specified which holds the key of the tag that denotes how many OFDM symbols are in a frame.<br />
<br />
; Output: A stream of (scalar) complex symbols, which include the cyclic prefix and the pulse shaping. <br />
: Note: If complete frames are processed, and Rolloff is greater than zero, the final OFDM symbol is followed by the delay line of the pulse shaping.<br />
<br />
The pulse shape is a raised cosine in the time domain.<br />
<br />
== Parameters ==<br />
<br />
; FFT Length<br />
: FFT Length (i.e. length of the OFDM symbols)<br />
<br />
; CP Length<br />
: Cyclic prefix length (in samples)<br />
<br />
; Rolloff<br />
: Length of the rolloff flank in samples. An explanation of this parameter can be found [https://rfmw.em.keysight.com/wireless/helpfiles/n7615b/Content/Main/ofdm_cosine_windowing.htm here]<br />
<br />
; Length Tag Key<br />
: For framed processing, the key of the length tag<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph can be found at [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/examples/ofdm/tx_ofdm.grc].<br />
<br />
[[File:Tx_ofdm_fg.png|800px]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/ofdm_cyclic_prefixer_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/ofdm_cyclic_prefixer_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/include/gnuradio/digital/ofdm_cyclic_prefixer.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/grc/digital_ofdm_cyclic_prefixer.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=QT_GUI_Toggle_Button&diff=12654QT GUI Toggle Button2022-11-18T10:27:07Z<p>Notou: </p>
<hr />
<div>This block creates a variable toggle button. Leave the label blank to use the variable id as the label.<br />
<br />
A toggle button selects between two values of similar type, but will stay depressed until clicked again. The variable will take on one value or the other depending on whether the button is pressed or released.<br />
<br />
This button also will produce a state message matching the set values.<br><br />
<code>Added in 3.9</code><br />
<br />
== Parameters ==<br />
<b>(''R''):</b> <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Id<br />
: The variable name<br />
<br />
; Label<br />
: the name for the LED<br />
<br />
; Type<br />
: options: [Float, Integer, String, Boolean]<br />
<br />
; Default Value<br />
: default: 0<br />
<br />
; Initial State<br />
: options: [Released, Pressed]<br />
<br />
; Pressed<br />
: default: 1<br />
<br />
; Released<br />
: default: 0<br />
<br />
; Message Property Name<br />
: default: value<br />
<br />
; Released Background<br />
: options: [default, silver, gray, black, white, red, green, blue, navy, yellow, orange, purple, lime, aqua, teal]<br />
<br />
; Released Font Color<br />
: options: see above<br />
<br />
; Pressed Background<br />
: options: see above<br />
<br />
; Pressed Font Color<br />
: options: see above<br />
<br />
See [[GUI Hint]] for how to position the GUI within a window.<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph can be found at [https://github.com/gnuradio/gnuradio/blob/master/gr-qtgui/examples/test_led.grc]<br />
<br />
[[File:Test_led_fg.png]]<br />
<br />
== Example Output ==<br />
<br />
The <code>Msg Based State</code> widget is the Toggle Button.<br />
<br />
[[File:Test_led_out.png]]<br />
<br />
== Source Files ==<br />
<br />
; Python files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-qtgui/python/qtgui/togglebutton.py]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-qtgui/grc/qtgui_togglebutton.block.yml]<br />
<br />
[[Category:Block Docs]]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Constellation_Modulator&diff=12547Constellation Modulator2022-08-30T13:06:56Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Hierarchical block for RRC-filtered differential generic modulation. The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.<br />
<br />
== Parameters ==<br />
<br />
; Constellation<br />
: determines the modulation type, provide a [[Constellation Object]] here.<br />
<br />
; Samples per Symbol<br />
: samples per baud >= 2 (int)<br />
<br />
; Differential Encoding<br />
: whether to use differential encoding (boolean)<br />
<br />
; Excess BW<br />
: Root-raised cosine (RRC) filter excess bandwidth (float)<br />
<br />
; Verbose<br />
: Print information about modulator? (boolean)<br />
<br />
; Log<br />
: Log modulation data to files? (boolean)<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph modulates random bits with 8-PSK. A [[QT GUI Constellation Sink]] is specifically not added to the output because it would show the signal while there is still multiple samples per symbol.<br />
<br />
[[File:constellation_modulator_ex.png|600px]]<br />
<br />
[[File:constellation_modulator_ex2.png|600px]]<br />
<br />
== Source Files ==<br />
<br />
; Python<br />
: [https://github.com/gnuradio/gnuradio/blob/af78fad36d41b7c0d653ad21ec5ad8d58585d230/gr-digital/python/digital/generic_mod_demod.py#L64]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/grc/digital_constellation_modulator.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Variable_to_Message&diff=12415Variable to Message2022-08-10T14:09:06Z<p>Notou: </p>
<hr />
<div>This block will monitor a variable and, when it changes, generate a message pair.<br />
<br />
== Parameters ==<br />
<b>(''R''):</b> <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Variable (''R'')<br />
: variable name (default: freq)<br />
<br />
; Message Variable Name<br />
: name in message pair (default: 'freq')<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph can be found at [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/examples/var_to_msg.grc].<br />
<br />
[[File:Var_to_msg_fg.png]]<br />
<br />
== Example Output ==<br />
<br />
[[File:Var_to_msg_out.png]]<br />
<br />
== Source Files ==<br />
<br />
; Python files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/python/blocks/var_to_msg.py]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_var_to_msg.block.yml]<br />
<br />
[[Category:Block Docs]]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Correlation_Estimator&diff=12398Correlation Estimator2022-08-01T12:33:49Z<p>Notou: Add description and tag information present in the public header</p>
<hr />
<div>[[Category:Block Docs]]<br />
Correlates the input signal against the provided vector of samples and outputs a phase and symbol timing estimate.<br />
<br />
It adds the tags of "corr_start", "phase_est", "time_est", "corr_est", and "amp_est".<br />
<br />
This block is designed to search for a sync word by correlation and uses the results of the correlation to get a time and phase offset estimate. These estimates are passed downstream as stream tags for use by follow-on synchronization blocks.<br />
<br />
The sync word is provided as a set of symbols after being filtered by a baseband matched filter.<br />
<br />
The phase_est tag can be used by downstream blocks to adjust their phase estimator/correction loops, and is currently implemented by the [[Costas Loop]] block.<br />
<br />
The time_est tag can be used to adjust the sampling timing estimate of any downstream synchronization blocks and is currently implemented by the [[Polyphase Clock Sync]] block.<br />
<br />
The caller must provide a "time_est" and "phase_est" tag marking delay from the start of the correlated signal segment, in order to mark the proper point in the sync word for downstream synchronization blocks. Generally this block cannot know where the actual sync word symbols are located relative to "corr_start", given that some modulations have pulses with intentional ISI. The user should manually examine the primary output and the "corr_start" tag position to determine the required tag delay settings for the particular modulation, sync word, and downstream blocks used.<br />
<br />
For a discussion of the properties of complex correlations, with respect to signal processing, see:<br />
Marple, Jr., S. L., "Estimating Group Delay and Phase Delay via Discrete-Time 'Analytic' Cross-Correlation, _IEEE_Transactions_on_Signal_Processing_, Volume 47, No. 9, September 1999<br />
<br />
<br />
; Tag output:<br />
:'phase_est': Estimate of phase offset<br />
: 'time_est': Estimate of symbol timing offset<br />
: 'corr_est': Correlation value of the estimates<br />
: 'amp_est': 1 over the estimated amplitude. Estimated amplitude being the maximum amplitude of any one sample in the time window processed by the block (that at least includes the entire sync word)<br />
: 'corr_start': the start sample of the correlation and its value (same value as 'corr_est')<br />
<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Symbols<br />
: Set of symbols to correlate against (e.g., a sync word).<br />
<br />
; Samples per Symbol<br />
: Samples per symbol<br />
<br />
; Tag Marking Delay (''R'')<br />
: Tag marking delay in samples after the corr_start tag<br />
<br />
; Threshold (''R'')<br />
: Threshold of correlator: The meaning of this parameter depends on the threshold method used. For DYNAMIC threshold method, this parameter is actually 1 - Probability of False Alarm (under some inaccurate assumptions). The code performs the check |r[k]|^2 + |r[k+1]|^2 <> -log(1-threshold)*2*E, where r[k] is the correlated incoming signal, and E is the average sample energy of the correlated signal. For ABSOLUTE threshold method, this parameter sets the threshold to a fraction of the maximum squared autocorrelation. The code performs the check |r[k]|^2 <> threshold * R^2, where R is the precomputed max autocorrelation of the given sync word. Default is 0.9.<br />
<br />
; Threshold Method<br />
: Method for computing threshold. Options: [Absolute, Dynamic]<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph is extracted from [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/examples/demod/test_corr_est.grc]<br />
<br />
[[File:Test_corr_est_fg.png|800px]]<br />
<br />
== Example Output ==<br />
<br />
[[File:Test_corr_est_out.png|800px]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/lib/corr_est_cc_impl.cc corr_est_cc_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/lib/corr_est_cc_impl.h corr_est_cc_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/include/gnuradio/digital/corr_est_cc.h corr_est_cc.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/grc/digital_corr_est_cc.block.yml digital_corr_est_cc.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Keep_M_in_N&diff=12358Keep M in N2022-07-04T16:15:25Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Decimate a stream, keeping the first M items out of every N starting after offset items.<br />
<br />
Also see [[Keep 1 in N]].<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; M (''R'')<br />
: Number of items to take in block of items<br />
<br />
; N (''R'')<br />
: Block size in items<br />
<br />
; Initial Offset<br />
: Initial item offset into the stream<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/keep_m_in_n_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/keep_m_in_n_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/keep_m_in_n.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/grc/blocks_keep_m_in_n.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Power_Squelch&diff=11873Power Squelch2022-03-14T10:23:43Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
This will either pass the input unchanged, or block it, depending on whether its envelope is over a certain threshold. The envelope is calculated by taking the squared magnitude of the signal and lowpassing it with a single pole IIR filter (with the specified alpha). <br />
<br />
The ramp parameter specifies the attack / release time, in samples. A sinusodial ramp is used to progressively mute / unmute the input. If ramp is set to 0, input is muted / unmuted without a ramp. <br />
<br />
For realtime applications you'll want to set the gate parameter to false, which produces zeros when the input is muted. If it is true, the block will stop producing samples when in muted state.<br />
<br />
The block will emit a tag with the key "squelch_sob" with the value of PMT_NIL on the first item it passes, and with the key "squelch_eob" on the last item it passes.<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Threshold (''R'')<br />
: Threshold (in dB) for power squelch<br />
<br />
; Alpha (''R'')<br />
: Gain of averaging filter. Defaults to 0.0001.<br />
<br />
; Ramp <br />
: Attack/release time in samples; a sinusodial ramp is used. Set to 0 to disable.<br />
<br />
; Gate <br />
: If true, no output if no squelch tone. if false, output 0's if no squelch tone.<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/pwr_squelch_ff_impl.cc Float Input]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/pwr_squelch_cc_impl.cc Complex Input]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/squelch_base_ff_impl.cc Base squelch class, Float Input]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/squelch_base_cc_impl.cc Base squelch class, Complex Input]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/pwr_squelch_ff_impl.h Float Input]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/pwr_squelch_cc_impl.h Complex Input]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/squelch_base_ff_impl.h Base squelch class, Float Input]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/lib/squelch_base_cc_impl.h Base squelch class, Complex Input]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/include/gnuradio/analog/pwr_squelch_ff.h Float Input]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/include/gnuradio/analog/pwr_squelch_cc.h Complex Input]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/include/gnuradio/analog/squelch_base_ff.h Base squelch class, Float Input]<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/include/gnuradio/analog/squelch_base_cc.h Base squelch class, Complex Input]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-analog/grc/analog_pwr_squelch_xx.block.yml Yaml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Constellation_Encoder&diff=11579Constellation Encoder2022-03-03T13:56:31Z<p>Notou: Created page with "Category:Block Docs Encode index of constellation points into a constellation's complex space. The constellation is typically defined in a Constellation Object == Parameters == (''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span> ; Constellation Object : The object defining the constellation to use. == Example Flowgraph == Insert description of flowgraph here, then show a sc..."</p>
<hr />
<div>[[Category:Block Docs]]<br />
Encode index of constellation points into a constellation's complex space.<br />
<br />
The constellation is typically defined in a [[Constellation Object]]<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Constellation Object<br />
: The object defining the constellation to use.<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/lib/constellation_encoder_bc_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/lib/constellation_encoder_bc_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/include/gnuradio/digital/constellation_encoder_bc.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/main/gr-digital/grc/digital_constellation_encoder_bc.block.yml Yaml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Signal_Source&diff=8772Signal Source2021-09-08T09:14:55Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Signal generator: generates a variety of waveforms.<br />
<br />
Supports an output of type complex, float, int, and short<br />
<br />
== Parameters ==<br />
<b>(''R''):</b> <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Sample Rate (''R'')<br />
: default: samp_rate<br />
<br />
; Waveform (''R'')<br />
: options: [Constant, Sine, Cosine, Square, Triangle, Saw Tooth]<br />
: For selection with a variable, the following values should be used:<br />
constant = 100<br />
sine = 101<br />
cosine = 102<br />
square = 103<br />
triangle = 104<br />
sawtooth = 105<br />
<br />
; Frequency (''R'')<br />
: frequency of the waveform (default: 1000)<br />
<br />
; Amplitude (''R'')<br />
: amplitude of the output (default: 1)<br />
<br />
; Offset (''R'')<br />
: offset from zero (default: 0)<br />
<br />
; Initial Phase (Radians) (''R'')<br />
: default: 0<br />
<br />
== Messages ==<br />
<br />
The 'freq' message port has been <code>deprecated in 3.9</code> in favor of the 'cmd' message port.<br />
<br />
The 'cmd' message port accepts message [https://wiki.gnuradio.org/index.php/Polymorphic_Types_(PMTs)#Pairs pairs].<br />
* 'freq' . float value<br />
* 'ampl' . float value<br />
* 'phase' . float value<br />
* 'offset' . float value<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph is for version 3.9+.<br />
<br />
[[File:Signal-source-ex.png]]<br />
<br />
== Example Output ==<br />
<br />
Types of Waveforms:<br />
<br />
Cosine (complex):<br />
<br />
[[File:Signal-source-cosine.png|600px]]<br />
<br />
Constant:<br />
<br />
[[File:Signal-source-constant.png|600px]]<br />
<br />
Square:<br />
<br />
[[File:Signal-source-square.png|600px]]<br />
<br />
Triangle:<br />
<br />
[[File:Signal-source-triangle.png|600px]]<br />
<br />
Sawtooth:<br />
<br />
[[File:Signal-source-sawtooth.png|600px]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/lib/sig_source_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/lib/sig_source_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/include/gnuradio/analog/sig_source.h Base]<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/include/gnuradio/analog/sig_source_waveform.h Waveforms]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-analog/grc/analog_sig_source_x.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Tagged_Stream_Multiply_Length_Tag&diff=8736Tagged Stream Multiply Length Tag2021-07-27T13:36:09Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Allows scaling of a tagged stream length tag for constant rate change blocks in a tagged stream.<br />
<br />
Searches for a specific tagged stream length tag and multiplies that length by a constant.<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Length tag names<br />
: Length tag key<br />
<br />
; Length scalar (''R'')<br />
: Value to scale length tag values by<br />
<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph can be found at [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/examples/packet/packet_tx.grc]<br />
<br />
[[File:Packet_tx_fg.png|746px]]<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/tagged_stream_multiply_length_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/tagged_stream_multiply_length_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/tagged_stream_multiply_length.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_tagged_stream_multiply_length.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Patterned_Interleaver&diff=7768Patterned Interleaver2020-11-19T10:17:01Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Interleave items based on the provided vector.<br />
<br />
== Parameters ==<br />
<br />
; Pattern <br />
: Vector that represents the interleaving pattern<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/patterned_interleaver_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/patterned_interleaver_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/patterned_interleaver.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_patterned_interleaver.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Note&diff=7764Note2020-11-17T08:22:15Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Used to add a note/comment to a flowgraph. Alternatively, you can just use the "Comment" field in the Advanced tab of any block, to add a better looking note, the only downside of which is that it disappears when the block is disabled. <br />
<br />
== Parameters ==<br />
; Note<br />
: Message that will show up on the flowgraph<br />
<br />
== Example Flowgraph ==<br />
<br />
A Note block can be used to annotate special information on a flowgraph.<br />
<br />
[[File:RTTY_rcv.png|700px]]<br />
<br />
== Source Files ==<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/grc/blocks/note.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Frequency_Selective_Fading_Model&diff=7727Frequency Selective Fading Model2020-11-10T16:41:31Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
This block implements a basic fading model simulator that can be used to help evaluate, design, and test various signals, waveforms, and algorithms.<br />
<br />
; References<br />
: The flat-fading portion of the algorithm implements the following<br />
Compact Rayleigh and Rician fading simulator based on random walk processes<br />
A. Alimohammad S.F. Fard B.F. Cockburn C. Schlegel<br />
26th November 2008<br />
<br />
: The frequency selective extension of the block roughly implements<br />
A Low-Complexity Hardware Implementation of Discrete-Time<br />
Frequency-Selective Rayleigh Fading Channels<br />
F. Ren and Y. Zheng<br />
24-27 May 2009<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Num Sinusoids (SoS model)<br />
: Number of sinusoids used to simulate gain on each ray<br />
<br />
; Normalized Max Doppler (fD*Ts) (''R'')<br />
: Normalized maximum doppler frequency (f_doppler / f_samprate)<br />
<br />
; LOS Model<br />
: LOS path exists? chooses Rician (LOS) vs Rayleigh (NLOS) model.<br />
<br />
; Rician factor (K) (''R'')<br />
: Rician factor (ratio of the specular power to the scattered power)<br />
<br />
; Seed<br />
: Noise seed<br />
<br />
; PDP Delays (samp)<br />
: Time delay in the fir filter (in samples) for each arriving WSSUS Ray<br />
<br />
; PDP Magnitudes <br />
: Magnitude corresponding to each WSSUS Ray (linear)<br />
<br />
; Num Taps<br />
: Number of FIR taps to use in selective fading model<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-channels/lib/selective_fading_model_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-channels/lib/selective_fading_model_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-channels/include/gnuradio/channels/selective_fading_model.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-channels/grc/channels_selective_fading_model.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Frequency_Selective_Fading_Model&diff=7726Frequency Selective Fading Model2020-11-10T16:41:10Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
This block implements a basic fading model simulator that can be used to help evaluate, design, and test various signals, waveforms, and algorithms.<br />
<br />
; References<br />
: The flat-fading portion of the algorithm implements the following<br />
Compact Rayleigh and Rician fading simulator based on random walk processes<br />
A. Alimohammad S.F. Fard B.F. Cockburn C. Schlegel<br />
26th November 2008<br />
<br />
: The frequency selective extension of the block roughly implements<br />
A Low-Complexity Hardware Implementation of Discrete-Time<br />
Frequency-Selective Rayleigh Fading Channels<br />
F. Ren and Y. Zheng<br />
24-27 May 2009<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Num Sinusoids (SoS model)<br />
: Number of sinusoids used to simulate gain on each ray<br />
<br />
; Normalized Max Doppler (fD*Ts) (''R'')<br />
: Normalized maximum doppler frequency (f_doppler / f_samprate)<br />
<br />
; LOS Model<br />
: LOS path exists? chooses Rician (LOS) vs Rayleigh (NLOS) model.<br />
<br />
; Rician factor (K) (''R'')<br />
: Rician factor (ratio of the specular power to the scattered power)<br />
<br />
; Seed<br />
: Noise seed<br />
<br />
; PDP Delays (samp)<br />
: Time delay in the fir filter (in samples) for each arriving WSSUS Ray<br />
<br />
; PDP Magnitudes (linear)<br />
: Magnitude corresponding to each WSSUS Ray<br />
<br />
; Num Taps<br />
: Number of FIR taps to use in selective fading model<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-channels/lib/selective_fading_model_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-channels/lib/selective_fading_model_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-channels/include/gnuradio/channels/selective_fading_model.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-channels/grc/channels_selective_fading_model.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=PlutoSDR_Sink&diff=7108PlutoSDR Sink2020-05-25T08:16:27Z<p>Notou: </p>
<hr />
<div><!-- PlutoSDR_Sink.mediawiki --><br />
The PlutoSDR (a.k.a. ADALM-PLUTO) is a low-cost SDR made by Analog Devices, based on a [https://en.wikipedia.org/wiki/Product_binning binned] version of the AD9364 RFIC (same RFIC as in the USRP B200) which AD labels AD9363. It is set to operate between 325 MHz and 3.8 GHz can be extended to a range of 70 MHz to 6 GHz using simple "hack" described at [https://wiki.analog.com/university/tools/pluto/users/customizing the bottom of this page] (note that there is no performance guarantee in the extended range), and has a max sample rate of 56 MHz, but because it only has USB 2.0, the 56 MHz can only be acheived in short bursts. The max sample rate when continuously transmitting is more like 4 or 5 MHz. It has a Xilinx Zynq Z-7010 FPGA + ARM CPU on board, the ARM CPU runs a lightweight version of linux. It's set up to run as an IP device; the USB port on it appears as a USB to ethernet bridge. It also shows up as a mass storage device which lets you easily change the config (e.g. IP address) or load new firmware.<br />
<br />
For more info on getting the PlutoSDR installed and running, see this page https://wiki.analog.com/resources/tools-software/linux-software/gnuradio.<br />
<br />
== Parameters ==<br />
<br />
; IIO context URI<br />
: IP address of the unit, e.g. "ip:192.168.2.1" (without the quotes)<br />
<br />
; LO Frequency<br />
: Selects the TX local oscillator frequency.<br />
<br />
; Sample Rate<br />
: Sample rate in samples per second, this will define how much bandwidth your SDR transmits (the RF bandwidth parameter below just defines the filter). limits: >= 520833 and <= 61440000. A FIR filter needs to be loaded or set to auto for values below 2.083 MSPS.<br />
<br />
; RF Bandwidth<br />
: Configures TX analog filters: TX BB LPF and TX Secondary LPF. limits: >= 200000 and <= 52000000<br />
<br />
; Buffer size<br />
: Size of the internal buffer in samples. The IIO blocks will only input/output one buffer of samples at a time. To get the highest continuous sample rate, try using a number in the millions.<br />
<br />
; Cyclic<br />
: Set to “true” if the “cyclic” mode is desired. In this case, the first buffer of samples will be repeated on the PlutoSDR until the program is stopped. The PlutoSDR IIO block will report its processing as complete: the blocks connected to the PlutoSDR IIO block won't execute anymore, but the rest of the flow graph will.<br />
<br />
; Attenuation TX1 (dB)<br />
: Controls attenuation for TX1. The range is from 0 to -89.75 dB in 0.25dB steps.<br />
<br />
; Filter<br />
: Allows a FIR filter configuration to be loaded from a file.<br />
<br />
; Filter Auto<br />
: When enabled loads a default filter and thereby enables lower sampling / baseband rates.<br />
<br />
== Example Flowgraph ==<br />
<br />
This flowgraph shows a signal source feeding a Narrow Band FM modulator driving a PlutoSDR Sink block.<br />
<br />
[[File:Pluto_NFM_xmt_fg.png|800px]]<br />
<br />
== Source Files ==<br />
<br />
The actual source and sink blocks are created by an 'Industrial I/O' module. See https://wiki.analog.com/resources/tools-software/linux-software/gnuradio for details.<br />
<br />
[[Category:Block Docs]]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Variable_Config&diff=6927Variable Config2020-04-22T10:41:10Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
This block represents a variable that can be read from a config file.<br />
<br />
To save the value back into the config file: enter the name of another variable into the writeback param. When the other variable is changed at runtime, the config file will be re-written.<br />
<br />
The config files are INI files, with a file structure described [https://docs.python.org/3/library/configparser.html#supported-ini-file-structure here] and that basically look like this, parameters named (the key, or option parameter in the block) and organised in sections (the square-bracketed name).<br />
<br />
[Transmission]<br />
frequency = 2410000000<br />
gain = 10<br />
[Runtime]<br />
samp_rate = 1000000<br />
# Parameters for the low-pass filter<br />
[Filtering]<br />
cutoff = 10000<br />
width = 5000<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Id (''R'')<br />
: Id of the block, used to reference the variable in other blocks<br />
<br />
; Default value (''R'')<br />
: Default value to be used if the value cannot be read<br />
<br />
; Config file (''R'')<br />
: The file that stores the value<br />
<br />
; Section (''R'')<br />
: Section in the file containing the key/value pair of the variable<br />
<br />
; Option (''R'')<br />
: Key of the value in the file<br />
<br />
; WriteBack (''R'')<br />
: Variable to write in place of the current one<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/grc/blocks/variable_config.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Variable_Config&diff=6926Variable Config2020-04-22T10:28:38Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
This block represents a variable that can be read from a config file.<br />
<br />
To save the value back into the config file: enter the name of another variable into the writeback param. When the other variable is changed at runtime, the config file will be re-written.<br />
<br />
== Parameters ==<br />
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span><br />
<br />
; Id (''R'')<br />
: Id of the block, used to reference the variable in other blocks<br />
<br />
; Default value (''R'')<br />
: Default value to be used if the value cannot be read<br />
<br />
; Config file (''R'')<br />
: The file that stores the value<br />
<br />
; Section (''R'')<br />
: Section in the file containing the key/value pair of the variable<br />
<br />
; Option (''R'')<br />
: Key of the value in the file<br />
<br />
; WriteBack (''R'')<br />
: Variable to write in place of the current one<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/grc/blocks/variable_config.block.yml]</div>Notouhttps://wiki.gnuradio.org/index.php?title=Deinterleave&diff=6887Deinterleave2020-04-14T09:15:00Z<p>Notou: </p>
<hr />
<div>[[Category:Block Docs]]<br />
Deinterleave an input block of samples into N outputs.<br />
<br />
This block deinterleaves blocks of samples. For each output connection, the input stream will be deinterleaved successively to the output connections. <br />
By default, the block deinterleaves a single input to each output.<br />
<br />
blocksize = 1<br />
connections = 2<br />
input = [a, b, c, d, e, f, g, h]<br />
output[0] = [a, c, e, g]<br />
output[1] = [b, d, f, h]<br />
<br />
blocksize = 2<br />
connections = 2<br />
input = [a, b, c, d, e, f, g, h]<br />
output[0] = [a, b, e, f]<br />
output[1] = [c, d, g, h]<br />
<br />
See also [[Interleave]].<br />
<br />
== Parameters ==<br />
<br />
; Block size: Number of samples to output before switching to the next output<br />
<br />
== Example Flowgraph ==<br />
<br />
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.<br />
<br />
== Source Files ==<br />
<br />
; C++ files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/deinterleave_impl.cc]<br />
<br />
; Header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/deinterleave_impl.h]<br />
<br />
; Public header files<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/deinterleave.h]<br />
<br />
; Block definition<br />
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_deinterleave.block.yml]</div>Notou