hmx-17の日記

技術ネタとかプライベート

ADS-Bを見る(4)

PiAwareのMLATがエラー吐くので、もしかしたらUSBコントローラ周りの遅延が原因でMLATに問題があるのではないかと推測し、Raspberry Piに再構築。

結果MLATは正常に動作した。多分、USBから来るデータの微妙な遅延が問題になったか、HWClockのTickの問題なのかなあ?仮想レイヤーが挟まってるから原因追及は難しそう。

 

ところでeBayでFlightAwareのUSB-SDRとSAWフィルタ、LNAを買った。
いつ届くのかはわからないけど届いたら使ってみよう。

あと、FPGA-AccelerationのSDR(BladeRF)によるADS-B受信も興味あるけど、高い(6万)ので他の用途が出てきたら買って見ようかとも思う。

ADS-Bを見る(2)

続き

FlightAwareにも出す。
FlightAwareのコンパイル済みバイナリはRasPi向けなのでとりあえずビルドする。
GitHubのプロジェクトをcloneする

$ git clone https://github.com/flightaware/piaware_builder.git
$ cd piaware_builder
$ sudo apt-get install build-essential debhelper tcl8.6-dev autoconf python3-dev python3-venv dh-systemd libz-dev devscripts  tcl8.5-dev python-virtualenv pkg-config iproute tclx8.4 tcllib tcl-tls itcl3
$ ./sensible-build.sh jessie

これでdebファイルができるので、ファイル名を確認して

$ sudo dpkg -i piaware_3.0.5~bpo8+1_amd64.deb

でインストール

$ sudo nano /etc/piaware.conf
# This file configures piaware and related software.
# You can edit it directly or use piaware-config from the command line
# to view and change settings.
#
# If /boot/piaware-config.txt also exists, then settings present in
# that file will override settings in this file.
receiver-type other # updated by fa_piaware_config
receiver-host 127.0.0.1 # updated by fa_piaware_config

として

$ sudo systemctl enable piaware
$ sudo systemctl status piaware <= 止ってるか確認
$ sudo systemctl restart piaware <= 動いてたら
$ sudo systemctl start piaware <= 止ってたら

とする。

 $ systemctl status piaware
● piaware.service - FlightAware ADS-B uploader
Loaded: loaded (/lib/systemd/system/piaware.service; enabled; vendor preset:
Active: active (running) since Sun 2016-09-18 19:27:15 JST; 9h ago
Docs: https://flightaware.com/adsb/piaware/
Main PID: 12346 (piaware)
CGroup: /system.slice/piaware.service

 よきかな。

しばらくするとFlightAwareから見れるようになる。

ADS-Bを見る

RasPiじゃおもしろくないからVM上でやってみよう。
とりあえずVMWareのゲストOSにUSBコントローラとパススルーを追加した状態で。

$ lsusb
Bus 001 Device 002: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

 認識OK、rtl-sdrのインストール

$ sudo apt-get install git cmake libusb-1.0-0.dev build-essential pkg-config
$ git clone git://git.osmocom.org/rtl-sdr.git
$ cd rtl-sdr/
$ mkdir build && cd build
$ cmake -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON ..
$ make
$ sudo make install
$ sudo ldconfig

おっけー。

$ sudo nano /etc/modprobe.d/rtlsdr-blacklist.conf

blacklist dvb_usb_rtl28xxu
blacklist rtl2830
blacklist dvb_usb_v2
blacklist dvb_core

$ sudo reboot

xDecoからModeSDeco2をダウンロードして展開

 $ tar xf modesdeco2_x86_64_20150815.tgz

ディレクトリに入って

http://www.kinetic.co.uk/resourcesdownloads.php

からLogos -> Silhouette LogosとSQB Files -> SBS Resourcesをダウンロードして解凍

Silhouette LogosのフォルダをLogosにして、BaseStation.sqbをmodesdeco2のフォルダに入れる。

[Unit]
Description=ModeSDeco2
After=network.target

[Service]
Type=simple
ExecStart=[fullpath-modesdeco2] --beast 30005 --sbs10001 30003 --web 8080 --db [fullpath-BaseStation.sqb] --metric --silhouettes [full-path-logos] --location [lat]:[lon]

[Install]
WantedBy=multi-user.target

として/etc/systemd/system/modesdeco2.serviceを作る。

$ sudo systemctl enable modesdeco2
$ sudo systemctl start modesdeco2
$ systemctl modesdeco2
● modesdeco2.service - ModeSDeco2
Loaded: loaded (/etc/systemd/system/modesdeco2.service; enabled; vendor prese
Active: active (running) since Mon 2016-09-19 00:38:59 JST; 6s ago
Main PID: 12781 (modesdeco2)
CGroup: /system.slice/modesdeco2.service

よきかな。

flightrader24のFeed Binaryを公式サイトから持ってきて展開する

$ cd fr24feed_amd64
$ sudo nano /etc/fr24feed.ini
receiver="beast-tcp"
fr24key="[KeyString]"
host="127.0.0.1:30005"
bs="no"
raw="no"
logmode="0"
mlat="yes"
mlat-without-gps="yes"

$ sudo chmod 644 /etc/fr24feed.ini

$ sudo nano /etc/systemd/system/fr24feed.service
[Unit]

Description=Flightrader24 Feed
After=network.target

[Service]
Type=simple
ExecStart=[full-path-fr24feed]

[Install]
WantedBy=multi-user.target

$ sudo systemctl enable fr24feed
$ sudo systemctl start fr24feed
$ systemctl status fr24feed
● fr24feed.service - Flightrader24 Feed
Loaded: loaded (/etc/systemd/system/fr24feed.service; enabled; vendor preset:
Active: active (running) since Mon 2016-09-19 00:46:25 JST; 9s ago
Main PID: 12838 (fr24feed)
CGroup: /system.slice/fr24feed.service

よい。

E5823のFingerprint error

指紋センサのハードウエアエラーとか出るので。

http://forum.xda-developers.com/xperia-z5/help/fingerprint-hardware-available-t3354800/page17

/system/etc/firmware/の

tzwidevine.b00 -> tzwidevine.b00.bak
tzwidevine.b01 -> tzwidevine.b01.bak
tzwidevine.b02 -> tzwidevine.b02.bak
tzwidevine.b03 -> tzwidevine.b03.bak
tzwidevine.mdt -> tzwidevine.mdt.bak

 上記リストをリネームすればよろしい。