I have been coming here for all of my GNURadio and GRC problems, and
everyone seems beyond knowledgeable. That being said, I have come to
end of my recourses and am forced to pose a question. I hope this
already been answered, but I’ve been searching for a while, and have not
found anything relevant to what I’m about to post.
I am trying to implement FSK over the air using the USRP1 boards within
I have successfully sent large files between two computers, but am now
trying to implement sending a .wav via the .wav source (and in the
live audio with the audio source). In the case of pure bytes, the only
thing that controls the sampling rate is the USRP, ie
128M(samples/second)/interpolation. However, in the case of a .wav file
with a set sampling rate seems to be much harder. The following is the
signal chain I’m using, and the chain of my logic as well.
-Source: .wav at 44.1khz.
-Multiply constant: 127 times the values within [-1,1] from the .wav
-Float to short,
-Short to float: This essentially truncates the float output [-127,127]
the .wav to 255 discrete values (since I don’t know an easier way to do
-Float to char: Now we take those discrete values from [-127,127] and
them to a byte each.
-Simple framer: Since the framer appends a barker code to the beginning
my packet that is 8 bytes, a byte for the sequence number, and another
at the end of the packet (according to the code, the byte is 0x55, why
is there, I still don’t know), I set the packet length to 4086 (ie
4086+10=4096 total packet length, a multiple of 128, as per
SAMPLE RATE: I have assumed it to be about the same, since the bytes
are negligible compared to the packet length
-Packed to Unpacked: Bits/chunk=1, therefore, for each byte put into
packed to unpacked, I receive 8 bytes out.
SAMPLE RATE: 44.1kHz8 = 352.8kHz.
-Chunks to symbols: Since I’m only doing 2 level FSK, I only care about
value of the MSB, but I’m pretty sure the code for chunks to symbols
all the bits anyway, so again, our sample rate is not affected.
-Interpolating FIR filter: Set to length 8, with taps = 1. This
the effective mark and space bits out a little bit, ensuring full
from the output of the FM mod block. Therefore, for each float in, I
SAMPLE RATE = 352.9kHz8 = 2.8224MHz.
-FM mod: This is where my confidence drops. I have selected my symbols
2 and 4 in the previous block, and set sensitivity to pi/16. Therefore,
every “0” (symbol = 2), I get a full sinusoidal period in 8 samples, and
full periods in 8 samples of a “1” (symbol = 4).
Now, I’m stuck. I have kind of assumed the sample rate at the output of
FM mod block to be equal to that going in, ie 2.8224MHz. The USRP
at 128M(sample/sec) / interpolation. Therefore, 129M/2.8224M ~ 45 (my
I guess this is where I am stuck. I’m not going to post the details of
receive side, as it’s essentially exactly the same, but backwards, but
not getting a coherent .wav a the output of my speakers. It goes on for
small amount of time, and then the USRP outputs garbage (actually it
like a sinusoid with very low frequency) for a split second, then back
the regularly scheduled program. I am wondering if there is, and how a
buffer in the USRP (either block or actual hardware) treats a signal
being “fed” either too fast, or too slow. And if so, do I have to add a
rational resampler? I’m thinking I do, but I don’t think anything will
the two sampling rates to match exactly
I know this is a long one, but I’m at the end of the road of fully
understanding FSK within GRC and the USRP board, and am pleased with my
previous results. Now that there are two competing sampling rates, I
know what to do.
Thanks for your infinite wisdom,
View this message in context:
Sent from the GnuRadio mailing list archive at Nabble.com.