How can I transmit combination of bits instead of a wav file with GNURadio?

Status
Not open for further replies.

allexj

Member
Joined
Mar 2, 2020
Messages
5
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?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,493
Location
Talbot Co, MD
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?
Need more info... transmit what, to be received by who, and using what protocol?
gnuradio is just a toolbox - you need the application to define how the data will be serialized, encoded and then modulated before the HackRF can actually transmit it.
 

allexj

Member
Joined
Mar 2, 2020
Messages
5
Need more info... transmit what, to be received by who, and using what protocol?
gnuradio is just a toolbox - you need the application to define how the data will be serialized, encoded and then modulated before the HackRF can actually transmit it.
Thanks for answer. Like I said, I need to transmit a sequence of bits, received by a gate receiver, and using OOK (AM).

I know how to transmit a wav file and replay. But I don't know how can I transmit bitstreams. Sorry, I am very new to this world and I am trying to learn.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,493
Location
Talbot Co, MD
Unless you designed the receiver yourself I very much doubt it is using OOK as a modulation system. If it were, the way to send a sequence of bits would be by creating a signal source (carrier) and mixing it with a serialized data stream running at whatever bit rate you need.

I recommend you go read more about SDR and digital communications in general, then work on figuring out GNURadio.
 

krokus

Member
Premium Subscriber
Joined
Jun 9, 2006
Messages
6,205
Location
Southeastern Michigan
Thanks for answer. Like I said, I need to transmit a sequence of bits, received by a gate receiver, and using OOK (AM).

I know how to transmit a wav file and replay. But I don't know how can I transmit bitstreams. Sorry, I am very new to this world and I am trying to learn.

You are talking about using CW mode, not AM. A stream of serial data can be sent, but needs to use a protocol that will allow error detection and correction.

You would be better served by a Zigbee device, or something similar.
 

allexj

Member
Joined
Mar 2, 2020
Messages
5
76110646-27e6bc00-5fdf-11ea-82f9-afb157d20c50.png


76110719-4e0c5c00-5fdf-11ea-9391-0a342029c213.png


76110686-3df47c80-5fdf-11ea-90f6-17221eb4b396.png




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:


Code:
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:
76110759-63818600-5fdf-11ea-91d9-3d12a5c21407.png


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:

76110879-975cab80-5fdf-11ea-8dfe-695f59e52f1a.png



So my question is, how can I use more lists with "Vector Source" block?
 
Status
Not open for further replies.
Top