[Support] FoxxMD - shinysdr


13 posts in this topic Last Reply

Recommended Posts

Application Name: shinysdr
Application Site: https://shinysdr.switchb.org

Github Repo: https://github.com/kpreid/shinysdr

Docker Hub: https://hub.docker.com/r/jeffersonjhunt/shinysdr

Template Repo: https://github.com/FoxxMD/unraid-docker-templates

 

Overview

 

ShinySDR is the software component of a software-defined radio receiver. When combined with suitable hardware devices such as the RTL-SDR, HackRF, or USRP, it can be used to listen to or display data from a variety of radio transmissions.

 

This docker includes additional plugins courtesy of the maintainer:

  • python-libhamlib2 -- Controlling external hardware radios
  • gr-air-modes -- ADS-B, aircraft transponders
  • rtl_433 -- Miscellaneous telemetry (remote temperature sensors)
  • gr_radioteletype -- radioteletype (RTTY and modern PSK31 IE real-time keyboard-to-keyboard chat over radio)
  • WSJTX -- weak-signal digital communication
  • gr-dsd -- Digital Speech Decoder (Unencrypted signals for formats like P25 Phase 1, D-STAR, etc.)
  • multimon-ng -- Decoding for more digital transmission modes

 

How To Use

 

A config file -- config.py -- in the Config path host directory is necessary in order to run this container! Create one using the instructions below or bring your own ;)

 

Using Sample Config

 

I have provided a default configuration below. It is slightly opinionated as it assumes you want stereo sound and no root_cap url prefix. It is probably best to generate a new config from fresh code as my sample may become outdated so YMMV.

 

Creating New Config File

 

From Unraid

 

  1. Switch to Advanced View in the template and add the following to Post Arguments
    1.  --init start /config/myConfig
  2. Make sure you have the Config path mapped in your template
  3. Apply changes and start the container
  4. Edit the container
    1. Remove the contents of Post Arguments
    2. Set Config mapping to the subfolder created in Step 1
  5. Apply changes

Note: You MUST remove the Post Arguments command on next start or the container will stop on error b/c it will not overwrite an existing config file.

 

From CLI (advanced)

 

Run the following command, substituting the host container path for your own, after you have installed the container:

docker run --rm -v /mnt/user/shinysdr/config:/config jeffersonjhunt/shinysdr init /config/myConfig

Make sure to change your Config path mapping in your unraid template to the subfolder created after running it!

 

Container URL

 

The URL for the container is suffixed with the value of root_cap from config.py EX http://yourIP:port/rootCapValue

To access the container at the URL without the suffix set root_cap=None in config.py

 

USB Device Passthrough

 

See my post below on how to passthrough your USB dongle to the container.

 

Additional Notes

 

 

Sample Configuration

 

Below I have provided my configuration (config.py) which does the following:

  • Sets the URL to be accessible without a suffix
  • Enables stereo output (requires more processing power than default mono)
# This is a ShinySDR configuration file. For more information about what can
# be put here, read the manual section on it, available from the running
# ShinySDR server at: http://localhost:8100/manual/configuration

from shinysdr.devices import AudioDevice
from shinysdr.plugins.osmosdr import OsmoSDRDevice
from shinysdr.plugins.simulate import SimulatedDevice

# OsmoSDR generic driver; handles USRP, RTL-SDR, FunCube Dongle, HackRF, etc.
# To select a specific device, replace '' with 'rtl=0' etc.
# config.devices.add(u'osmo', OsmoSDRDevice(''))

# For hardware which uses a sound-card as its ADC or appears as an
# audio device.
# config.devices.add(u'audio', AudioDevice(rx_device=''))

# Locally generated RF signals for test purposes.
config.devices.add(u'sim', SimulatedDevice())


config.features.enable('stereo');

config.serve_web(
    # These are in Twisted endpoint description syntax:
    # <http://twistedmatrix.com/documents/current/api/twisted.internet.endpoints.html#serverFromString>
    # Note: ws_endpoint must currently be 1 greater than http_endpoint; if one
    # is SSL then both must be. These restrictions will be relaxed later.
    http_endpoint='tcp:8100',
    ws_endpoint='tcp:8101',

    # A secret placed in the URL as simple access control. Does not
    # provide any real security unless using HTTPS. The default value
    # in this file has been automatically generated from 128 random bits.
    # Set to None to not use any secret.
    root_cap=None,

    # Page title / station name
    title='ShinySDR')

 

Edited by FoxxMD
provide better default in sample config
Link to post

I was looking into getting an rtl-sdr and was very happy to see that there is already a container for my unraid server.
(this is the one I'm considering: https://www.amazon.com/NooElec-NESDR-Smart-Bundle-R820T2-Based/dp/B01GDN1T4S )

 

My biggest concern is passing the usb sdr from the host to the container.  Is this a complicated process? or something that is straight forward? Any suggested reading material?  On a scale from 1-10, my Linux knowledge is about a 4.

 

Once set up, I'm hoping to transmit local police/fire/ems to broadcastify with the icecast container.
What kind of processing power would this be? I have an old I7, but my server is mainly a Plex server and I wouldn't want to stress it too much.

Thanks for the container and any info!

c

 

 

Link to post

The passthrough process is super simple, but not well documented on the unraid wiki or forums...I will add the instructions below to the OP as well.

 

Passthrough a USB Device

 

1. Open a terminal window on unraid and enter the command: lsusb

 

The output should look something like this:

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 006: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 002 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

2. Find the device you want to passthrough. In this case I am looking RTL2838 DVB-T. If your device isn't obvious do some googling of your product and usb description to find it.

3. Note the Bus and Device numbers for your device.

4. Verify your device is accessible on the host (unraid) by finding it in corresponding device folder in the /dev root folder

  4a. USB devices on unraid are located at /dev/bus/usb/[busNumber/[deviceNumber]

  4b. EX my device from above is located at /dev/bus/usb/002/006

5. Passthrough the device to the container by using that path as the value for the Radio field

 

And that's it! Your device will be passed through to the container (and is found under the same path in the container filesystem). For this container the only additional step that is needed is adding the generic device to the config file and it will work automagically.

 

Gotchas:

  • A device can only be passed through to one docker container or VM at a time.
  • If you unplug/reconnect the device or restart the host (unraid) the device location will likely be different. You will need to go through the above steps to determine the correct bus/device and reconfigure your containers when this happens.

 

_______________

(everything below is specific to this container)

_______________

 

@darvvynn I also have a NooElec brand dongle, they are a good company.

 

For my RTL-SDR device adding the following line to the config file got it working:

config.devices.add(u'osmo', OsmoSDRDevice('rtl=0'))

 

In regards to your usage (police scanner) it may be slightly more complicated. Many public safety departments in the US use the P25 protocol IE digital talk radio and shinysdr does not have a P25 demodulator plugin so all you would hear it noise that isn't static if you were listening to their frequencies. There are plenty of resources for using rtl-sdr to decode p25 transmissions so you may have better luck with a VM and using a more complete software package that can do that out of the box. It's on my todo list to see how difficult it would be to write the plugin for shinysdr :)

Edited by FoxxMD
separating usb passthrough and container specific content
Link to post
  • 3 weeks later...

@FoxxMD I Got my second SDR today & its already connected to ShinySDR, I'm not so sure I configured it right!

I got it all up & running but all I have is the simulated RF. I think I need to dig a little deeper & look around till I find my solution.

Link to post
  • 10 months later...

@FoxxMD - your docker is awesome - much obliged - i've got a RTL dongle wired into the antenna on my chimney and it works like a charm ... now i'm going to try and get it set up with a reverse proxy for remote access -

 

first pass and its failing - i'm guessing because its trying to talk to localhost:8101 from fqdn/rootcapval and it can't find a path - going to tinker with it some more this evening.

Link to post
  • 2 weeks later...

so last night the docker stopped working - whenever i try and bring it up i get the following error 

 

standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"

 

did something get changed recently?

Link to post
  • 1 month later...
1 hour ago, perPLEXed said:

Thanks for creating and maintaining this docker. Took me a while to get used to Shinysdr but works great with my Nooelec SMArTee. I finally figured out the ADS-B. 

Screen Shot 2020-05-05 at 9.47.44 AM.png

what did you do to get ads-b working - i know i'm collecting data because my raspberry pi is tracking stuff - but i can't get shinysdr to display (using the same antenna)

 

nm- stupid me i was fiddling with this at different times (as switching antennas is difficult) i'm decoding aircraft - its just a low traffic time

Edited by SeattleBandit
Link to post

@SeattleBanditI am assuming you can receive just regular broad band FM to make sure Shinysdr works. I used the database to jump to the 1090 Mhz Aviation band and I make sure the centered frequency is the same. I had better luck on mine by going manual on the gain control and pegging it to max 49.6 db. I choose Mode-S in the modulation. What helped a lot for signal strength was to shorten the antenna to 5.1 inches that is the halfway length for 1090 Mhz. I would think 10.2 inch antenna would be better for full wave but not sure. Take my advice with a grain of salt... I just started RTL SDR and I am a newbie.

Edited by perPLEXed
Added @SeattleBandit in response.
Link to post
@SeattleBanditI am assuming you can receive just regular broad band FM to make sure Shinysdr works. I used the database to jump to the 1090 Mhz Aviation band and I make sure the centered frequency is the same. I had better luck on mine by going manual on the gain control and pegging it to max 49.6 db. I choose Mode-S in the modulation. What helped a lot for signal strength was to shorten the antenna to 5.1 inches that is the halfway length for 1090 Mhz. I would think 10.2 inch antenna would be better for full wave but not sure. Take my advice with a grain of salt... I just started RTL SDR and I am a newbie.
Yeah - I'm getting good signal it's just the time of day - not a lot of traffic

Swapping antennas is a little labor intensive

Sent from my GM1917 using Tapatalk

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.