PSK.py script giving errors

Hi All,

I am trying to make the following system.

Packet Generator ------> BPSK Modulator --------> Frequency Hopper
---------------> UHD Sink

I read that the generic block psk.py can be used as a BPSK modulator so
for
the 1st two blocks I use the class psk_mod(generic_mod), setting the
constellations as 2. Also the input to this block is a byte stream. So
the
1st two blocks of my system are set.

For frequency hopper () I want to send every new BPSK modulated packet
on a
different frequency seperated at 5MHz starting from 2.40Ghz) as I use
the
frequency_hopping.py module which uses stream_tags for frequenncy
tuning.
and Finally connecting it to the usrp sink.

Final system looking like this psk_mod (hier_block2),
hopper_block(hier_block2)

self.connect(psk_mod, hopper_block, self.sink)

However the PSK block gives the following errors.

  1. Traceback (most recent call last):
    File “./psk_fh.py”, line 301, in
    main()
    File “./psk_fh.py”, line 294, in main
    top_block = FlowGraph(args)
    File “./psk_fh.py”, line 258, in init
    src = psk_mod()
    File “./psk_fh.py”, line 119, in init
    super(psk_mod, self).init(constellation, differential, *args,
    **kwargs)
    TypeError: init() takes exactly 4 arguments (3 given)

Any help to resolve this or another approach to this system is
appriciated.

Vaibhav Kulkarni
ETH Zurich

On Tue, Feb 17, 2015 at 6:15 AM, vaibhav kulkarni <
[email protected]> wrote:

1st two blocks of my system are set.

super(psk_mod, self).__init__(constellation, differential, *args,

**kwargs)
TypeError: init() takes exactly 4 arguments (3 given)

Any help to resolve this or another approach to this system is
appriciated.

Vaibhav Kulkarni
ETH Zurich

This is probably related to a change in version for the psk_mod class.
Take
a look at the psk.py file you have. The current version looks like:

 def __init__(self, constellation_points=_def_constellation_points,
             mod_code=_def_mod_code,
             differential=_def_differential,
             *args, **kwargs):

So you need that mod_code value set, as well. It’s described in the
class
documentation.

Tom