I am in exactly the same place as you are in regard to learning about digital modulation and packet transmission in gnuradio. I am working towards development (and understanding) of a digital transmission and reception system. My goal is simply to learn how this is done in gnuradio.
I agree with you in that there is a lack of clear explanatory information online for this. I have found some examples but they use the deprecated “packet encoder” and “packet decoder” blocks and are not well-explained.
I did some research and found some references in forums et cetera that point to an excellent set of examples in newer gnuradio distributions, see (in general) /(you local install path)/gnuradio/share/examples/packet. There are a number of example flow graphs and some hierarchical blocks.
I am currently reading through these notes and am going to experiment with the hierarchical blocks to begin with.
I hope this info helps and good luck with your learning!
Thank you very much. I’ll see what I can do based on your suggestions.
The signal source is outputting unsigned bytes. The sample rate is 48k and the tone is 1k. Something I missed before that helps explain your plot ... the signal is rounded down to zero for all but the peak values, since abs(x) < 1 can not be represented without scaling. Packed/unpacked refer to bits of a digital signal. The tone is "analog", but you could think of it a "packed" if your audio codec is PCM (raw samples). PCM is a valid codec. It's what you find in a wav file. The problem you will run into is that any lost or corrupted symbols will ruin the audio. So, you would need to add framing/packetizing and error correction. Maybe someone else has a link to an example that shows how this works in GR. The concepts are not specific to GR.
Hi Jeff Long,
Thank you so much for your reply.
I understand the plot of the signal source now. I have the mpsk_stage6.grc running properly from the tutorial, and was able to compare the transmitting and receiving bit streams. I attached the grc file to this email. Additionally, could you please elaborate
more on the byte output of the signal source? Are they packed? Unpacked?
Moreover, as you stated that i should encode an analog signal to data before transmission, so does that mean I also have to use codecs in order to transmit a tone?
My last question would be: if I were to transmit an mp3 file, which is already encoded, will i be able to recover the audio using audio decoders?
Thanks again for your help!
ps: I apologize for my many questions as they may seem very basic. I am an engineering student and I am greatly thankful for your advice.
A better explanation of why that plot is correct: if you sample a tone twice per cycle, you see [-1,1,-1,1,...]. Four times per cycle, looks like [-1,0,1,0,...]. Even though it looks discontinuous, it will sound like a tone when played through
your sound card due to filtering in the audio software and/or hardware.
That tutorial goes through the low level portions of the digital chain, including timing recovery. Framing, error correction and (optionally) an audio codec would all be in addition to the blocks shown in the tutorial.
Depending on your sample rate and tone frequency, that plot would be correct.
The analog signal needs to be encoded somehow as data before transmission. While you could feed an audio file 2 bits at a time into a QPSK modulator, it's pretty unlikely that you will be able to recover the audio. If you're thinking of "transmitting audio",
look into audio codecs. If you're thinking of sending a wav file, you're really just sending packets. Either way, you will need a complete chain that includes error correction, clock recovery, etc.
1. I select the output of the signal source as bytes, and the time plot of it is attached. As you can see, the plot looks like bursts. But if I add an audio sink after signal source directly, I hear a constant tone. This does not make sense to me, as I
thought I should hear discontinuous sound as the plot shows, could someone explain this?
2. With the first question being said, I am using a constellation modulator (QPSK) that takes 2 bits/symbol.
How can I feed the output of signal source ( a 16-bit audio file later on) to the constellation modulator properly?
Thanks in advance!