OpenWebRX 部署教程,使用RTL-SDR 和树莓派 搭建类似KiwiSDR服务器

预览:

http://szsdr.ddns.net:8073/ (KiwiSDR+配套软件)

http://bi7jta.myq-see.com:8073/ (RTL-SDR + OpenwebRX)

整理by @BI7JTA

扩展:经验证可以在 n2n 网络使用,方便没有公网IP的HAM部署节点。

官方教程:
https://github.com/simonyiszk/openwebrx
实现效果:http://sdr.hu (列表不用翻墙)
深圳节点:http://szsdr.ddns.net:8073/ (只支持4个在线)

openwebrx Raspberry pi部署
编译环境:raspberry 3
$ uname -a
Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux

python openwebrx.py
You can now open the GUI at http://localhost:8073.

Please note that the server is also listening on the following ports (on localhost only):

port 4951 for the multi-user I/Q server.
Now the next step is to customize the parameters of your server in config_webrx.py.

重启命令:(官方)
sudo killall -9 openwebrx rtl_mus csdr rtl_sdr

查看状态:http://my_server_address:8073/status

如果不行,则:
sudo killall rtl_sdr
sudo killall csdr
sudo killall nmux
事实证明不一定有效,正确的方法:
ps -ef |grep sdr |sudo kill -9 xxx (TODO 这里写成脚本)
ps -ef |grep nmux |sudo kill -9 xxx

netstat –nltp |grep 4951 |sudo kill -9 xxx
netstat –nltp |grep 8073 |sudo kill -9 xxx
netstat –nltp |grep 8091

telnet知识学习 查看端口是否可用
sudo apt-get install -y telnet
netstat -anp |grep 4951
telnet 127.0.0.1 4951
ctrl+]
quit

在线访问:
http://10.0.254.156:8073/ 默认支持20个用户,实测2个web连接 树莓派1GHz的CPU占用 80%

后台服务:
https://github.com/simonyiszk/openwebrx/wiki

问题:nohub 运行会出现客户端中断后(待机),服务端挂掉。
分析:别的web客户端能否访问?其他终端正常,
解决:尝试用vnc,终端前端运行
client 0x15f33c0: CS_THREAD_FINISHED, client_goto_source = 2, errno = 32csdr bandpass_fir_fft_cc: filter initialized, low_cut = -0.331675, high_cut = 0.331675
client 0x15f33f0: CS_THREAD_FINISHED, client_goto_source = 2, errno = 32 File “openwebrx.py”, line 488, in do_GET
rxws.send(self, temp_audio_data, “AUD “)
File “/home/pi/openwebrx/rxws.py”, line 164, in send
myself.wfile.write(header+data_to_send)
File “/usr/lib/python2.7/socket.py”, line 324, in write
self.flush()
File “/usr/lib/python2.7/socket.py”, line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
File “openwebrx.py”, line 628, in do_GET
id_to_close=get_client_by_id(myclient.id,False)
File “openwebrx.py”, line 344, in get_client_by_id
raise ClientNotFoundException
Traceback (most recent call last):
File “/usr/lib/python2.7/SocketServer.py”, line 599, in process_request_thread
self.finish_request(request, client_address)
File “/usr/lib/python2.7/SocketServer.py”, line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File “/usr/lib/python2.7/SocketServer.py”, line 657, in __init__
self.finish()
File “/usr/lib/python2.7/SocketServer.py”, line 716, in finish
self.wfile.close()
File “/usr/lib/python2.7/socket.py”, line 279, in close
self.flush()
File “/usr/lib/python2.7/socket.py”, line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

非正常关闭时,客户端提示:
WebScoket error
WebSocket ha closed unexpectedly. Please reload the page
刷新后解决
常见问题:https://github.com/simonyiszk/openwebrx/wiki/Common-problems-and-their-solutions

———————
Support SDRplay https://github.com/simonyiszk/openwebrx/wiki/Using-SoapySDR-via-rx_tools-with-OpenWebRX

下载:SDRplay_RSP_API-RPi-2.13.1.run

Downloads


安装:
https://www.rs-online.com/designspark/building-a-remote-sdr-with-the-pi-3-model-b-and-sdrplay-rsp2

pi@3bplus:~ $ cd ../..
pi@3bplus:~ $ git clone https://github.com/pothosware/SoapySDRPlay.git
pi@3bplus:~ $ cd SoapySDRPlay
pi@3bplus:~ $ mkdir build
pi@3bplus:~ $ cd build
pi@3bplus:~ $ cmake ..
pi@3bplus:~ $ make

pi@3bplus:~ $ sudo make install
pi@3bplus:~ $ SoapySDRUtil –find
———————-

python2 openwebrx.py

讨论:

1)RTL-SDR上下变频问题

shown_center_freq = center_freq #you can change this if you use an upconverter
#HF 上下变频,如-125MHz
#https://github.com/simonyiszk/openwebrx/issues/15

#center_freq = 130496551
#shown_center_freq = 5505180

2)SDRplay, Harkrf 带宽超过2MHz,树莓派3B CPU占用高,卡顿。改为2MHz,另外可以考虑用Debian 高性能Linux服务器。

发表评论

电子邮件地址不会被公开。 必填项已用*标注