# Padding for USRP

**URL:** <https://www.ruby-forum.com/t/padding-for-usrp/226966>\
**Category:** GNU Radio\
**Created:** [February 27, 2013, 3:08am UTC](https://www.ruby-forum.com/t/padding-for-usrp/226966 "2013-02-27T03:08:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manu\_T\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea5d25/32.png) [@Manu\_T\_S](https://www.ruby-forum.com/u/Manu_T_S)\
**Post date:** [February 27, 2013, 3:08am UTC](https://www.ruby-forum.com/t/padding-for-usrp/226966/1 "2013-02-27T03:08:11Z")

</div>

In gnuradio/digital/packet\_utils, the packets are padded to make it a  
multiple of 512 bytes to be sent across the USB(As per the comment  
there).

USRP2 and N210 uses ethernet connection. Is it important to have padding  
for USRP in for these devices? If so is it the same number? ( 512 bytes  
to  
be sent across ethernet )

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Manu\_T\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea5d25/32.png) [@Manu\_T\_S](https://www.ruby-forum.com/u/Manu_T_S)\
**Post date:** [February 27, 2013, 3:13am UTC](https://www.ruby-forum.com/t/padding-for-usrp/226966/2 "2013-02-27T03:13:27Z")

</div>

On 02/26/2013 08:03 PM, Manu T S wrote:

> In gnuradio/digital/packet\_utils, the packets are padded to make it a  
> multiple of 512 bytes to be sent across the USB(As per the comment there).
> 
> USRP2 and N210 uses ethernet connection. Is it important to have padding  
> for USRP in for these devices? If so is it the same number? ( 512 bytes to  
> be sent across ethernet )

You should not need any padding. All of the devices (except usrp1) send  
samples encapsulated in a packet format so the boundaries of the samples  
are known by the device.

I dont think you need the padding for USRP1 either, since UHD will flush  
out the buffer to a 512 byte multiple if it sees the EOB specified.

-josh

---

<div class="post-metadata">

**Author:** ![Manu\_T\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea5d25/32.png) [@Manu\_T\_S](https://www.ruby-forum.com/u/Manu_T_S)\
**Post date:** [February 27, 2013, 4:11pm UTC](https://www.ruby-forum.com/t/padding-for-usrp/226966/3 "2013-02-27T16:11:50Z")

</div>

On Tue, Feb 26, 2013 at 9:12 PM, Josh B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> You should not need any padding. All of the devices (except usrp1) send  
> samples encapsulated in a packet format so the boundaries of the samples  
> are known by the device.
> 
> I dont think you need the padding for USRP1 either, since UHD will flush  
> out the buffer to a 512 byte multiple if it sees the EOB specified.
> 
> -josh

Yeah, that requirement comes from back in the libusrp days where it  
was just a pipe that we provided samples to and had to make sure the  
boundaries were met ourselves before sending along. With the UHD  
interface, you can safely ignore it.

Tom
