My SDRsharp was often crashing so I wanted to use rtl_fm CLI (command line interace) to receive NOAA images. I found this post http://www.rtl-sdr.com/an-alternative-noaa-weather-satellite-tutorial-using-rtl_fm-and-wxtoimg/ which was poorly and incompletely written but it gave me a jump start.

This was tested on a 64bit Windows 7. I assume you have Zadig drivers working already (http://www.rtl-sdr.com/tag/zadig/)

The software:

Theory:

WxToImg will send commands to MCE controller which will start rtl_fm and sox applications which will pipe the audio to virtual audio cable. WxToImg will listen to virtual audio interface and capture the data.

TL;DR: WxToImg -> MCE -> rtl_fm+sox -> Virtual audio cable -> WxToImg

NOTICE: This tutorial does not include doppler shift correction but with NOAA it’s not that important.

1. Install Virtual Audio Cable

The following step is optional but recommended. We’ll need it later for the sox.

Go to playback devices (right click on the speaker in the taskbar).

Right click on your VB-Audio Virtual Cable, properties and rename it to Vcable.

 

2. Download and install sox (https://sourceforge.net/projects/sox/files/sox)

If you get missing DLL files when runing sox, install Microsoft Visual C++ 2010 Service pack 1 Redistributable package MFC security update.

3. Download rtl_fm software and unzip it (http://osmocom.org/attachments/download/2242/RelWithDebInfo.zip)

4. Download and install Virtual Serial port driver (https://www.eltima.com/download/vspd.exe)

Open the app, select two COM ports and click add pair.

You end up with COM2 and COM3 in the left menu. You can choose different ports, but you need to reflect that in WxToImg and later in MCE controller settings.

5. Download and install MCE control (https://github.com/tig/mcec/releases/download/1.9.0/MCEController.Setup.exe)

Open it and go to Settings -> Serial server

Tick Enable serial server

Port: COM3

Baud rate: 2400

6. Install WxToImg and register it with this data:

Name: Carl Rakotondrainibe
Email: carl@Rakotondrainibe.com
Key: EA5M-N3VZ-R6HZ-CFF9-7FC2

Setup all your preferences and go to Options -> Recording options

Under Common recording options:

soundcard: Vcable

receiver type: select Baykal (unregistered version is missing this option)

receiver port: COM2

receiver baud rate: 2400

Save and exit

MCE controller and WxToImg should now be connected together with COM2 – COM3 pair we created earlier.

7. Create a file for MCE controller commands.

MCE will recognize the commands sent by WxToImg and start rtl_fm and sox.

Find your MCEcontrol.exe location (usually in “C:\Program Files (x86)\Kindel Systems\MCE Controller\”)

Go to that folder and create a new file named MCEControl.commands

Add this text to it and save it:

<?xml version="1.0" encoding="utf-8"?>
<MCEController xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Commands xmlns="http://www.kindel.com/products/mcecontroller">
<!-- Place command definitions here -->
<!--
==================================================================
StartProcess Commands
File: The full path to the executable you want to start.
==================================================================
-->
<StartProcess Cmd="RF01376200" File="F:\satreceive\noaa15.bat"/>
<StartProcess Cmd="RF01379125" File="F:\satreceive\noaa18.bat"/>
<StartProcess Cmd="RF01371000" File="F:\satreceive\noaa19.bat"/>
<StartProcess Cmd="RF01375000" File="F:\satreceive\noaa19.bat"/>
<StartProcess Cmd="MUA" File="F:\satreceive\killrtl.bat"/>
</Commands>
</MCEController>

IMPORTANT: Change the path of the bat files to your own location. Bat files are included in the next steps.

Just a brief explanation of the MCEcontrol.commands file:

Cmd="RF01376200"

= Command sent by WxToImg, a frequency of the NOAA15 Satellite and must be linked with noaa15.bat

Cmd="MUA" File="F:\satreceive\killrtl.bat"

= Command sent by WxToImg to start and stop recording

8. Bat files (make sure to edit them to match your sox, rtl_fm locations and rtl_fm device settings like gain and ppm correction):

noaa15.bat

REM start minimized
if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit

@echo off
REM setup paths, mind the end backslash

SET sox_path="F:\Program Files (x86)"\sox-14-4-2\
SET rtl_fm_path=F:\rtl-sdr-release\x64\
REM set RTL device number, run rtl_test, usually it's device 0 with only 1 dongle connected
REM set gain
REM set ppm correction
REM set your audio device, usually virtual audio cable

SET device=0
SET gain=49.6
SET ppm_correction=1
SET audiodevice=Vcable

REM Run sox and rtl_fm
%sox_path%sox.exe -r 48000 -t raw -es -b 16 -c 1 "|%rtl_fm_path%rtl_fm.exe -d %device% -f 137.62M -s 48000 -g %gain% -p %ppm_correction% -F 9 -A fast -E DC" -t waveaudio %audiodevice%

exit

noaa18.bat

REM start minimized
if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit

@echo off
REM setup paths, mind the end backslash

SET sox_path="F:\Program Files (x86)"\sox-14-4-2\
SET rtl_fm_path=F:\rtl-sdr-release\x64\

REM set RTL device number, run rtl_test, usually it's device 0 with only 1 dongle connected
REM set gain
REM set ppm correction
REM set your audio device, usually virtual audio cable

SET device=0
SET gain=49.6
SET ppm_correction=1
SET audiodevice=Vcable

REM Run sox and rtl_fm
%sox_path%sox.exe -r 48000 -t raw -es -b 16 -c 1 "|%rtl_fm_path%rtl_fm.exe -d %device% -f 137.9125M -s 48000 -g %gain% -p %ppm_correction% -F 9 -A fast -E DC" -t waveaudio %audiodevice%

exit

noaa19.bat

REM start minimized
if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit

@echo off
REM setup paths, mind the end backslash

SET sox_path="F:\Program Files (x86)"\sox-14-4-2\
SET rtl_fm_path=F:\rtl-sdr-release\x64\

REM set RTL device number, run rtl_test, usually it's device 0 with only 1 dongle connected
REM set gain
REM set ppm correction
REM set your audio device, usually virtual audio cable

SET device=0
SET gain=49.6
SET ppm_correction=1
SET audiodevice=Vcable

REM Run sox and rtl_fm
%sox_path%sox.exe -r 48000 -t raw -es -b 16 -c 1 "|%rtl_fm_path%rtl_fm.exe -d %device% -f 137.1M -s 48000 -g %gain% -p %ppm_correction% -F 9 -A fast -E DC" -t waveaudio %audiodevice%

exit

killrtl.bat

@echo off
taskkill /IM rtl_fm.exe /F

Everything should be set now. You can test it by going to WxToImg File -> Manual Test

You should see some data in the MCE Controller, bat file executed and WxToImg recording:

 

 

Main apps needed:
– WxToImg
– Predict
– Rtl-SDR
– Sox
– Dropbox bash uploader
– Some essential packages
– A script to link it all together, provided by a reddit user the2belo. Check out the sources at the bottom of this post.

apt-get update
apt-get install curl git-core git cmake at predict sox libusb-1.0-0-devx-fmt-all build-essential libasound-dev libpulse-dev -y
cat <<EOF >no-rtl.conf
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
EOF
mv no-rtl.conf /etc/modprobe.d/
git clone git://git.osmocom.org/rtl-sdr.gi
cd rtl-sdr/
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
make install
ldconfig
cd ~
cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/
reboot
rtl_test

Output should look similar to this:
root@rpi:~/wxsat# rtl_test
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
[R82XX] PLL not locked!
Sampling at 2048000 S/s.

Info: This tool will continuously read from the device, and report if
samples get lost. If you observe no further output, everything is fine.

Reading samples in async mode…

wget http://www.wxtoimg.com/beta/wxtoimg-armhf-2.11.2-beta.deb
dpkg -i wxtoimg-armhf-2.11.2-beta.deb
wxtoimg

Accept.

predict

Setup your QTH.

cd ~
mkdir wxsat
wget https://raw.githubusercontent.com/the2belo/wxsat-scheduler/master/noaa-scheduler.sh
chmod +x noaa-scheduler.sh
mkdir images recordings

Edit noaa-scheduler.sh to reflect your location.

Change -L parameter
/usr/local/bin/wxmap -T “NOAA ${bird}” -H ~/wxsat/weather.txt -L “35.47/136.76/20” -p0 -o “\$mapdate” ~/wxsat/noaa${bird}map.png

Format is: (lat/lon/alt meters)
Use this site to get lat and lon for your location http://www.latlong.net/lat-long-dms.html

Edit noaa-scheduler.sh for gain and SDR dongle ppm correction:

timeout $rectime /usr/local/bin/rtl_fm -d 0 -f ${freq}M -s 48000 -g 44.5 -p 1 -F 9 -A fast -E DC ~/wxsat/recordings/NOAA${bird}-\$recdate.raw

-g = gain

-p = ppm

Play with gain settings to get the best results.

You also need to add the timezone for the script, add

export TZ='UTC date'

in a new line after #!/bin/bash and after cat << EOF > ~/wxsat/noaa${bird}.at

This is how it looks like in a final version: https://pastebin.com/3uWcp9wi

Script generates MCIR and HCVT images by default, you can change this options. I also added -c option to crop telemetry from the sides of the pictures.

/usr/local/bin/wxtoimg -c -e MCIR -m ~/wxsat/noaa${bird}map.png ~/wxsat/recordings/NOAA${bird}-\$recdate.wav ~/wxsat/images/NOAA${bird}-MCIR-\$recdate.png

mkdir Dropbox-Uploader
cd Dropbox-Uploader
curl "https://raw.githubusercontent.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh" -o dropbox_uploader.sh
chmod +x dropbox_uploader.sh
./dropbox_uploader.sh

Follow the instructions.

Automate the proces. Commands bellow will be run every 12 hours.

crontab -e

00 */12 * * * atq | awk ‘{print $1}’ | sort -n | xargs atrm
01 */12 * * * ~/wxsat/noaa-scheduler.sh 15 137.620
02 */12 * * * ~/wxsat/noaa-scheduler.sh 18 137.9125
03 */12 * * * ~/wxsat/noaa-scheduler.sh 19 137.100
00 */12 * * * wget -qr https://www.celestrak.com/NORAD/elements/weather.txt -O ~/wxsat/weather.txt

Start the jobs immediately:

wget -qr https://www.celestrak.com/NORAD/elements/weather.txt -O ~/wxsat/weather.txt
~/wxsat/noaa-scheduler.sh 15 137.620
~/wxsat/noaa-scheduler.sh 18 137.9125
~/wxsat/noaa-scheduler.sh 19 137.100

If you are going to change the file noaa-scheduler.sh, you need to kill the existing jobs and restart them. Kill the jobs with:

atq | awk '{print $1}' | sort -n | xargs atrm

Sources:
https://www.reddit.com/r/RTLSDR/comments/5iuzbl/fully_automated_raspberry_pi_noaa_satellite/
https://gist.github.com/floehopper/99a0c8931f9d779b0998
https://github.com/the2belo/wxsat-scheduler

There is another piece of software to automatically receive NOAA and Meteor satellites, I have yet to check it out.

Link: https://github.com/cyber-atomus/autowx

My HW/SW setup:

Dongle: SDR USB Dongle (Realtek RTL2832U R820T chipset, other SDR dongles may also work). Search Ebay for RTL2832U dongles. They should all work.

OS: Windows 7, 64bit

Capture software: SDR# from sdrsharp.com

Decoder: AFSK1200

Note: Don’t install any software drivers that came with the SDR Dongle. Uninstall the drivers, if you already installed them.

1. Setup stereo mix:

Stereo mix is used to forward output sound to the microphone input. We need this, because AFSK1200 decoder will be listening to the microphone input. Open sound options in control panel or just go to start and enter mmsys.cpl. Using USB headset will not work, you need analog speakers. There are some workarounds to use USB headsets but I haven’t tried them yet.

Playback tab: set speakers to the default device.

speakers

Recording tab: if you don’t see the “Stereo mix device”, it’s probably hidden.

  • Right click anywhere in the field where devices are listed and tick “Show disabled devices“, “Show disconnected devices. Stereo mix shold be available now.
  • Right click on it and select “Enable“.

recording2

2. Download  and configure SDR# software:

  • Download http://sdrsharp.com/downloads/sdr-install.zip
  • Extract it and run install.bat
  • Plug in your SDR dongle, go to sdrsharp folder and run zadig.exe. Go to Options and tick “List all devices“. Select “Bulk-In, Interface (Interface 0)” and click “Install Driver”. (On my screenshot, you can see “Reinstall Driver, because I already installed it). Note: You will need to install driver again if you replug the dongle in another USB port.

zadig

  • Run SDRSharp.exe
  • Source -> RTL-SDR (USB)
  • Radio -> NFM, enable Squelch and set it between 50 and 80, you can increase or decrease it depending on your surrounding environment
  • Frequency Manager -> New -> add the frequency you want to monitor, in my case it’s 144.800 Mhz.
  • Click on Play button at the top of SDR# You will see spikes when something is transmitting on the frequency

sdrsharp

3. Decode packets with AFSK 1200 Decoder:

  • Download AFSK 1200 Decoder
  • Select Input and choose Stereo mix
  • Click play button. You are now decoding APRS packets

afsk1200

Don’t forget to disable stereo mix and set the default playback device as you had before when you finish decoding.