1 2 Previous Next 16 Replies Latest reply on Mar 18, 2016 1:53 PM by PabloM_Intel

    GNU Radio on Intel Edison Platform?

    HiFreqLoFreq

      Hi Intel forums! I'll start by saying that I feel quite out of my element when it comes to this subject matter, so I apologize for any unclear statements or obvious questions. I studied HDL design and Digital Signal Processing in school and I'm trying to branch out by working on small projects that are more software-based in my free time.


      Yesterday I ran into this article: http://www.rs-online.com/designspark/electronics/eng/blog/taking-the-raspberry-pi-2-for-a-test-drive-with-gnu-radio-2 In the article, the author installs a non-standard Raspbian version of GNU Radio and uses it to do some simple signal analysis using a USB SDR using his Raspberry Pi 2.

       

      This spawned an idea for me. A few months ago, I purchased an Intel Edison platform from SparkFun, but never got around to doing much with it. I could hook a USB SDR into the peripheral USB port on the SparkFun base block and use it as a small signal storage/analysis tool. However, on my Edison I run Yocto Linux, which GNU Radio doesn't appear compatible with. So, I was looking for ideas on how to get GNU Radio installed on the Yocto system. I have attempted to use Debian-based Ubilinux on my Edison to install GNU Radio, but I could never get the WiFi to work properly. I'm not opposed to building the GNU Radio files on my Ubuntu laptop (like the top Python file) and then transferring them to the Edison. I just want Yocto on the Edison to have the ability to run the GNU Radio Companion generated code and control the SDR that way.


      Any guidance would be greatly appreciated.

        • 1. Re: GNU Radio on Intel Edison Platform?
          PabloM_Intel

          Hi HiFreqLoFreq,

           

          It should be possible to add GNURadio to the Yocto image, as it is in concluded in this other thread https://communities.intel.com/thread/56810. You can check the instructions to build your own image from the Intel Edison BSP. I would even suggest you to check the comment from the first link that I posted here. As it contains some useful information to add packages.

           

          Regards,

          Pablo

          • 2. Re: GNU Radio on Intel Edison Platform?
            spooq

            I was working on getting this going yesterday and this morning. I have GnuRadio installed, but have a couple of comments to make.

             

            Seems like the busybox netcat has the listen/server config turned off. Would be nice to turn that on in future builds, I can't imagine it takes much space and it is handy.

             

            Libfftw3 is compiled without single-precision floating point, which means a lot of the fundamental GR blocks fail to configure. I've put the configure args to rebuild it in the post below this one.

             

            Without doing that, here's what I have working and not:

             

            -- ######################################################

            -- # Gnuradio enabled components

            -- ######################################################

            --   * python-support

            --   * testing-support

            --   * gnuradio-runtime

            --   * gr-ctrlport

            --   * gr-blocks

            --   * gr-fec

            --   * gr-audio

            --   * * oss

            --   * gr-noaa

            --   * gr-utils

            --   * gr-fcd

            --   * gr-zeromq

            --

            -- ######################################################

            -- # Gnuradio disabled components

            -- ######################################################

            --   * doxygen

            --   * sphinx

            --   * gnuradio-companion

            --   * gr-fft

            --   * gr-filter

            --   * gr-analog

            --   * gr-digital

            --   * gr-dtv

            --   * gr-atsc

            --   * gr-comedi

            --   * gr-channels

            --   * gr-pager

            --   * gr-qtgui

            --   * gr-trellis

            --   * gr-uhd

            --   * gr-video-sdl

            --   * gr-vocoder

            --   * gr-wavelet

            --   * gr-wxgui

             

            Generally, building GR is difficult enough that they invented their own packaging system - pybombs. The wisdom or not of that aside, it doesn't work out of the box. You'll need to git the source, and the source for a few of the dependencies. I built libhackrf and volk from scratch, for example. Also, the GR build itself takes long enough that I left it running overnight. I'm not cross-compiling, because I can't be bothered setting up such an environment, and don't have a suitable machine for it right now anyway.

             

            I'm not going to make a package/image for this, sorry. I don't have experience with opkg, and don't want to commit the time to learning.

            • 3. Re: GNU Radio on Intel Edison Platform?
              spooq

              Some further notes on (re)building libfftw3, cause without gr-digital and gr-analog, I suspect GR is pointless:

               

              Get the package, not the git, becase the autoconf doesn't work right now, at least not how I remember using it. Ain't nobody got time for fixing m4 macros on a weekend

               

              The latest package is what's in the Edison opkg list anyway, so we won't have clashing versions of headers or whatnot.

               

              ./configure --enable-float --enable-sse --enable-sse2 && make && make install

               

              After doing that, GR cmake reports:

               

              -- ######################################################

              -- # Gnuradio enabled components

              -- ######################################################

              --   * python-support

              --   * testing-support

              --   * gnuradio-runtime

              --   * gr-ctrlport

              --   * gr-blocks

              --   * gr-fec

              --   * gr-fft

              --   * gr-filter

              --   * gr-analog

              --   * gr-digital

              --   * gr-dtv

              --   * gr-atsc

              --   * gr-audio

              --   * * oss

              --   * gr-channels

              --   * gr-noaa

              --   * gr-pager

              --   * gr-trellis

              --   * gr-utils

              --   * gr-vocoder

              --   * gr-fcd

              --   * gr-zeromq

              --

              -- ######################################################

              -- # Gnuradio disabled components

              -- ######################################################

              --   * doxygen

              --   * sphinx

              --   * gnuradio-companion

              --   * gr-comedi

              --   * gr-qtgui

              --   * gr-uhd

              --   * gr-video-sdl

              --   * gr-wavelet

              --   * gr-wxgui

               

              So lets

               

              nohup make -j2 &

               

              and let it do its thing for a few hours. I probably won't get to do much more with this until next week now.

              • 4. Re: GNU Radio on Intel Edison Platform?
                spooq

                This makes installing boost easier:

                 

                for i in `opkg list | grep libboost | cut -f 1 -d' '`; do opkg install $i; done

                 

                I'd also like to say that this is the entire reason I own an Edison. Having SSE should make GnuRadio much much faster than running on a RPi.

                 

                I did grab dump1090, but I didn't appreciate that would need some build-system love to get it to compile with *just* HackRF support. Right now it relies on having the other hardware target libraries as well. I'll probably start commenting code rather than fix that, I wouldn't be surprised if they didn't want to accept that kind of change in their repos anyway, which is fair enough.

                • 5. Re: GNU Radio on Intel Edison Platform?
                  PabloM_Intel

                  Hi spooq,

                   

                  Thank you very much for sharing your experience installing GNURadio with us. About your comments, we will take into account your suggestion to turn on the listen/server configuration in busybox, it should help you and other users.

                   

                  I just want to make something clear about your configuration arguments, Libfftw3 with single-precision floating point should have the following configuration, right?

                   

                  -- ######################################################
                  -- # Gnuradio enabled components
                  -- ######################################################
                  --  * python-support
                  --  * testing-support
                  --  * gnuradio-runtime
                  --  * gr-ctrlport
                  --  * gr-blocks
                  --  * gr-fec
                  --  * gr-fft
                  --  * gr-filter
                  --  * gr-analog
                  --  * gr-digital
                  --  * gr-dtv
                  --  * gr-atsc
                  --  * gr-audio
                  --  * * oss
                  --  * gr-channels
                  --  * gr-noaa
                  --  * gr-pager
                  --  * gr-trellis
                  --  * gr-utils
                  --  * gr-vocoder
                  --  * gr-fcd
                  --  * gr-zeromq
                  --
                  -- ######################################################
                  -- # Gnuradio disabled components
                  -- ######################################################
                  --  * doxygen
                  --  * sphinx
                  --  * gnuradio-companion
                  --  * gr-comedi
                  --  * gr-qtgui
                  --  * gr-uhd
                  --  * gr-video-sdl
                  --  * gr-wavelet
                  --  * gr-wxgui
                  

                   

                  Please correct me if I’m wrong.

                   

                  Regards,

                  Pablo

                  • 6. Re: GNU Radio on Intel Edison Platform?
                    HiFreqLoFreq

                    Spooq,

                     

                    Thanks for taking the time to go through this. I followed your instructions and got GNURadio to start building with the required components. I keep having an "Out of Memory" issue and build stop when running "make -j2". Since the Edison does not allow you to create swap space (that I've found), do you have any suggestions about how to get around this?

                    • 7. Re: GNU Radio on Intel Edison Platform?
                      spooq

                      Hi Pablo and HiFreqLowFreq. I'll give a bit of an update from my side.

                       

                      Pablo, that config output that you are showing is from GnuRadio. The difference between the two configs I listed is when the config detects Libfftw3 has been built with single-precision. So first I tried the GR config with just the opkg package (from either the original install or AlexT, not sure where it came from). Then I compiled libfftw3 on the Edison with "--enable-float --enable-sse --enable-sse2", as I said in my post above. "enable-float" lets the GR modules work, and the SSE arguments make them faster. I can't remember if it builds both precision libraries at the same time, maybe it just does one or the other.

                       

                      HiFreqLowFreq, sounds like you are following in my footsteps... right into the same wall I ran into over the last weekend. There just isn't enough RAM on the Edison to compile the Python bindings. I tried a couple of minor workarounds in terms of gcc args, but they didn't help. I also thought we could just use swap, but the swap subsystem isn't turned on in the kernel config - the "swapon" command doesn't work. If you know a place we can quickly get a recompiled kernel with swap compiled in, let me know, and we can just plug in some USB storage and it should work.

                       

                      I've tried a different approach over the weekend, I wiped an old laptop and put Ubuntu 15 on it. I tried building the latest Yocto, but that isn't particularly compatible with the Intel overlays, so I reverted back to the full package Intel provide on their website. Then I found out that the newer GCC on Ubuntu 15 is out of step with the older Intel source. It's not too bad, Building Yocto image on Ubuntu 15 with GCC5 is very helpful. If you want to try this approach, then I recommend using Ubuntu 14 or some other slightly older distro that's supported. To be fair, the bitbake command did warn me that what I was doing wasn't supported.

                       

                      So right now, I'm at the point where I still need to apply another patch to get past the GCC issues, then I'll probably run out of harddrive space (it's an old laptop), so I'll need to hook some external storage up to my laptop to finish the build. At that point, I'll need to decide between continuing with the host build, or just turning swap on and building on the Edison again.

                       

                      It's a bit of an epic, but we'll get there in the end!

                      • 8. Re: GNU Radio on Intel Edison Platform?
                        spooq

                        So I've been out to the shed where the old laptop lives, and I've done the needful. Had to modify some of the patches to get them to work. Using Ubuntu 15 is definitely playing on hard mode for this stuff. Bitbake is pretty much spot on 50% done, so left it doing its thing.

                        • 9. Re: GNU Radio on Intel Edison Platform?
                          spooq

                          I now have working swap on the Edison!

                          • 10. Re: GNU Radio on Intel Edison Platform?
                            spooq

                            I've used the swap (200MB on a USB stick) to compile GNURadio. I've also setup PulseAudio to forward the /dev/dsp device (using padsp) to my Linux laptop, so when I run the dialtone example, it plays through the laptop. I'm making a copy of the image now, and I'll upload it to Dropbox or something when it is done. If you take that image and restore it, hopefully you'll have the same setup without having to go through the pain of the full compilation process. I left the GrOsmoSDR source code on the image, so if you need to recompile that so that GnuRadio supports some other hardware than HackRF, you can easily do that.

                             

                            edison.zip - Google Drive

                            • 11. Re: GNU Radio on Intel Edison Platform?
                              HiFreqLoFreq

                              Thanks for the tip! Bitbake finally came through for me. I'm currently attempting to compile GNURadio using the swap space, but I wanted to check out your uploaded image. Could you tell me what you're using to open/modify your "edison.image" file?

                               

                              Edit: It looks like it might be an Apple Disk Image. I'm currently working on a Windows and Linux platform. Would you be able to image it as an ISO file instead of a .IMAGE file? I'm not sure there is any program on Windows or Linux that can handle the .IMAGE file. Thanks!

                              • 12. Re: GNU Radio on Intel Edison Platform?
                                spooq

                                Sorry, I should have given better instructions! The file is just a straight byte-for-byte copy of the entire Edison flash drive. You can unzip it on a USB stick, and then use

                                dd if=edison.image of=/dev/mmcblk0 bs=1M

                                to restore it, then reboot. This will wipe everything from your Edison, and replace it with a clone of what is currently on mine.

                                 

                                I made it by just flipping the input and output the other way, like this:

                                dd if=/dev/mmcblk0 of=edison.image bs=1M

                                You might want to use that to backup first. I haven't tried to restore the image yet, but I can see no reason it wouldn't work.


                                • 13. Re: GNU Radio on Intel Edison Platform?
                                  HiFreqLoFreq

                                  Something weird while running the dd command. I run "dd if=edison.image of=/dev/mmcblk0 bs=1M" the system reboots, but cannot mount /home and constantly pops up with errors about the ext4 partition and you cannot navigate into it. Linux also wont recognize "reboot" oddly enough. I'll keep at it. Perhaps it didn't copy correctly.

                                   

                                  I've been attempting to boot my bitbake Linux kernel. It works, but for some reason the networking has stopped working completely, which makes it impossible for me to download the git for GNURadio. I get the "[FAILED] Failed to start Load Kernel Modules." on boot up now. I've been mounting the baked ext4 image and copying it to the SD card using "cp -a" command, same way that works with the default Edison image. Re-baking again and hoping for the best.

                                   

                                  One problem after another, it seems. What a headache. Any suggestions would be greatly appreciated.

                                  • 14. Re: GNU Radio on Intel Edison Platform?
                                    spooq

                                    It's a shame that the image didn't work

                                     

                                    You might want to try using the "flashall.sh" script rather than copying, when you try to use your own build of the software.

                                     

                                    See Creating a Custom Linux Kernel for the Edison | Shawn Hymel

                                     

                                    cd ../device-software/utils/flash

                                    ./postBuild.sh

                                     

                                    That creates a "toFlash" directory. You can run the flashall script from there as root, and it should detect and flash the Edison completely. This is how I loaded my bitbake'd software. I suspect you are somehow missing some files when you do the copy. I found if it isn't run as root, then it sort of half detects the Edison, but it doesn't work.

                                    1 2 Previous Next