Loading ...
Sorry, an error occurred while loading the content.

Dongle Server for Raspberry Pi - configuration instructions

Expand Messages
  • Robert Nickels
    I went back over my notes and re-read the Osmocom installation instructions and what I ve seen elsewhere and have put this sequence together for creating a
    Message 1 of 4 , Dec 17, 2012
    • 0 Attachment
      I went back over my notes and re-read the Osmocom installation
      instructions and what I've seen elsewhere and have put this sequence
      together for creating a "dongle server" on the Pi. This allows the Pi
      to control a DVB-T dongle used as a low-cost SDR to send a high-speed
      stream of I/Q data over your LAN. This client-server approach
      eliminates the need to have the dongle connected by USB to the PC
      running SDR#, which opens up a number of interesting possibilities.


      1. Make sure your Pi distro is up to date before you begin

      apt-get update
      apt-get upgrade

      Enjoy a beverage of your choice while the Pi is uncompressing and
      installing the update files!

      2. From a terminal window, install the following:

      sudo apt-get install git
      sudo apt-get install cmake
      sudo apt-get install libusb-1.0-0.dev
      sudo apt-get install build-essential

      3. Osmocom (Open Source Mobile Communication) is a collection of Free
      Software / Open Source Software projects in the area of mobile
      communications. An Osmocom developer, Antti Palosaari, discovered
      the potential for using the cheap DVB-T dongle as a low-cost SDR and
      Osmocom have created the rtl software tools. Thanks to these talented
      developers we can now install the rtl software on the Rasperry Pi (see
      http://sdr.osmocom.org/trac/wiki/rtl-sdr for more information)
      git clone git://git.osmocom.org/rtl-sdr.git
      cd rtl-sdr/
      mkdir build
      cd build
      cmake ../
      make
      sudo make install
      sudo ldconfig

      4. Some users report better results connecting the dongle to a powered
      USB hub, but this is strictly a power supply capacity issue. I have no
      problem connecting the dongle either way.

      5. To test the installation, with the dongle plugged in navigate to
      /usr/local/bin and verify the four rtl programs are present. Run the
      following command

      sudo rtl_test -t

      You should see a sequence of test results as the software checks the PLL
      and gain range of your dongle. Success?

      Note: More experienced linux users will know how to change the rules to
      allow the dongle to be used by non-root users, but I just stick with
      sudo and keep myself out of trouble.

      6. Use the rtl_tcp to begin serving I/Q packets over your LAN, See the
      Osmocom site for details but the two command line arguments you need are
      the IP address of the R-Pi and the sample rate. Based on the speed of
      your LAN you may want to reduce the sample rate if you hear any
      "stuttering". (I normally run 1024000). Obtain the IP address for
      your PI and assuming for example that it is 192.168.1.22, the following
      would be the start-up command sequence:

      sudo rtl_ tcp -a 192.168.1.22 -s 1024000 (substitute the correct
      IP address for your Pi on your network)

      A sign on message will confirm the IP address to set in your client
      software. The default port is 1234, but this can be specified to be a
      different port if you wish, just be sure your router is set to pass port
      1234 or whatever you use.

      7. I won't go into detail of SDR# installation because you can get all
      that information here: http://rtlsdr.org/softwarewindows More
      importantly, you can skip the Zadig driver installation because it's
      only needed for using USB under Windows, and just run the Installation
      Script to automatically install the latest SDR# package for you.
      Download the script here: http://sdrsharp.com/index.php/downloads

      Launch SDR# and select "RTL-SDR / TCP" as the source and click
      "Config". Enter the IP address of the Pi and make sure the port and
      sample rate agree with what you set the server to. Click "Play" and
      you should be receiving samples just as if the dongle was attached
      directly to the PC.

      8. You will need to install ssh on the Pi and an ssh client such as
      PuTTY on the PC in order to control the dongle server from a remote
      client PC. I configured ssh to start up at launch so it is always
      active, which allows the Pi to become headless if you wish to do so.
      There are plenty of web resources that will cover ssh and PuTTY
      installation and use, I find it's necessary to keep a PuTTY session
      open whenever using rtl_tcp.

      Only one SDR# user can control the server at a time of course, but you
      can install SDR# on multiple PCs and have access to the SDR from
      anywhere, including via wi-fi, provided your network and the desired
      sample rate are compatible. Often as you get into the fringe area
      where wi-fi runs more slowly it is necessary to reduce the sample rate
      further.

      According to TOP, sending 1024000 samples per second is about 30% CPU
      utilization on the Pi. Going to 2048000 takes it to 60%.

      An obvious example of the value of the dongle server approach is the
      ability to locate the R-Pi and the dongle near the antenna to reduce
      feedline losses. Cat 5 is a lot cheaper than good low-loss coax!

      I'm far from a linux expert and the process above is a result of my own
      trial-and-error and notes as well as what I've picked up elsewhere.
      Every time I hit a bump in the road a Google search produced the answer
      or a workaround in minutes and I learned a lot in the process. I hope
      this sequence is correct and helps get more dongle servers up and running.

      73, Bob W9RAN
    • Philip
      Many many thanks for taking the trouble to post these instructions Robert...very much apreciated.. Regards Philip G4JVF ... I went back over my notes and
      Message 2 of 4 , Dec 18, 2012
      • 0 Attachment
        Many many thanks for taking the trouble to post these instructions
        Robert...very much apreciated..


        Regards
        Philip G4JVF




        --- In Raspberry_Pi_4-Ham_RADIO@yahoogroups.com, Robert Nickels wrote:

        I went back over my notes and re-read the Osmocom installation
        instructions and what I've seen elsewhere and have put this sequence
        together for creating a "dongle server" on the Pi.
      • sv5byr
        Hello all, I have done this and Im looking to manage pass RTL_TCP over the internet. What is the reason not pass ???
        Message 3 of 4 , Jan 18, 2013
        • 0 Attachment
          Hello all,
          I have done this and Im looking to manage pass RTL_TCP over the internet.
          What is the reason not pass ???


          --- In Raspberry_Pi_4-Ham_RADIO@yahoogroups.com, "Philip" wrote:
          >
          > Many many thanks for taking the trouble to post these instructions
          > Robert...very much apreciated..
          >
          >
          > Regards
          > Philip G4JVF
          >
          >
          >
          >
          > --- In Raspberry_Pi_4-Ham_RADIO@yahoogroups.com, Robert Nickels wrote:
          >
          > I went back over my notes and re-read the Osmocom installation
          > instructions and what I've seen elsewhere and have put this sequence
          > together for creating a "dongle server" on the Pi.
          >
        • Robert Nickels
          ... You re not going to be able to pass 1 or 2 million I/Q samples per second over the internet ; the solution I posted only enables you to send the I/Q
          Message 4 of 4 , Jan 18, 2013
          • 0 Attachment
            On 1/18/2013 9:58 AM, sv5byr wrote:
            > I have done this and Im looking to manage pass RTL_TCP over the internet.
            > What is the reason not pass ???
            You're not going to be able to pass 1 or 2 million I/Q samples per
            second over the " internet"; the solution I posted only enables you to
            send the I/Q data via your personal LAN (i.e. to other devices connected
            directly to your router). If you're having trouble doing this, you
            may need to configure your router and/or open up the firewall on the
            client PC - this depends on the exact combination of hardware and
            software you are using. Typical ethernet troubleshooting may be
            required - starting with ping to see if the two machines can reach each
            other. Also be sure your client SDR application is configured to look
            for input from the correct address/port (i.e. the address and port that
            is displayed in the rtl_tcp signon message) In SDR# this is done by
            selecting RTL-SDR / TCP and entering the address if the Pi using the
            Config menu.

            73, Bob W9RAN
          Your message has been successfully submitted and would be delivered to recipients shortly.