discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [USRP-users] GPIO setup via gnuradio


From: Michael Dickens
Subject: Re: [USRP-users] GPIO setup via gnuradio
Date: Fri, 17 Apr 2020 14:27:15 -0400

Ohh ... nice! I didn't know gr-uhd provided that interface! A quick search shows it's in GR as of sometime in version 3.7 .. not sure how far back, but certainly in the current release. Good to know!

Note that this gr-uhd GPIO API is available in Python (via SWIG) as well as C++ ... BUT: it is not exposed into GRC.

Hence, to use the UHD GPIO API inside GRC, you'll still need to do what I wrote previously: provide the UHD USRP object to your custom GRC block (whether Python or C++), and then it can manipulate the USRP GPIO via the gr-uhd Python provided API, or directly in C++ via the UHD C++ API for GPIO.

Fun fun fun! - MLD


On Fri, Apr 17, 2020 at 1:36 PM Rob Kossler <address@hidden> wrote:
The following link (GR documentation) shows some UHD GPIO functionality.
https://www.gnuradio.org/doc/doxygen/classgr_1_1uhd_1_1usrp__block.html

On Fri, Apr 17, 2020 at 10:27 AM Michael Dickens via USRP-users <address@hidden> wrote:
Hi Ivan - I'm assuming you mean configure and control a USRP's GPIO via UHD in GNU Radio?

In theory this should be possible, at least in C++ and of course it requires that the specific USRP have GPIO ... 

I'm not sure if there's a Python GPIO API as of UHD 3.15, but if there is then that method should work about the same as the C++ method.

You'd have to get access to the instantiated USRP object, then you can use that object to issue GPIO related calls. See these pages for more info about GPIO in UHD:




I can't think of a current GNU Radio block that handles UHD USRP GPIO. If you look around & can't find one, then you'd need to create a custom GNU Radio block to handle this. You would pass your new block the USRP object, which you'd then use for the GPIO calls ... using Python or C++ depending on which API is available for your specific UHD.

Maybe there's another way that I don't know of? If so hopefully others will add to the discussion!

Hope this is useful! - MLD

On Fri, Apr 17, 2020 at 9:15 AM Ivan Zahartchuk via USRP-users <address@hidden> wrote:
Hello. Please tell me if it is possible to configure GPIO using gnuradio. I want to use RFNOC blocks and switch an external device using GPIO
_______________________________________________
USRP-users mailing list
address@hidden
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
_______________________________________________
USRP-users mailing list
address@hidden
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]