Twoish questions:
I’ve done a lot of code reading the last 2 weeks and worked on a custom
PSK
modulator (basically hierarchical 2/4psk). I’ve tested it at baseband on
everything seems good, so I’m hoping now to use something like
benchmark{rx,tx} to test it ota.
I’ve built a couple of sample flowgraphs. The first one is a BPSK
loopback:
flow graph
tb = gr.top_block()
tb.connect(src, mod, demod, repacker, dst)
tb.run()
print dst.data()
It’s output is almost correct:
207, 79, 208, 80, 209, 81, 210, 82, 211, 83, 212, 84, 213, 85, 214, 86,
215, 87, 216, 88, 217, 89, 218, 90, 219, 91, 220, 92, 221, 93, 222, 94,
223, 95, 224, 96, 225, 97, 226, 98, 227, 99, 228, 100, 229, 101, 230, 102,
231, 103, 232, 104, 233, 105, 234, 106, 235, 107, 236, 108, 237, 109, 238,
110, 239, 111, 240, 112, 241, 113, 242, 114, 243, 115, 244, 116, 245, 117,
246, 118, 247, 119, 248, 120, 249, 121, 250, 122, 251)
The first few bytes are 0’s, which as I understand has to do with the
RRC
filters, frequency correction, and possibly agc filter. Then it starts
at
128, 0 and increments by 1. I think I would expect it it to go from
0…255
but it looks like something else that’s also incrementing by 1 is
interleaved in there. Looking at the output before the repacker confirms
that each byte appears repeated twice, but the first instance has the
MSB
set to 1.
Doing a similar loopback in GRC with PSK Mod/Demod results in what I
would
expect (non-repeated bytes with MSB not set to 1). Would this be the
proper
way of using these blocks?
A related question, where is the packing being done in the benchmark_rx
path? The generic_demod does an unpack_k_bits, but doesn’t appear to
pack
them back up. In the benchmark_rx callback it looks like the packet is
already full of packed bytes, but I haven’t seen the unpacked_to_packed
in
pkt.py.
Thanks for any help,
-Nathan