On Tue, Feb 17, 2015 at 6:15 AM, vaibhav kulkarni <
vaibhavkulkarn...@gmail.com> wrote:

> 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 <module>
>     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
>


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
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to