I’m trying to employ basic On-off keying (OOK) modulation to transmit
stream. The way I’m doing it is by using UDP streaming from VLC player
collecting that data by a UDP source in GRC. Since this is OOK, I assume
the flowgraph should be somewhat similar to FSK, and hence my flowgraph
UDP source (output: byte) => Packed to Unpacked (bits/chunk: 1,
MSB, output: byte) => Convert to complex => UHD Sink
The problem is, when I start the program, the output contains
which means there is an underrun problem, which means I have to lower my
sample rate. Now, suppose the bitrate of my video is 1Mbps. If I set the
sampling rate to 1Mbps, the problem goes away. So, do I have to set the
sampling rate as exactly to the bitrate of my video? Of course, if I set
sampling rate lower than the video bitrate, the problem doesn’t occur,
doesn’t that mean the USRP is missing bits in that case?
Maybe for transmitting correctly, I have to repeat each sample from the
source (after the Packed-to-Unpacked block) 8 times (say). Then I have
use the sampling rate at the UHD sink to be 8Mbps to avoid the underrun
problem (assuming video bitrate is 1Mbps). If I set it higher, underrun
occurs; if I set it lower, underrun will not occur, but the USRP should
missing samples then.
Are the above suppositions correct? Is there a better way to set sample
rate which does not have to be hardcoded based on the bitrate of video?
Maybe somehow set a high sample rate and be done with it?