# Usrp b210 gpio

**URL:** <https://www.ruby-forum.com/t/usrp-b210-gpio/242893>\
**Category:** GNU Radio\
**Created:** [August 5, 2015, 7:27pm UTC](https://www.ruby-forum.com/t/usrp-b210-gpio/242893 "2015-08-05T19:27:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [August 5, 2015, 7:27pm UTC](https://www.ruby-forum.com/t/usrp-b210-gpio/242893/1 "2015-08-05T19:27:27Z")

</div>

Hi, I want to control an antenna multiplxer via J504 gpio port. Actually  
I  
want to have logic 1 and logic 0 in order to switch the multiplxer. But  
it  
is difficult to find gpio example for B210. I have new version of b210  
(green board) and 3.8.005 uhd version. I m very much thankful to if you  
can  
help me with gpio example. Ettus research says that B210 is supported  
for  
gpio in j504 port but in UHD there is only one example for x300.

---

<div class="post-metadata">

**Author:** ![Samith\_Abeywickrama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@Samith\_Abeywickrama](https://www.ruby-forum.com/u/Samith_Abeywickrama)\
**Post date:** [August 5, 2015, 7:33pm UTC](https://www.ruby-forum.com/t/usrp-b210-gpio/242893/2 "2015-08-05T19:33:52Z")

</div>

The B2xx GPIO J504 GPIO has the same API as X3xx.

On 2015-08-05 13:26, Samith Abeywickrama wrote:

> Hi, I want to control an antenna multiplxer via J504 gpio port. Actually I want  
> to have logic 1 and logic 0 in order to switch the multiplxer. But it is difficult  
> to find gpio example for B210. I have new version of b210 (green board) and  
> 3.8.005 uhd version. I m very much thankful to if you can help me with gpio  
> example. Ettus research says that B210 is supported for gpio in j504 port but in  
> UHD there is only one example for x300.
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio) [1]

Links:

---

<div class="post-metadata">

**Author:** ![Samith\_Abeywickrama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@Samith\_Abeywickrama](https://www.ruby-forum.com/u/Samith_Abeywickrama)\
**Post date:** [August 5, 2015, 9:45pm UTC](https://www.ruby-forum.com/t/usrp-b210-gpio/242893/3 "2015-08-05T21:45:19Z")

</div>

On 05.08.2015 10:32, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The B2xx GPIO J504 GPIO has the same API as X3xx.

…and the example is also the same (gpio.cpp).

Cheers,  
Martin

---

<div class="post-metadata">

**Author:** ![Samith\_Abeywickrama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@Samith\_Abeywickrama](https://www.ruby-forum.com/u/Samith_Abeywickrama)\
**Post date:** [August 6, 2015, 5:44pm UTC](https://www.ruby-forum.com/t/usrp-b210-gpio/242893/4 "2015-08-06T17:44:07Z")

</div>

Hi,

Thank you for your quick reply. I tried to used that UHD example by  
doing  
several changes, but when I going to change data direction register  
(DDR)  
by "usrp-\>set\_gpio\_attr(gpio, “DDR”, ddr, mask); " command. But I got  
following error massage,

Error: LookupError: Path not found in tree: /mboards/0/gpio/DDR

I have Ver 6 USRP B210 green board and 3.8.005 UHD version. I am waiting  
for your help. Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Samith\_Abeywickrama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@Samith\_Abeywickrama](https://www.ruby-forum.com/u/Samith_Abeywickrama)\
**Post date:** [August 6, 2015, 7:40pm UTC](https://www.ruby-forum.com/t/usrp-b210-gpio/242893/5 "2015-08-06T19:40:58Z")

</div>

On 06.08.2015 08:20, Samith Abeywickrama wrote:

> Hi,
> 
> Thank you for your quick reply. I tried to used that UHD example by  
> doing several changes, but when I going to change data direction  
> register (DDR) by "usrp-\>set\_gpio\_attr(gpio, “DDR”, ddr, mask); "  
> command. But I got following error massage,

What’s the value of ‘gpio’?

M

---

<div class="post-metadata">

**Author:** ![Samith\_Abeywickrama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@Samith\_Abeywickrama](https://www.ruby-forum.com/u/Samith_Abeywickrama)\
**Post date:** [August 6, 2015, 8:56pm UTC](https://www.ruby-forum.com/t/usrp-b210-gpio/242893/6 "2015-08-06T20:56:55Z")

</div>

Is the UHD GPIO API available in Python yet?

Lou

Martin B.-2 wrote

> On 05.08.2015 10:32,

> mleech@

> wrote:
> 
> > The B2xx GPIO J504 GPIO has the same API as X3xx.
> 
> …and the example is also the same (gpio.cpp).
> 
> Cheers,  
> Martin

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/USRP-B210-GPIO-tp55275p55317.html](http://gnuradio.4.n7.nabble.com/USRP-B210-GPIO-tp55275p55317.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Samith\_Abeywickrama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ad7895/32.png) [@Samith\_Abeywickrama](https://www.ruby-forum.com/u/Samith_Abeywickrama)\
**Post date:** [August 6, 2015, 8:59pm UTC](https://www.ruby-forum.com/t/usrp-b210-gpio/242893/7 "2015-08-06T20:59:50Z")

</div>

Yes, but you need a fairly recent UHD + GNU Radio.

M
