SDR受信サーバをUbuntu環境で構築する

RTL2832UドングルとOsmoSDRが配布しているlibrtlsdrライブラリのrtl_tcpを使用して、Ubuntu環境で動作するSDR受信サーバを構築します。

rtl-sdr – OsmoSDR
http://sdr.osmocom.org/trac/wiki/rtl-sdr

サーバマシンの準備

サーバマシン

サーバマシン(Ubuntu 11.10用VMWare仮想マシン)を準備します。
(Ubuntu 10.04をUpgradeしてUbuntu 11.10にしました。)

固定IPアドレスの設定

IPアドレスを固定IPアドレスに設定します。

・/etc/network interfaces を編集します。

# cd /etc/network
# cp interfaces interfaces.original
# nano interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.11.xxx
network 192.168.11.0
netmask 255.255.255.0
broadcast 192.168.11.255
gateway 192.168.11.1
dns-nameservers 192.168.11.1

・システムを再起動します。

必要パッケージのインストール

rtl-sdrをインストールするために必要なパッケージをインストールします。
$ sudo apt-get install git cmake autoconf automake libusb-1*

rtl-sdrの取得

rtl-sdrのソースファイルを取得します。

rtl-sdrソースファイルを格納するディレクトリ ~/SDRを作成します。
$ mkdir ~/SDR

rtl-sdrをgitで取得します。
$ cd ~/SDR
$ git clone git://git.osmocom.org/rtl-sdr.git

rtl-sdrのビルドとインストール

ビルド用ディレクトリを作成します。
$ cd rtl-sdr/
$ mkdir build
$ cd build

Makefileを作成します。
$ cmake ../

rtl-sdrをビルドし、インストールします。
$ make
$ sudo make install
$ sudo ldconfig

rtl-sdrは /usr/local/bin に作成されます。

動作確認

RTL2832UドングルをサーバのUSBに挿入し、rtl_testコマンドで動作確認を行います。
$ sudo /usr/local/bin/rtl_test -t
~ RTL2832Uドングルが正しく認識されていることを確認します ~

受信サーバの起動

RTL2832Uドングルにアンテナを接続し、rtl_tcpコマンドで受信サーバを起動します。

-a 受信サーバのIPアドレス
-p 受信サーバのポート番号(デフォルト 1234)

$ sudo /usr/local/bin/rtl_tcp -a <受信サーバのIPアドレス> -p 1234

LinkIconアンテナを設置する

SDR#で受信確認

Windows環境で動作するSDR#で受信確認を行います。

・SDR#を起動します。
・SDR#のFront EndとしてRTL-SDR/TCPを設定します。
・Configureボタンをクリックし、Hostに受信サーバのIPアドレスを入力します。
・Playボタンをクリックします。

LinkIconSDR# (SDR Sharp) を使う

rtl-sdrのアンインストール

rtl-sdrをアンインストールします。


$ cd ~/SDR/rtl-sdr/build
$ sudo make uninstall

ono@ono-virtual-machine:~/SDR/rtl-sdr/build$ sudo make uninstall
[sudo] password for ono: 
-- Uninstalling "/usr/local/lib/pkgconfig/librtlsdr.pc"
-- Uninstalling "/usr/local/include/rtl-sdr.h"
-- Uninstalling "/usr/local/include/rtl-sdr_export.h"
-- Uninstalling "/usr/local/lib/librtlsdr.so.0.0.0"
-- Uninstalling "/usr/local/lib/librtlsdr.so.0"
-- Uninstalling "/usr/local/lib/librtlsdr.so"
-- Uninstalling "/usr/local/lib/librtlsdr.a"
-- Uninstalling "/usr/local/bin/rtl_sdr"
-- Uninstalling "/usr/local/bin/rtl_tcp"
-- Uninstalling "/usr/local/bin/rtl_test"
-- Uninstalling "/usr/local/bin/rtl_fm"
-- Uninstalling "/usr/local/bin/rtl_eeprom"
-- Uninstalling "/usr/local/bin/rtl_adsb"
Built target uninstall
ono@ono-virtual-machine:~/SDR/rtl-sdr/build$ 

追加 2015.03.07
追加 2015.02.22
2013.03.18