Difference between revisions of "RPiAIS"

From wiki.bastelbude.grade.de
Jump to: navigation, search
(aisdeco)
(hardware)
Line 56: Line 56:
 
Available Devices:
 
Available Devices:
 
  0: Terratec Cinergy T Stick RC (Rev.3)
 
  0: Terratec Cinergy T Stick RC (Rev.3)
 +
 +
root@rPiAIS:~# rtl_test -t
 +
Found 1 device(s):
 +
  0:  Realtek, RTL2838UHIDIR, SN: 00000001
 +
Using device 0: Terratec Cinergy T Stick RC (Rev.3)
 +
Found Elonics E4000 tuner
 +
Supported gain values (14): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0
 +
Sampling at 2048000 S/s.
 +
Benchmarking E4000 PLL...
 +
[E4K] PLL not locked for 51000000 Hz!
 +
[E4K] PLL not locked for 2193000000 Hz!
 +
[E4K] PLL not locked for 1097000000 Hz!
 +
[E4K] PLL not locked for 1246000000 Hz!
 +
E4K range: 52 to 2192 MHz
 +
E4K L-band gap: 1097 to 1246 MHz
  
 
</pre>
 
</pre>

Revision as of 09:28, 15 October 2018

machine

OS

root@rPiAIS:~# cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

root@rPiAIS:~# uname -a
Linux rPiAIS 4.14.71+ #1145 Fri Sep 21 15:06:38 BST 2018 armv6l GNU/Linux

root@rPiAIS:~# apt-get install rtl-sdr
rtl-sdr is already the newest version (0.5.3-11+rpt1).

root@rPiAIS:~# apt-get install libusb-1.0-0-dev
libusb-1.0-0-dev is already the newest version (2:1.0.21-1).

root@rPiAIS:~# apt-get install librtlsdr-dev
librtlsdr-dev is already the newest version (0.5.3-11+rpt1).

hardware


root@rPiAIS:~# lsusb
Bus 001 Device 005: ID 0ccd:00d3 TerraTec Electronic GmbH
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@rPiAIS:~# cat /proc/cpuinfo
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 697.95
Features        : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2835
Revision        : 0010 (Model B+)
Serial          : 0000000081c958d6

root@rPiAIS:~# aisdeco-20140704 --device-list
2018-10-15 09:19:03.467  INFO     AisDeco v.20140704
Available Devices:
 0: Terratec Cinergy T Stick RC (Rev.3)

root@rPiAIS:~# rtl_test -t
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Terratec Cinergy T Stick RC (Rev.3)
Found Elonics E4000 tuner
Supported gain values (14): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0
Sampling at 2048000 S/s.
Benchmarking E4000 PLL...
[E4K] PLL not locked for 51000000 Hz!
[E4K] PLL not locked for 2193000000 Hz!
[E4K] PLL not locked for 1097000000 Hz!
[E4K] PLL not locked for 1246000000 Hz!
E4K range: 52 to 2192 MHz
E4K L-band gap: 1097 to 1246 MHz

stretch

setup

  • connect via ssh or scp as pi
sudo apt-get update
sudo apt-get upgrade
sudo su
mc
  • enable root login over SSH
    • add to /etc/ssh/sshd_config
      PermitRootLogin yes
    • restart service
      sudo /etc/init.d/ssh restart
    • set root password
      sudo passwd root
  • set up static IP at /etc/dhcpcd.conf
interface eth0
static ip_address=192.168.1.110/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
  • reboot

install

rtl-sdr use apt-get install rtl-sdr instead

  • connect via ssh or scp as pi
sudo su -
apt-get update
apt-get install git
git clone git://git.osmocom.org/rtl-sdr.git
apt-get install libusb-dev libusb-1.0 libtool cmake
apt-get install build-essential
 
cd rtl-sdr/
mkdir build
cd build
cmake ../
make
make install
ldconfig
 
cd ..
cp rtl-sdr.rules /etc/udev/rules.d/
  • Blacklist the kernel module dvb_usb_rtl28xxu by adding the line blacklist dvb_usb_rtl28xxu to /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf
  • reboot
  • Test the installation:
    • rtl_test -t
    • output:
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Terratec Cinergy T Stick RC (Rev.3)
Found Elonics E4000 tuner
Supported gain values (14): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0
Sampling at 2048000 S/s.
Benchmarking E4000 PLL...
[E4K] PLL not locked for 51000000 Hz!
[E4K] PLL not locked for 2187000000 Hz!
[E4K] PLL not locked for 1094000000 Hz!
[E4K] PLL not locked for 1243000000 Hz!
E4K range: 52 to 2186 MHz
E4K L-band gap: 1094 to 1243 MHz

rtl-ais

apt-get update
apt-get install rtl-sdr librtlsdr-dev libusb-1.0-0-dev
git clone https://github.com/dgiardini/rtl-ais
cd rtl-ais
make
cp rtl_ais /usr/local/bin/
  • add /etc/systemd/system/ais.service
[Unit]
Description=AIS
After=syslog.target network-online.target

[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/rtl_ais -p 28 -P 5001
Restart=on-failure
RestartSec=10
KillMode=process

[Install]
WantedBy=multi-user.target
  • systemctl daemon-reload
  • systemctl enable ais
  • systemctl start ais
  • systemctl stop ais

aisdeco

  • add to /etc/modprobe.d/blacklist-dvb-t.conf
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830