Installation instructions for the WebSDR server (20140717, pa3fwm@amsat.org) ---------------------------------------------------------------------------- 注解by@BI7JTA QQ群 174212528 系统支持:Linux内核系统,包括树莓派Raspberry OS,不过CPU的处理能力有限。 硬件支持:rtl-sdr,其它PC 安装包申请:www.websdr.org 邮件格式: 收件人:pa3fwm@websdr.org Hello PA3FWM: I want to build WebSDR Server, please send me the install package,thanks! My SDR hardware (我的SDR硬件型号) SDR: RTL-SDR what kind of internet connection and computer(接入网络和计算机) ADSL network, 100Mbps Raspberry pi 3 what frequency band(s) (你提供的波段) 40m,20m,15m,10m 前置工作: (1)邮件给作者申请安装包,由于是测试项目,作者不允许公开发布源码和安装包,内部n2n网络使用可以咨询Q群 (2)安装 rtl-sdr 参考:https://github.com/simonyiszk/openwebrx (3)安装依赖库:sudo apt-get install libfftw3-3 libpng12-0 1. Preferably, create a new user account for the WebSDR. This is not technically necessary, but preferable from a security point of view: it limits the damage in case the WebSDR server software would turn out to have a security bug. 翻译:最好为WebSDR创建新的用户帐户。这在技术上是不必要的,但从安全的角度来看,它是优选的:它限制了WebSDR服务器软件出现安全漏洞的情况。 2. Make sure the newly created websdr account has permission to access the soundcard; this is typically done by adding the user to the 'audio' group: adduser websdr audio 确保新创建的websdr帐户具有访问声卡的权限;这通常通过将用户添加到“音频”组来完成: useradd websdr passwd websdr adduser websdr audio 3. In that account's homedirectory, unpack the websdr-dist10a.tgz file. In the sequel, I will assume that this homedirectory is /home/websdr . Unpacking this file creates the complete directory structure needed for the WebSDR: 在该帐户的目标中,打开websdr-dist10a.tgz文件。在接下来,我将假设这个目标是/home/ websdr。打开此文件的包装将创建WebSDR所需的完整目录结构: /home/websdr/pub - public files (site-specific). /home/websdr/cfg - contains site-specific configuration files. /home/websdr/dist11 - non site-specific files for this version. /home/websdr/dist11/doc - contains documentation. /home/websdr/dist11/log - contains detailed log files. /home/websdr/dist11/pub2 - another set of public files, non site-specific. /home/websdr/dist11/pub2/tmp - temporary public files. 4. Copy the file /home/websdr/dist11/websdr.cfg to /home/websdr/cfg and then use your favorite text editor to edit it (the copy in cfg, not the original in dist11 !). Documentation for this is provided in the file itself, in the form of comment lines (lines starting with #). 拷贝文件 /home/websdr/dist11/websdr.cfg 到 /home/websdr/cfg 编辑websdr.cfg 文件,用你自己熟悉的编辑器, 文档描述在文件里面有注释说明。 5. Copy the file /home/websdr/dist11/pub2/index.html to /home/websdr/pub and again use your favorite text editor to edit it (the copy in pub, not the original in pub2!). The file as supplied works, but you may want to at least customise the textual information it contains; the two relevant places in the file are marked as TODO, so you can quickly find them with a text editor. Later on, when everything works fine, you can customize this file further to make the page look the way you want it to, add more information pages, etc. 拷贝文件 /home/websdr/dist11/pub2/index.html 到 /home/websdr/pub 编辑它 (在目标 pub目录, 非原来的 pub2 目录!). 6. If you want to support mobile devices, copy the file /home/websdr/dist11/pub2/m.html to /home/websdr/pub and use your favorite text editor to edit it, if needed. (Don't put lots of pictures in here though: this file is to be viewed on small screens!) 如果要支持手机设备,拷贝m.html 。不要放太多的图片,手机屏幕太小 7. Go to /home/websdr/dist11 and start the websdr by typing ./websdr (or ./websdr64 if you're using a 64-bit Linux system, or ./websdr-rpi on a Raspberry Pi). If all is well, the server should now be running! 启动服务吧,在/home/websdr/dist11目录。 先启动RTL-SDR,见<补充> ./websdr 32位系统 ./websdr64 64-bit Linux system, ./websdr-rpi Raspberry Pi 树莓派OS 访问:http://192.168.31.156:8091/ 配置文件:/home/websdr/cfg/websdr.cfg 补充:如果按照我的 《 OpenWebRX 部署教程》先安装 OpenWebRX ,启动后,通过 ps -ef |grep sdr可以找到以下启动命令, 提示:OpenWebRX websdr 两个服务可以共存,但要考虑服务器的CPU开销! RTL-SDR启动命令: /bin/sh -c rtl_sdr -s 2400000 -f 438500000 -p 0 -g 5 -| nmux --bufsize 602112 --bufcnt 84 --port 4951 --address 127.0.0.1 ########### 5. Plug in the RTL-2832U stick and issue the rtl_test -t command to make sure the Raspberry Pi sees your stick. 6. Be sure that port 1234 is open on your router 7. To start the rtl server type rtl_tcp -a plus the ip address of your Pi. For example rtl_tcp -a 192.168.31.156 ############ 加载RTL-SDR部分描述,见 config.txt device !rtlsdr x:y z 案例: device !rtlsdr 127.0.0.1:4951 0 说明: Sets the input device to be an RTL-SDR (DVB-T USB dongle), through the rtl_tcp driver running at host x on port y, with ppm correction z. Supported samplerates for use with the RTL-SDR are 256000, 512000, 768000, 1024000, 1536000, 2048000 and 2880000 Hz. For use with up/down converters, see 'progfreq' elsewhere in this document. Note: these dongles have a rather small dynamic range. As a consequence, when there are strong signals in the passband, weaker signals in the passband disappear into the noise floor. For a WebSDR this is not good, because the idea behind a WebSDR is that each user can tune independently to any signal within the band. So please run a WebSDR with an RTL-SDR only after you've verified that in your system it is not overloaded, e.g., by comparing reception of weak signals to a normal good analog receiver on the same antenna. Some further notes: 其他特征提示: * If you want to run the server on port 80, so that the port number can be omitted from the URL (i.e., you get http://websdr.example.org/ instead of something like http://websdr.example.org:8901/ ), you need to make the server binary setuid root. That can be done by going to /home/websdr/dist11 and typing: sudo chown root websdr sudo chmod 4510 websdr The websdr server is written such that it only uses the root privileges to open the TCP socket and drops them at all other times, to minimize security risks. 权限分配 ,web端口分配, * The server needs several libraries. Most of them will be installed by default by your Linux distribution, but two of them may not be, namely: libfftw3f (i.e., version 3 of the FFTW library, compiled for float) and libpng12 (i.e., version 1.2 of the PNG library). Usually they will be available through your distribution's package management system. In the case of Debian and Ubuntu, you can install them using the following command (as root): apt-get install libfftw3-3 libpng12-0 安装依赖库:sudo apt-get install libfftw3-3 libpng12-0 * See the files in /home/websdr/dist11/doc/ for more information; in particular, config.txt explains the format of the config file. 更多文档在:/home/websdr/dist11/doc/ 特别是 config.txt 有解释配置的格式 A final remark: this software is copyrighted material. You do get it free of charge, but may only use it for its intended purpose, namely running a publicly accessible WebSDR site. Any other use, such as further distribution, reverse engineering, and/or reusing (parts of) the code in other software, is not allowed without my explicit prior permission. 作者声明: 这个软件是有版权的材料。您可以免费获得它,但只能将其用于预期目的,即运行可公开访问的WebSDR站点。没有我明确的事先许可,任何其他用途,如进一步分发,逆向工程和/或其他软件中的代码的重用(部分)是不允许的。