discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] loopback dropping final bits


From: Dan Halperin
Subject: [Discuss-gnuradio] loopback dropping final bits
Date: Wed, 28 Mar 2007 21:39:14 -0700
User-agent: Thunderbird 1.5.0.10 (X11/20070303)

Same loopback code I emailed about earlier; this time I attached the complete file (modulo some cleanup).

Here's my input file (in stupid x86 short ordering..):

   $ hexdump input.txt
   0000000 bbaa ddcc ffee 1100 3322 5544 7766 9988

and then after going through loopback.py and being packed back to bytes:

   $ hexdump output.txt
   0000000 bbaa ddcc ffee 1100 3322 5544 7766 8088

For verification that the packing worked,

   $ hexdump output.bin
   0000000 0001 0001 0001 0001 0001 0101 0001 0101
   0000010 0101 0000 0101 0000 0101 0100 0101 0100
   0000020 0101 0001 0101 0001 0101 0101 0101 0101
   0000030 0000 0000 0000 0000 0000 0100 0000 0100
   0000040 0000 0001 0000 0001 0000 0101 0000 0101
   0000050 0100 0000 0100 0000 0100 0100 0100 0100
   0000060 0100 0001 0100 0001 0100 0101 0100 0101
   0000070 0001 0000 0001 0000 0001 0000

Somewhere along the line, the last 5 symbols are being lost. I verified this with an input file containing hex 'FFFF', and got this output (that last zero byte is because hexdump is stupid).

   $ hexdump output.bin
   0000000 0101 0101 0101 0101 0101 0101 0101 0101
0000010 0101 0101 0101 0101 0101 0001
Any ideas as to why this happens?

Also: If I replace GMSK with DBPSK (:%s/gmsk/dbpsk/g will do it), I get the following output:

   $ hexdump output.txt
   0000000 0100 aa1e 33ef bb77 00fc 8844 11cd 9855

instead of (0000000 bbaa ddcc ffee 1100 3322 5544 7766 8088 with GMSK) with GMSK. Does DBPSK just suck, or do I need to be doing something else? I tried using Tom's new GMSK/DBPSK implementations but ran into some interpreter errors trying to coerce the blks2 code into the flow graph.

This may come back to some of the other problems people have been emailing about regarding the last bits of data being lost when stopping the flow graph...

-Dan
#!/usr/bin/python

# Global
from gnuradio import gr, blks
from gnuradio.blksimpl.gmsk import gmsk_mod, gmsk_demod

# Constants!
samples_per_symbol = 2

class loopback_graph(gr.flow_graph):

    def __init__(self):
        gr.flow_graph.__init__(self)

        # Set up TX PATH
        self.source = gr.file_source(gr.sizeof_char, "input.txt")
        self.modulator = gmsk_mod(self, samples_per_symbol)

        # Set up RX PATH
        self.demodulator = gmsk_demod(self, samples_per_symbol)
        self.sink = gr.file_sink(gr.sizeof_char, "output.bin")

        # Connect and start
        self.connect(self.source, self.modulator, self.demodulator, self.sink)

if __name__ == "__main__":
    try:
        graph = loopback_graph()
        graph.start()
        graph.stop()
        graph.wait()
    except KeyboardInterrupt:
        pass

reply via email to

[Prev in Thread] Current Thread [Next in Thread]