element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Evaluate GNU Radio application performance on Pi4(2G)
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 40 replies
  • Subscribers 664 subscribers
  • Views 7629 views
  • Users 0 members are here
  • raspberry_pi
Related

Evaluate GNU Radio application performance on Pi4(2G)

colporteur
colporteur over 5 years ago

The results after using a Raspberry Pi 3B+ to run a GNU Radio flow graph were unacceptable. The audio outputed from the Pi was distorted. I speculate the SBC doesn't have the performance specification to support GNU Radio.

 

I am trying to determine if the Raspberry Pi (version ?) is capable of supporting a GNU Radio flow graph. My current assessment is no. The hardware performance is not sufficient to handle the digital signal processing requirements.

 

It was suggested I make a forum post while some testing was done, so other interested could follow.

 

My objective was to write a tutorial for the GNU Radio application using a Raspberry Pi. After successfully building two GNU Radio flow graphs on my Ubuntu 18.04 i7 processor desktop, I ported the flow graphs to a Pi3B+ connected to an HDMI with audio monitor. One flow graph is an audio signal generator outputed to a speaker. The second is an FM receiver. Both flow graphs work in the sense they produce audio but with distortion and in the case of FM broadcast, unreadable.

 

The audio flow graph requires a GNU Radio software installation. The FM flow graph requires an SDR dongle to gather a broadcasted signal to feed the GNU Radio FM radio receiver flow graph. The test will be using the audio flow graph since no additional hardware is required.

 

image

cstanton  has agreed to use his Pi4(2G) to run the test. Before starting the exercise, I will ask Christopher to review review the procedures and provide feedback. I'm keeping the the verbiage terse, assuming a higher level of understanding. If more details are required or feel something is more appropriate or missing please let me know.

 

A zip file of two flow graphs is attached. The file with basic is minimal as it gets. The second file provides a test module. I experienced a problem with both.

 

 

Test Procedure:

Fresh install of Raspbian Buster Full, current release.

Apply O/S updates/upgrades & Install GNU Radio

 

///CODE START///

sudo apt-get update -y;sudo apt-get upgrade -y

sudo reboot

sudo apt-get install gnuradio

///CODE END///

 

Take screen shots of htop screen at the following milestones.

1. O/S idle, no application running on the GUI desktop other than what is defaulted.

2. GNU Radio started, no flow graph

3. GNU Radio flow graph loaded.

4. GNU Radio flow graph started.

5. Evaluate audio coming from speaker and advise.

 

Depending on results, i would like to expand the test Ginny pig agreed.

 

Sean

 

Message was edited by: sean conway I have uploaded the two audio flow graphs for GNU Radio. The current version of GNU Radio encourages development in QT widgets verses the WX widgets. Three is discussion in the community support for WX will disappear. The flow graphs provided are QT. Sean

Attachments:
gnuradio.zip
gnuradio_FM.zip
  • Sign in to reply
  • Cancel
Parents
  • Former Member
    Former Member over 5 years ago

    I used Gnu Radio GUI to generate a Python program for audio_QTv1.grc from the gnuradio.zip file.  The generation went fine.  But, these issues are apparent:

    (1) The generated code used the print syntax of Python 2.  This was easily fixable.

    (2) There are no Python 3 libraries as a result of the installation (apt install gnuradio).  I could only find gnuradio packages in /usr/lib/python2.7/dist-packages/gnuradio.

    (3) For those of you who use Anaconda instead of pip/pip3 to maintain your packages, this is probably a show stopper.

     

    Note that Python 2 is deprecated as of 2020-01-01.  Many developers are in the process of migrating to Python 3, particularly in scientific communities.

     

    So, if you want Python 3 support, do not do this immediately:  sudo apt-get install gnuradio

    Instead, use the PPA methodology first as described on https://wiki.gnuradio.org/index.php/InstallingGR#Ubuntu_PPA_Installation and then:  sudo apt-get install gnuradio

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 5 years ago

    I used Gnu Radio GUI to generate a Python program for audio_QTv1.grc from the gnuradio.zip file.  The generation went fine.  But, these issues are apparent:

    (1) The generated code used the print syntax of Python 2.  This was easily fixable.

    (2) There are no Python 3 libraries as a result of the installation (apt install gnuradio).  I could only find gnuradio packages in /usr/lib/python2.7/dist-packages/gnuradio.

    (3) For those of you who use Anaconda instead of pip/pip3 to maintain your packages, this is probably a show stopper.

     

    Note that Python 2 is deprecated as of 2020-01-01.  Many developers are in the process of migrating to Python 3, particularly in scientific communities.

     

    So, if you want Python 3 support, do not do this immediately:  sudo apt-get install gnuradio

    Instead, use the PPA methodology first as described on https://wiki.gnuradio.org/index.php/InstallingGR#Ubuntu_PPA_Installation and then:  sudo apt-get install gnuradio

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Former Member
    Former Member over 5 years ago in reply to Former Member

    With the newer version of GRC, it generated a Python 3 version of top_block.py that worked fine the first time.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • colporteur
    colporteur over 5 years ago in reply to Former Member

    Can i get some clarification. I feel like we are both flying around the same light bulb seeing something different.

     

    • How are you installing GRC (i.e. GNU Radio). apt-get or compiling?
    • What version of GRC is reported within the application?
    • I understand the python version relationship. I thought a 3.8 install of GRC was Python3 and Python 2 was gone. Is this correct?
    • I am seeing differences in GRC version depending if the load is for a Pi or say a Ubuntu Linux. You suggest a newer version of GRC will produce a top_block for the audio flow graph without errors. That has not been my experience as late as my last post. What do you believe is a new version of GRC?

     

    This post I stumbled across https://github.com/lutusp/PLSDR/issues/6  alludes to a similar error code. It is pretty general on the problem description but rings to an audio configuration problem with the application. I'm thinking GRC is expecting a particular audio configuration on the Pi that is not there generating the error. The work around of establishing a bluetooth configuration puts in place a audio configuration GRC can use. I wish I was more familiar with Pi audio architecture but I work with what I have.

     

    I do like your thought process and would like to continue the discussion. My goal is to establish a consistent process for a Pi GRC installation. The process would give you the ability to verify the install to say this should work.

     

    Sean

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 5 years ago in reply to colporteur

    My premise is that I will no longer use Python 2 since it is deprecated; all of my projects are now converted to Python 3.  What I described previously was what I did for an x86/x64 APT-based Linux system like one of the *buntus or debian.  On my Xubuntu x64 build, it worked perfectly.  Clearly, this is not appropriate for a Raspberry Pi.  So, I'll see what I can do on my Raspberry Pi 3B (don't have a 4 yet) which boots and runs from a USB disk (relief from using a MicroSD which I highly recommend!).

     

    This is what I found for the Raspberry Pi: https://wiki.gnuradio.org/index.php/InstallingGRFromSource_on_Raspberry_Pi which leads you to https://wiki.gnuradio.org/index.php/InstallingGR#To_install_system_wide as part of installation.

    I did this because the existing Raspbian Buster does not yet have a Python 3 oriented package for gnuradio; this is a "build from (github source") exercise.  Certainly, gnuradio 3.8.0 (latest github version) will eventually find its ways into all of the repositories.

     

    On a Raspberry Pi 4, building from source is MUCH faster, I would imagine! image

     

    If you are not worried about excess heat and freezing up, when you get to the `make` step, use the -j parameter for specifying more than one CPU cores.  I used `make -j3 # 3 CPU cores` since my Pi is otherwise idle at the moment.  It feels cool to the touch but, then again, it is not a Pi 4.

     

    Version: The CHANGELOG.md file on github indicates that this is [3.8.0.0] - 2019-08-09.

    Python flavor: I selected Python 3 per instructions (recommended). I did not try Python 2.

    Differences in GRC between Pi and Ubuntu: Going to be looking out for this.  Thanks for the heads up.

     

    Begin make step at 13:25 USA CT.  I'll report when the make step ends. Time for tea and scones.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 5 years ago in reply to Former Member

    At 14:05 USA CT (40 elapsed minutes), I am 33% of the way through the make (compiles).  So, my estimation is that this will take 120 minutes from start to end on a Raspberry Pi 3B with a USB disk and using 3 of its CPU cores.  In theory, I should be done around 15:25.

     

    CPU Speed 1200 Mhz | CPU Temp 85 °C

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • colporteur
    colporteur over 5 years ago in reply to Former Member

    Your description confirms to me, that you flying around a different light bulb that I am.  I'm going to avoid flying off to your bulb and stick to my current light source.

     

    Raspbian Buster 2019-09-26 full image loads GNU Radio companion (GRC) 3.7.13.4.

    Ubuntu 18.04 loads GRC 3.7.11.

     

    Both installs are accomplished with an apt-get install gnuradio. I discovered the Raspbian version comes up short in how it is packaged. It doesn't support SDR devices. You must perform an apt-get install gr-osmosdr to get the SDR source blocks. This is not required on the Ubuntu install.  I'm not going to go down the rabbit hole of why there are differences.

     

    The problem under analysis is poor audio from GRC on a Pi3B+. On Christopher's cstanton install, using the package manager he experienced an error, that prevented the flow graph from running. I found a kludge to work around the error by configuring the Pi to support Bluetooth audio. With the Kludge in place the Pi3B+ appears to work and the audio is acceptable using the audio flow graph. My RTL/SDR is on loan at the moment so I can confirm if the Pi GRC install works.

     

    I am hoping the GRC audio issue error message is a simple ALSA audio configuration issue. My scuba tanks are not sufficient to explore that depth at the moment.

     

    I would be curious to discover if a compiled version of GRC gets the same error Christopher experienced. To have confidence in the results, the Pi O/S must be pristine (i.e. nothing install but GRC) because it has been demonstrated loading other applications that configure audio can and do screw other applications running on the Pi.

     

    Sean

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 5 years ago in reply to colporteur

    Lucky for me that I am not interested in outgoing audio.  My personal interest is in processing incoming electromagnetic radiation in the radio band.

     

    On *buntu x86/x64, you can use the PPA method (simple) that I described earlier of getting gnuradio 3.8.0 (Python 3) until it finds its way into the main repos.  Once installed, maintaining updates is the same with any *buntu package through APT.  So, its an Ubuntu PPA temporarily versus being stuck on Python 2.  Pick yer poison.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 5 years ago in reply to colporteur

    Have you folks seen this RPi4-related gnuradio graphics and performance bug report?  https://github.com/gnuradio/gnuradio/issues/2848

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 5 years ago in reply to Former Member

    Only 68% done and still running!  This is why I drive project managers crazy. image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 5 years ago in reply to Former Member

    It must have finished very late.  I went to bed around 22:00 USA CT.

    This morning, I ran `make test`.  Out of 362 tests, all passed except the following:

    149 - qa_pmt (Failed)

    347 - qa_qtgui (Failed)

    358 - qa_zeromq_pub (Failed)

    359 - qa_zeromq_pubsub (Failed)

    360 - qa_zeromq_pushpull (Failed)

    361 - qa_zeromq_reqrep (Failed)

    362 - qa_zeromq_sub (Failed)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 5 years ago in reply to Former Member

    No errors finishing up:

    sudo make install

     

    du -ks /usr/local

    322224 /usr/local

     

    So, plan on adding 322 MB with this build in addition to the 700 MB needed in the source directories for `make` executions.

     

    The gnuradio version is 3.9.0.

     

    Unfortunately, there seems to be no gnuradio-companion as a result of this build.  I looked all over my disk.

     

    Ran sudo make uninstall and now I am trying the pybombs method as described on the gnuradio github page.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube