Trouble with gr_costas_loop_cc

Hello,

I am working on demodulating a BPSK signal (a manchester coded stream of
pseudorandom bits.) I’d like to use a gr_costas_loop_cc block to
recover the carrier. However, when I try to create the block with all
five args (alpha, beta, max_freq, min_freq, and ref_phase) as floats,
python returns the following:

" TypeError: argument number 5: a ‘long’ is expected, ‘float(0.1)’ is
received "

where 0.1 is the value assigned to ref_phase, the fifth parameter.

If I make ref_phase=0, then the error returned by python is:
" RuntimeError: std::invalid_argument "

In both cases, error appears to originate from costas_loop_cc in
gnuradio_swig_python.py. Source code for gr_costas_loop_cc indicates
that it definately wants all floats, so why is expecting a long for the
fifth parameter?

Any feedback on this would be greatly appreciated!

Best regards,
Jon


This message was sent on behalf of [email protected] at
openSubscriber.com
http://www.opensubscriber.com/messages/[email protected]/topic.html

That’s probably mostly due to a versioning problem. The reference phase
argument is no longer used. What the Costas loop is expecting, instead,
is
(alpha, beta, max_freq, min_freq, order). The order is the order of the
Costas loop. Use 2 for BPSK and 4 for QPSK. This determines how the
slicer
behaves on the incoming data (whether to lock to 2 phase reference
points or
4).

Look at the examples in gnuradio-examples/python/gmsk2, specifically the
benchmark_mpsk_tx.py, or more specifically, bpsk.py.

Speaking of which, the [d]psk.py files are pretty stable as they are
now
(though they need a bit more work) and can probably be placed in the
core
code with gmsk.py.

Tom

Thanks, that was indeed the problem!


This message was sent on behalf of [email protected] at
openSubscriber.com
http://www.opensubscriber.com/message/[email protected]/4681265.html

I’ve been looking at the bpsk.py code within the gmsk2 folder in
gnuradio-examples. I want to see what the complex signal looks like
before and after the gr_clock_recovery_mm_cc block. (On my version of a
bpsk receiver, I’m not able to get anything that makes sense to me out
of the Mueller and Muller clock recovery block.) To run bpsk.py in a
test, it looks like mpsk_test.py is supposed to be used. However, the
package “mpsk_pkt” is required by mpsk_test.py, and I don’t see it
anywhere. Any ideas where I should look for it? Is mpsk_test.py still
being worked on?

Best regards,
Jon


This message was sent on behalf of [email protected] at
openSubscriber.com
http://www.opensubscriber.com/message/[email protected]/4681265.html

On Thu, Sep 07, 2006 at 10:56:18PM +0800, [email protected] wrote:

I’ve been looking at the bpsk.py code within the gmsk2 folder in
gnuradio-examples. I want to see what the complex signal looks like
before and after the gr_clock_recovery_mm_cc block. (On my version
of a bpsk receiver, I’m not able to get anything that makes sense to
me out of the Mueller and Muller clock recovery block.) To run
bpsk.py in a test, it looks like mpsk_test.py is supposed to be
used. However, the package “mpsk_pkt” is required by mpsk_test.py,
and I don’t see it anywhere. Any ideas where I should look for it?
Is mpsk_test.py still being worked on?

Tom R. is currently refactoring all of this code to that you can
easily interchange GMSK, DBPSK and DQPSK. I expect he’ll have it
sorted out by the end of the week, if I stop bothering him about his
svn habits :wink:

Eric