pi@raspberrypi:~ $ sudo apt-get install wiringpi device-tree-compiler Reading package lists… Done Building dependency tree Reading state information… Done device-tree-compiler is already the newest version (1.4.7-3+rpt1). wiringpi is already the newest version (2.50). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 2 3 4 5 6 7 然后查看wringpi的版本,以及系统硬件的情况。
pi@raspberrypi:~ $ gpio -v gpio version: 2.50 Copyright (c) 2012-2018 Gordon Henderson This is free software with ABSOLUTELY NO WARRANTY. For details type: gpio -warranty
Raspberry Pi Details: Type: Pi 2, Revision: 01, Memory: 1024MB, Maker: Embest
Device tree is enabled. *–> Raspberry Pi 2 Model B Rev 1.1
This Raspberry Pi supports user-level GPIO access. 1 2 3 4 5 6 7 8 9 10 11 使用gpio readall可以读出所有GPIO的状态。
Table of Contents
Upgrade Raspberry Pi software to the latest
Obtain, build and install the RTL-SDR libraries
Obtain, build and install dump1090
Obtain, build and install piaware
Upgrade Raspberry Pi software to the latest
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
If rpi-update reported that it downloaded firmware and said you need to reboot for it to take effect, reboot:
sudo reboot
Obtain, build and install the RTL-SDR libraries
This is the software that can talk to the software defined radio in the RTL-SDR dongle...
sudo apt-get install git git-core cmake libusb-1.0-0-dev build-essential
mkdir src
cd src
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig
sudo cp rtl-sdr.rules /etc/udev/rules.d
Keep the system from thinking that the RTL-SDR dongle is for watching TV... cat </tmp/no-rtl.conf
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
EOF
sudo mv /tmp/no-rtl.conf /etc/modprobe.d/
sudo reboot
Obtain, build and install dump1090
This is for the FlightAware version. The main difference is that the FA version of dump1090 can emit "FlightAware" format directly, avoiding piaware having to run the faup1090 translation program. Other than that it's the same as dump1090 from Malcolm Robb.
Should you want to build the FlightAware version, please follow the build/install instructions at https://github.com/flightaware/dump1090_mr/blob/master/README.md#building
Obtain, build and install piaware
Follow the instructions for building and installing PiAware from source at https://github.com/flightaware/piaware#building-and-installing-piaware-from-source
This is for the FlightAware version. The main difference is that the FA version of dump1090 can emit “FlightAware” format directly, avoiding piaware having to run the faup1090 translation program. Other than that it’s the same as dump1090 from Malcolm Robb.
https://github.com/abcd567a/piaware-ubuntu20-amd64/blob/master/README.md
Automated Installation of piaware 7.2, dump1090-fa 7.2, piaware-web 7.2, and dump978-fa 7.2 (by building packages from source code), on following OS:
(1) Ubuntu 20 - amd64
(2) Debian 11 - amd64
(3) Kali-linux 2021 - amd64
(4) On RPI Model 3 & 4 (32-bit & 64-bit / armv7l & aarch64) Raspberry Pi OS Bullseye, DietPi OS Bullseye, Ubuntu-20 for RPi, and Kali-2021 for RPi
(1) DUMP1090-FA
Copy-paste following command in SSH console and press Enter key. The script will install dump1090-fa.
sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/piaware-ubuntu20-amd64/master/install-dump1090-fa.sh)"
(2) PIAWARE
Copy-paste following command in SSH console and press Enter key. The script will install piaware.
sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/piaware-ubuntu20-amd64/master/install-piaware.sh)"
(3) PIAWARE-WEB
Copy-paste following command in SSH console and press Enter key. The script will install piaware-web.
sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/piaware-ubuntu20-amd64/master/install-piaware-web.sh)"
(4) DUMP978-FA (For USA ONLY. Requires 2nd Dongle)
If you want to receive both ES1090 and UAT978, then two dongles are required, one for 1090 MHz and other for 978 MHz.
(4.1) Copy-paste following command in SSH console and press Enter key. The script will install dump978-fa and skyaware978:
sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/piaware-ubuntu20-amd64/master/install-dump978-fa.sh)"
(4.2) Serialize dongles as follows
If you want to receive both ES1090 and UAT978, then two dongles are required, one for 1090 MHz and other for 978 MHz. In this case you will have to serialize dongles so that correct dongle+antenna sets are used by dump1090-fa and dump978-fa.
For 1090 Mhz dongle: use serial # 00001090
For 978 Mhz dongle : use serial # 00000978
(4.1.1) Issue following command to install serialization software:
sudo apt install rtl-sdr
(4.1.2) Unplug ALL DVB-T dongles from RPi
(4.1.3) Plugin only that DVB-T dongle which you want to use for dump1090-fa. All other dongles should be unplugged.
(4.1.4) Issue following command. Say yes when asked for confirmation to chang serial number.
rtl_eeprom -s 00001090
(4.1.5) Unplug 1090 dongle
(4.1.6) Plugin only that DVB-T dongle which you want to use for dump978-fa. All other dongles should be unplugged.
(4.1.7) Issue following command. Say yes when asked for confirmation to chang serial number.
rtl_eeprom -s 00000978
(4.1.8) Unplug 978 dongle
IMPORTANT: After completing above commands, unplug and then replug both dongles.
(4.3) - Configure dump1090-fa & dump978-fa to use dongles of assigned serial numbers
sudo sed -i 's/^RECEIVER_SERIAL=.*/RECEIVER_SERIAL=00001090/' /etc/default/dump1090-fa
sudo sed -i 's/driver=rtlsdr[^ ]* /driver=rtlsdr,serial=00000978 /' /etc/default/dump978-fa
(4.4) - Reboot so that dump1090-fa & dump978-fa can pick their assigned dongles at boot
sudo reboot
Reading package lists... Done
Building dependency tree
Reading state information... Done
dosfstools is already the newest version (4.1-2).
parted is already the newest version (3.2-25).
rsync is already the newest version (3.1.3-6).
The following NEW packages will be installed:
kpartx
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
Need to get 37.8 kB of archives.
After this operation, 86.0 kB of additional disk space will be used.
Get:1 https://mirrors.tuna.tsinghua.edu.cn/debian buster/main arm64 kpartx arm64 0.7.9-3+deb10u1 [37.8 kB]
Fetched 37.8 kB in 1s (47.2 kB/s)
Selecting previously unselected package kpartx.
(Reading database ... 49050 files and directories currently installed.)
Preparing to unpack .../kpartx_0.7.9-3+deb10u1_arm64.deb ...
Unpacking kpartx (0.7.9-3+deb10u1) ...
Setting up kpartx (0.7.9-3+deb10u1) ...
Processing triggers for man-db (2.8.5-2) ...
software is ready
create blog.dngz.net.img ...
0+0 records in
0+0 records out
0 bytes copied, 0.00126612 s, 0.0 kB/s
start=8192s
end=532479s
end2=532480s
device=/dev/mapper/loop0
partBoot=/dev/mapper/loop0p1
partRoot=/dev/mapper/loop0p2
mkfs.fat 4.1 (2017-01-24)
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
/dev/mapper/loop0p1 format success
mke2fs 1.44.5 (15-Dec-2018)
Discarding device blocks: done
Creating filesystem with 739328 4k blocks and 185104 inodes
Filesystem UUID: ed9bf852-cd2f-4c1b-a9f6-d1e00bd20844
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
/dev/mapper/loop0p2 format success
sending incremental file list
rsync同步数据日志省略...
Number of files: 62,378 (reg: 48,951, dir: 5,618, link: 7,809)
Number of created files: 62,376 (reg: 48,951, dir: 5,616, link: 7,809)
Number of deleted files: 0
Number of regular files transferred: 48,951
Total file size: 2,260,121,595 bytes
Total transferred file size: 2,259,998,604 bytes
Literal data: 2,259,998,604 bytes
Matched data: 0 bytes
File list size: 1,703,776
File list generation time: 0.008 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 2,264,157,862
Total bytes received: 990,956
sent 2,264,157,862 bytes received 990,956 bytes 6,214,400.05 bytes/sec
total size is 2,260,121,595 speedup is 1.00
你可能已经知道,Raspbian 是所有树莓派型号的官方操作系统。树莓派基金会为 PC 和 Mac 开发了树莓派桌面版本。你可以创建一个 live CD,并在虚拟机中运行它,甚至也可以将其安装在桌面上。树莓派也有少量非官方操作系统镜像。为了测试,我从官方下载页面下载了官方的 Raspbian 系统。