# Raw binary data transmission

**URL:** <https://www.ruby-forum.com/t/raw-binary-data-transmission/210649>\
**Category:** GNU Radio\
**Created:** [August 13, 2011, 12:39am UTC](https://www.ruby-forum.com/t/raw-binary-data-transmission/210649 "2011-08-13T00:39:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [August 13, 2011, 12:39am UTC](https://www.ruby-forum.com/t/raw-binary-data-transmission/210649/1 "2011-08-13T00:39:03Z")

</div>

hi  
I am using USRP2 testbed and I am willing to transmit and receive  
binary data between two nodes I am using. I have been working with the  
benchmark\_tx and rx.py and I have been modifying those programs for  
the past 2 months for my project.  
I did this by, generating random number between 0 and 1 and then  
forming a binary sequence from it. But when adding the payload to the  
packet, I am not able to add any data of data type, other than string.  
So I had to make the binary numbers randomly and make them as string  
using str() function, and then add them to the payload before sending  
the packet.  
Is there anyway to transmit raw binary data through the nodes using  
the benchmark programs? Or is there any other program, that can help  
me with it?

thank you

---

<div class="post-metadata">

**Author:** ![shantharam\_balasubr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f6c823/32.png) [@shantharam\_balasubr](https://www.ruby-forum.com/u/shantharam_balasubr)\
**Post date:** [August 13, 2011, 10:26pm UTC](https://www.ruby-forum.com/t/raw-binary-data-transmission/210649/2 "2011-08-13T22:26:54Z")

</div>

On Fri, Aug 12, 2011 at 6:38 PM, shantharam balasubramanian  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> the packet.  
> Is there anyway to transmit raw binary data through the nodes using  
> the benchmark programs? Or is there any other program, that can help  
> me with it?
> 
> thank you

To do this, you’ll probably want to redo the benchmark programs a bit.  
You can make a gr.vector\_source\_b that you can put directly into the  
modulators. They expect to take packed bytes (that is, all 8 bits in  
the byte contain information). I use scipy.random.randint(0,256, N)  
for stuff like this.

If you are looking to packetize your data like the benchmark scripts  
do, then you will have to change how the paketizing function works to  
work with non-string data. We don’t have that functionality in there  
right now.

Tom
