Jump to content

allexj

Members
  • Content Count

    4
  • Joined

  • Last visited

Everything posted by allexj

  1. I am using "Vector Source" block. As you know, it's used with a list of ints. Of course, if I try to use more than a list, so if I use a list of lists, it gives me error: Traceback (most recent call last): File "/Users/user/top_block.py", line 160, in <module> main() File "/Users/user/top_block.py", line 148, in main tb = top_block_cls() File "/Users/user/top_block.py", line 90, in __init__ self.blocks_vector_source_x_0 = blocks.vector_source_c([x for x in sequence], True, 1, []) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/blocks/blocks_swig1.py", line 1593, in make return _blocks_swig1.vector_source_c_make(*args, **kwargs) TypeError: in method 'vector_source_c_make', argument 1 of type 'std::vector< gr_complex,std::allocator< gr_complex > > const &' >>> Done (return code 1) I also tried with: But it doesn't work neither (same error of before) Obviously if I write "sequence[0]" to select only the first sequence, it works, and no errors: So my question is, how can I use more lists with "Vector Source" block?
  2. As you can see, this "Sequences_vectors" python embedded block that I created, has a list of bit sequences and it uses a for cycle to select each sequence and then return them to the next block (Repeat block) to go on in the flowgraph. I did this to simulate a "Vector Source" block(that takes a _single_ list of bits), but that takes more than a single sequence of bits (in my case, as you can see in the code, there are three sequences). I'd like to transmit each of these three sequences of bits. How can I do? If I start the graph, it reports this errors: Generating: '/Users/user/top_block.py' Executing: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u /Users/user/top_block.py handler caught exception: in method 'block_gw_message_type_work_args_return_value_set', argument 2 of type 'int' Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/gateway.py", line 55, in eval try: self._callback() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/gateway.py", line 225, in __gr_block_handle ) for i in range(noutputs)], TypeError: in method 'block_gw_message_type_work_args_return_value_set', argument 2 of type 'int' thread[thread-per-block[1]: <block Sequences_vectors (2)>]: SWIG director method error. Error detected when calling 'feval_ll.eval' But even if it started without errors, I guess that the python embedded block wouldn't behave as expected. In fact I think it would return one list and stops, since the "return" only works one time and not more than one (so the other two sequences can't be "returned"). So I think my code wouldn't work.
  3. Maybe with vector source. But the point is, how can I test more than one combination of bits? So how to transmit multiple codes, instead of only one code with HackRF and GNURadio?
×
×
  • Create New...