arispy Spyserver 在arm32上搭建
wget -O spyserver.tgz http://airspy.com/?ddownload=4247
tar xvzf spyserver.tgz
1、airspy
先安装apt-get install airspy libairspy0 libairspy-dev rtl-sdr librtlsdr-dev
运行airspy_info获取 serial number
root@debian:~# airspy_info
airspy_lib_version: 1.0.9
Found AirSpy board 1
Board ID Number: 0 (AIRSPY)
Firmware Version: AirSpy NOS v1.0.0-rc10-0-g946184a 2016-09-19
Part ID Number: 0x6906002B 0x00000030
Serial Number: 0x787863C835123456
Supported sample rates:
10.000000 MSPS
2.500000 MSPS
Close board 1
然后编辑配置文件:
nano spyserver.config
(1)修改serial number
device_serial = 0x787863C835123456
(2)最大连接数
maximum_clients = 2
(3)设备类型
device_type = AirspyOne
(4)采样率
device_sample_rate = 2500000
不同设备采样率不一样。一般设备如下:
# Device Sample Rate
# Possible Values:
# Airspy R0, R2 : 10000000 or 2500000
# Airspy Mini : 6000000 or 3000000
# Airspy HF+ : 768000
# RTL-SDR : 500000 to 3200000
# Comment to use the device's default
2、RTL-SDR
apt install rtl-sdr librtlsdr-dev
然后编辑配置文件:
nano spyserver.config
device_type = RTL-SDR
采样率RTL-SDR一般设置2.048
3、运行./spyverter spyverter.config
设置为开机自启
(1)、计划任务方式
crontab -e
新增
@reboot /root/spyserver/spyserver /root/spyserver/spyserver.config
(2)、开机自启
在/etc/rc.local的exit 0之前新增
/root/spyserver/spyserver /root/spyserver/spyserver.config &
(3)、服务方式
nano /usr/lib/systemd/system/spyserver.service
内容:
[Unit]
Description=spyserver
Documentation=deep
[Service]
WorkingDirectory=/root/spyserver/
ExecStart=/root/spyserver/spyserver /root/spyserver/spyserver.config
Restart=on-abnormal
RestartSec=10s
KillMode=mixed
[Install]
WantedBy=multi-user.target
建议设置权限 0777
设置开机自启动 相关命令如下:
# 更新配置
systemctl daemon-reload
# 启动服务
systemctl start spyserver.service
# 设置开机启动
systemctl enable spyserver.service
# 停止服务
systemctl stop spyserver.service
# 重启服务
systemctl restart spyserver.service
# 查看状态
systemctl status spyserver.service