Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

Can I use GNU Radio software with FlexRadio hardware?

James Cosby
James Cosby Member
edited March 2017 in Third-Party Software
I would like to experiment with GNU Radio Companion or python code using the GNU Radio library.   Is this possible?  Does anyone have experience with this?

Answers

  • D Major
    D Major Member
    edited March 2016
    Hi, also currently working on the project myself
    Found out that you can download the Flex radio API form the website
    and create a new wavwform API using https://github.com/n5ac/smartsdr-dsp
  • KD4HSO
    KD4HSO Member
    edited February 2017
    It would be nice to have a gr-osmosdr driver for the 6000. I'm in the process of learning C++, and hope to try to do it. http://sdr.osmocom.org/trac/wiki/GrOsmoSDR
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
    Maybe a good point to start from might be to first get the IQ Data ( https://community.flexradio.com/flexradio/topics/how-to-use-flexlib-api-iqstream ) and a Vita-49 UDP Source GNU Radio block? No Idea if that is the right path, but I'm about to give it a try :) Anyone already created that Vita-49 UDP Source GNU Radio block like in this doc: https://www.ettus.com/kb/detail/building-a-32-channel-system-with-the-qr210
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited June 2019
    Not as cool as a gr-osmosdr driver but - Proof of concept :) 


    https://www.youtube.com/watch?v=sgKFeRvCUFs

  • D Major
    D Major Member
    edited March 2017
    That's awesome, how do you link the IP address of the generated data stream in C++ to your source block. Sorry, couldn't review the code properly.
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited November 2016
    It's C# running on the windows machine. Currently not the smartest way of transporting and packing the data but enough for a proof of concept...
    Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);IPAddress serverAddr = IPAddress.Parse("<<GRC Machine IP here>>");
    IPEndPoint endPoint = new IPEndPoint(serverAddr, <<"GRC udp source" port here>>);
    In the dataReadyEvent: 

    sock.SendTo(<<<IQ data byte[]>>>> , endPoint);
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
    Another prototype, only linux involved now.  No windows box or proxy between. Using Mono... 
                var stream = ConnectedRadio.CreateAudioStream(1);
                stream.RXDataReady += rxdataReady;
                stream.RequestAudioStreamFromRadio();
                var IQ = ConnectedRadio.CreateIQStream (1);
                IQ.DataReady += IQ_DataReady;
                IQ.RequestIQStreamFromRadio ();
                var IQ2 = ConnectedRadio.CreateIQStream (2);
                IQ2.DataReady += IQ2_DataReady;
                IQ2.RequestIQStreamFromRadio (); 
    pushing the float[] into FIFOs, IQ directly into Gnu Radio, The audio goes to aplay -r 48000 -f  FLOAT_LE out.raw 

    Writing is just like: 
    foreach (var rx in data) {
                    write2.Write (BitConverter.GetBytes(rx));            
                }
                write2.Flush();  
    Performing fine, guess that's the right way to go for Audio / IQ. CAT will be pretty simple. Rendering Panadapters / Waterfalls will be HTML5.... not yet tried to get the Opus stream.


    https://www.youtube.com/watch?v=PO0I97daOuU

     
  • D Major
    D Major Member
    edited April 2016
    Nice, so when you get data streams from the flex radio do you just create a gnu radio block that decodes using the code.

  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
    It's just taking the raw floats from the 2 IQ channels, that I've subscribed and does a FFT on it. The audio is  DAX Audio channel #1, goes via fifo into aplay. It's more about exploring how to continue. Experimenting, and trying to first bring the DAX client to linux/PULSEAUDIO :) The result should look ~ like:  

    image
  • D Major
    D Major Member
    edited April 2016
    Hi, On your Dax IQ data to Gnu radio proof of concept do you run the SmartSDR software on windows then the Gnu radio GRC on linux. Im kinda conflicted because my SmartSDR only runs on Windows while my GRC runs on my linux. If I wanted to perform data stream setup for the UDP socket I can't view my IQ data waterfall and also run GRC on linux simultaneously.
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
    No, no SmartSDR, just the API. I'll publish an utility very soon, that can be used as a starting point.
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
    Started to push things to Github. A first small sample is published, to sned DAX IQ data to an UDP socket: 

    https://github.com/krippendorf/FlexlibMono

    Descriptions in the repo.

    Impressions: GRC & Baudline: 


    image


    image
  • D Major
    D Major Member
    edited April 2016
    Awesome, how do you generate the image
    Im guessing you use this window to input the util for pushing data to gnu radio
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
  • D Major
    D Major Member
    edited April 2016
    oh sorry, i didn't communicate my question well.
    I meant if I wanted to start using the util for pushing data into gnu radio, how I begin. 
    I already downloaded the github files you posted but confused at the part where you say "start the util in a shell".
    Don't know what shell your referring to.  
  • D Major
    D Major Member
    edited April 2016
    Sorry, guess what I'm saying is how do I run the SampleFlexWrapper.cs code on linux. When I run the code I get an error at Using flex.util, Using flex.smoothlake.flexlib and Using ZeroMQ. At line 23, 24 and 25 of the code.
    How do you get those to work. Thank you.
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
    I'll update the readme tonight, you have to compile the code, to run it. Details soon. What you'll need is the latest version of mono: http://www.mono-project.com/download/
  • D Major
    D Major Member
    edited April 2016
    I keep getting an error when compiling
    imageimage

  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
    sorry not made it today, just a short hint again: latest mono version, fresh git clone / post the full build log then please
  • D Major
    D Major Member
    edited April 2016
    ok Thanks.
    I currently have the latest mono version, a fresh git clone.
    I then progress to the src file then open the FlexlibMono.sln
    I then click on build all on the monodevelop window
    Then I get the error from the SampleFlexWrapper.cs codeimage
    This is the area I'm stuck at
    Also the PresentationCore and PresentationFramework references arent available
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
    ok, might simply be the build order. Travis on Github also has no issues. That is one reason, why I setup the Travis CI... To resolve: Click each proj (Vita, Util, UiW... first ) and press F7 to build on each, Flexlib/Queryutil last. Then rebuild the Solution. It's a very common Situation with sln files. Hope, that helps.
  • D Major
    D Major Member
    edited April 2016
    Thanks I was able to generate the code. I am receiving packet from the radio but my gnu radio"udp source block" doesnt seem to be receiving the waveforms as seen below
    imageimageimage
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
    Have you selected DAX channel 1 on the panadapter, that you want to stream? Its in SmartSDR on the panadapter (top left). Should be easy to get this running now ;) 
  • D Major
    D Major Member
    edited April 2016
    yeah, i did make my DAX channel= 1 on panadapter. 
    I used wireshark to confirm that my computer Ip address receive VITA 49 packets but the UDP block in grc doesnt seem to receive those packets or at imageimageleast generate a waveform
  • D Major
    D Major Member
    edited April 2016
    Hi Frank, do you by any chance have the VITA49 UDP block or packet. I think the radio only send packet in this form and an ordinary UDP can't read the packets. Thanks
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
    Well, I don't have that VITA49 block, but have just now verified, that my code is working. I'll try to push a version on the weekend with more debug output, to see what's going on. Have you tried to set a breakpoint to see what actually happens?

    Stay tuned for an updated. Work in progress :)

    For now: I've just quickly pushed a commit to github, so that you'll see an info on the console, that IQ data is actually being send.

    Maybe you also want to try to replace 127.0.0.1 with your local IP address.

    image
  • Frank, HB9FXQ
    Frank, HB9FXQ Member ✭✭
    edited March 2017
    sorry from the mobile, but your screenshot shows audio dax, not iq. see the dax button on the panadapter on the left. image
  • D Major
    D Major Member
    edited April 2016
    Hi, finally had grc receiving the packets but it takes forever to generate the waterfall plot and the fft plot is still non existent. Does this relate to the frequency i'm tuning into from my flex radio. image

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.