|
From: | devin kelly |
Subject: | Re: [Discuss-gnuradio] DQPSK Transmitter and Receiver |
Date: | Tue, 27 Apr 2010 15:07:07 -0400 |
Here are my modulators. All I'm doing is switching between them.
modulator = gnuradio.blks2impl.dbpsk.dbpsk_mod(
samples_per_symbol=2,excess_bw=0.35,gray_code=True,
verbose=False,log=False)
modulator = gnuradio.blks2impl.dqpsk.dqpsk_mod(
samples_per_symbol=4,excess_bw=0.35,gray_code=True,verbose=False,log=False)
class tx_top_block(gr.top_block):
def __init__(self, mod):gr.top_block.__init__(self)modulator=modself.packet_modulator = blks2.mod_pkts(modulator,access_code=None,msgq_limit=4,pad_for_usrp=True,use_whitener_offset=False)usrp2_sink = usrp2.sink_32fc(network_interface)usrp2_sink.set_interp(interpolation)usrp2_sink.set_center_freq(center_freq)usrp2_sink.set_gain(usrp2_sink.gain_max())
self.connect(self.packet_modulator, usrp2_sink)
def main_loop(self):packet_size = 1000max_num_packets = 100000repeat_packets = True
try:data = "" World!\n"data = "" + (packet_size-len(data))*' ' # pad rest of packetself.start()print "Started Transmitter"while True:for pkt_num in xrange(0,max_num_packets):self.packet_modulator.send_pkt(data, False)if not repeat_packets:breakself.packet_modulator.send_pkt('', True) # Tell the source to block if it is done transmittingself.wait() # Wait for radio to finish.except KeyboardInterrupt:passprint "\n\nExiting."
Well, you haven't really told us what you are doing (code-wise), soOn Mon, Apr 26, 2010 at 1:30 AM, devin kelly <address@hidden> wrote:
> Hello Everyone,
> I've made a basic DBPSK transmitter and receiver. I can receive ASCII
> strings fine and the spectrum looks exactly as it should.
> However, if I swap the DBPSK modulator/demodulator for the DQPSK
> modulator/demodulator, my system breaks. I can no longer receive the same
> strings and the spectrum looks very strange. It's much wider and triangular
> shaped.
> Same goes for the D8PSK system and the D16PSK system I recently was asking
> about.
> I believe marcin_w asked a similar question a few days ago and I haven't
> seen a reply yet (am I wrong?) My question is, should I be doing something
> different? Do I need to add in some extra block when I switch from DBPSK to
> DQPSK? While searching old posts, I found some people talking about DQPSK
> not working correctly, but that was about a year ago.
> Any help would be greatly appreciated.
> Devin
it's hard to tell...
Have you compared your code to the dbpsk/dbpsk2 and dqpsk/dqpsk2
blocks in the source code? That might give you a hint.
My best (blind) guess is that you are feeding the modulator the wrong
number of bits per sample. You have to send a dbspk a chunk size of 1
bit / byte while the dqpsk takes 2 bits/byte chunks.
Tom
[Prev in Thread] | Current Thread | [Next in Thread] |