Close
0%
0%

networked RTL-SDR server

a wifi-based RTL-SDR receiver to cover 1 to 500 MHz

Similar projects worth following
I wanted a RTL-SDR receiver to scan the amateur radio bands. Being able to listen to other interesting chunks of RF is a bonus. I'd like to do this with a simple, remote good-enough performance setup alongside my QRP transceiver. The first version is based on a Nooelec dongle and upconverter connected to GLiNet wireless router.

my original design was based on a Pi board and Nooelec RTL-SDR. along the way, i found a very small wifi router, the GL-AR150, that comes with an external antenna, two configurable ethernet ports, a usb port and openwrt firmware for 28USD. that seemed like a deal, so I bought one and saved the Pi for another project.

i am new to openwrt and sdr, and haven't used linux at the command line for a long time, so i will get this working in stages. first goal: get the router up and running as a wifi client...

  • 1 × GLiNet AR-150 router
  • 1 × NEOelec NESDR SMArt

  • the rtl-sdr turns into an antenna farm

    worsthorse02/22/2017 at 17:51 0 comments

    i've been building out an amateur radio base station, of which the RTL-SDR networked receiver is to be part. the base station has turned into a big, deep rabbit hole... station grounding, lightning protection, RFI management, cabling and getting antennas in the air.

    i am not sure any of it is hackaday material, though the antenna part of the project involves designing, modeling and building real world antennas. i have been running through iterations of end-fed antennas, both resonant and random length, and i am putting together an old-fashioned dipole to be tuned with a johnson matchbox that will go up next week.

    i may post it as a project here anyway... making a SDR work in a RF noisy enviornment starts with building good antennas.

    and, someday, i will get back to building the networked RTL-SDR because I need a wideband receiver in my shack.

  • no electrons were harmed by this hack

    worsthorse12/23/2016 at 00:47 0 comments

    pretty much all of my projects have been on hold while I deal with a drainage system failure that led to a flooded basement. in between days of bailing water out of the basement and trying to dry the carpet and carpet pad, i've been building a drainage system out of flexible pipe, roofing cement and wire ties. if i get ambitious tomorrow, i will post a photo or two of the V3 (don't ask about V1 and V2, which were sopping wet failures) system.

    i am pretty sure i have it figured out but in case i don't? the carpet is rolled back so i could install flood barriers and a floor pump.

    hopefully i will be back on the rtl-sdr server project in a day or two.

  • configuring interfaces...

    worsthorse12/08/2016 at 22:41 0 comments

    The radio and related gear are sitting in a box while I figure out how to make the router work the way I want it to work. There's an awful lot about configuring Unix systems I don't remember and have to relearn. Now the router is unbricked and connected to my desktop machine with an ethernet cable, while I learn how to properly configure the network interfaces.

    Example of one of the things I need to figure out: wifi in station mode or as an AP client? When I started, I thought station was the answer, maybe not.

  • network bandwidth an issue

    worsthorse11/26/2016 at 16:57 0 comments

    when the dongle is supplying data over wifi, the SDR seems to stall two or three times a minute. i don't know if this is a buffering problem on the server or client side or a wifi bandwidth problem. i am guessing it is the wifi because my network has a lot of devices on it. i am going to configure the router as an access point on its own network (and a different wifi channel) and see what that does. more to follow...

  • the rtlsdr server

    worsthorse11/25/2016 at 21:30 0 comments

    from here, things are pretty straightforward. logged in as root using ssh and then installed some needed bits of software:

    opkg update
    opkg install rtlsdr
    opkg install librtlsdr
    opkg install nano
    
    the last one is a nice little editor (i have vi and i hardly ever do anything that requires emacs...) that is handy for modifying configuration files and such.

    now... backup the configuration, reboot, and startup rtl_tcp:

    rtl_tcp -a 192.168.10.13:1234 -n 8 -b 8

    the switches help keep the server from exiting every couple of minutes. i found the suggestion on this website and it seems to help (thanks tom!).

    there is another handy command you can use to see if the SDR is being seen:

    rtl_test -t
    which will return something like this if all is well:
    Found 1 device(s):
      0:  Realtek, RTL2838UHIDIR, SN: 00000001
    
    Using device 0: Generic RTL2832U OEM
    Found Rafael Micro R820T tuner
    Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 
    Sampling at 2048000 S/s.
    No E4000 tuner found, aborting.
    
    that's it. my basic configuration is up and running. i attached an antenna and ran a test from my mac, using gprx, and here's what i got:

    that's the noaa weather service, on my mac, with the rtlsdr radio plugged into a AR150 router, over wifi.

  • setting up lan and wifi

    worsthorse11/25/2016 at 17:44 0 comments

    i am going to be changing the /etc/config/wireless and /etc/config/network files, so having a backup of my current setup seems like a good idea. i do that through luCI.

    about thirty minutes later i accidentally cat an empty file into /etc/config/network...

    okay, backup restored. now set up the lan port with a static ip address, give it a netmask, turn off DHCP, turn off the bridging, add a rule to the firewall to insure i can connect using ssh.

    lan ip addr = 192.168.20.1 and netmask=255.255.255.0. firewall rule to accept traffic on port 22. i am not sure i need to do this but after going through a couple of rounds of "connection refused" that were hard to fix, i want to sure port 22 is open for ssh connections.

    remember to match my laptop's ethernet address to the new one to the one i just set and test the lan port. success!

    now set up wifi, since i am setting up a server, i want to make the router a client on my network. all this using LuCI:

    set up the wifi as a client, connecting to my wifi network (need the SSID, network passwork), and connecting to both the lan and, in a moment, the RTLSDRSVR interfaces

    set up an interface called RTLSDRSVR as a wireless client named HOTAKADAKE, connect to the wireless interface, and add it to the same firewall zone as the lan interface.

    with this setup, the router should be a server on my local wifi and, as importantly i should be able to get to it with terminal and access the interwebs through it (which will be handy when i need to update the router).

    reboot and test. works! can access the router through LuCI and terminal, and logged in through ssh, i can ping servers on the interwebs. i will post my network and wireless config files to show what worked for me.

  • first day: connecting to the router

    worsthorse11/25/2016 at 17:13 0 comments

      powered up the AR150, connecting to it through the wan port, using the terminal program and a lot of skimming the openwrt website. i am new to openwrt and the website is full of helpful information, with the usual caveats: you can't count on it as a cookbook and ymmv. that said, the page on the AR150 and the various how-to guides are pretty useful.

      i connected to the router using terminal, set the root password, mucked about a bit with the network interfaces and promptly bricked the device. i would repeat this process three or four times during the course of the day, so knowing how to reset the router and install new firmware came in handy.

      with an ethernet connection, i finally got to a stable configuration that allows (a) ethernet and wifi connections, (b) logging into the device using terminal and ssh or a web browser and LuCI, (c) the router in client mode on my network.

      so first...

      (1) set up an ethernet interface on the computer. the router will come up in bridge mode with the wlan disabled and an ip addr of 192.168.8.1. i set up an ethernet interface on my laptop with ip addr 192.168.8.2, mask 255.255.255.0, no router or dns and connected the router to the laptop, and pinged it. success!

      (2) log into the router with terminal. turns out that the AR150 is running chaos calmer v15.05. i think that means that telnet won't work, so... i log in using ssh, root@192.168.8.1, and viola! the welcome screen and a cli prompt.

      (3) make sure the router is running the latest firmware. i use the GL package rather than the openwrt version, which is available here.

      sidenote: i always use whatever i think will be easiest. for something like this router, sometimes that means the CLI, sometimes a web interface. for setting up the network interfaces and adding the RTL-SDR packages, LuCi is definitely the way to go...

      (4) reboot and test LuCI, set up network interfaces. go to 192.168.8.1 in the browser and the GL.iNet login screen appears. oops, should be 192.168.8.1/cgi-bin/luci/

      now, brick the device two or three more times trying to figure out how to turn off bridging and set up an wlan client. failsafe boot on the AR150:

      1. power down the router
      2. hold the reset button and apply power. the red light will start flashing.
      3. on the fifth flash, release the button.
      4. the red light should flash rapidly, then go out.
      5. the green light in the middle will be unlit, the green light on the end, lit.

      the device can be accessed through the wan or lan port using ssh. if both green lights are lit, try again!

      next post, setting up wifi and ethernet connections...

View all 7 project logs

  • 1
    Step 1

    /etc/config/wireless

    config wifi-device 'radio1'
    	option type 'mac80211'
    	option hwmode '11g'
    	option path 'platform/ar933x_wmac'
    	option htmode 'HT20'
    	option channel '9'
    	option txpower '18'
    	option country 'US'
    
    config wifi-iface
    	option device 'radio1'
    	option ssid 'xxxxxxxxxxx'
    	option mode 'sta'
    	option encryption 'psk2'
    	option key 'xxxxxxxxxxxxxxxxxxx'
    	option network 'lan rtlsdrsvr'
    
  • 2
    Step 2

    /etc/config/network

    config interface 'lan'
    	option ifname 'eth1'
    	option force_link '1'
    	option proto 'static'
    	option netmask '255.255.255.0'
    	option ip6assign '60'
    	option ipaddr '192.168.20.1'
    
    config interface 'wan'
    	option ifname 'eth0'
    	option proto 'dhcp'
    	option hostname 'HOTAKADAKE'
    
    config interface 'wan6'
    	option ifname '@wan'
    	option proto 'dhcpv6'
    
    config interface 'rtlsdrsvr'
    	option proto 'dhcp'

View all instructions

Enjoy this project?

Share

Discussions

RichardCollins wrote 04/04/2019 at 01:38 point

networked RTL-SDR server - a wifi-based RTL-SDR receiver to cover 1 to 500 MHz

WorstHorse:

If you work with adria.junyent-ferre and others who are trying to network sensors and devices, you might be able to rough out some conventions, and share what you have learned.  I like her approach.  You basically design your SDR as a "sensor", then prepare a data stream that can be shared with others.  You might try setting up a nodejs data server somewhere on the network.

I suggest stick with IP networks to start, as you have done.  But it seems ridiculous for you and hundreds of thousands of other developers to keep build the same software hooks just to write your datastream onto some other device.

I will try to find some framework to make it easier.  But you and Adria could at least talk about the broader data sharing needs of sensor data streams.

Personally, I would like to run ten of your SDRs for several weeks to see what the data is telling me about correlations.  

I have been looking for low cost ampliier boards and high sampling rate ADCs (Gsps+).  Do you know how to order PCB's?  I see them mentioned but do not know where to start. I can probably find and combine amplifier and ADC designs, if I don't have to assemble them myself.  From what I hear, they are fairly inexpensive, and I would like to be able to give away some to people who are struggling just go get some data.

Is there any way I could get you to change the name of your project to read "Zero to 1 GHz"???

:)

Richard Collins, The Internet Foundation

  Are you sure? yes | no

AJ wrote 09/22/2018 at 19:24 point

I'm using the AR150 mini router and Airspy SDR software......sdr app loads fine on the router, I can start the app using the IP address of the router no problem but no data shows on the SDR software.  If I use port 22 as my TCP RTL-SDR everything looks happy but no display...are there any other configs that need to be done to the router that I may have missed?  Kinda desperate to get this going...thank you!

Edit...found the problem....I had my WAN line attached to the mini router while testing the SDR...not a good thing....Airspy was looking for a port not on the router!  Note to self, remove WAN line after loading rtl_sdr software!!!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates