You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

INSTALL.md 5.2 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. ![Raspberry NOAA](header_1600.png)
  2. - [Raspberry PI operating system](#raspberry-pi-operating-system)
  3. - [Automatic install](#automatic-install)
  4. - [Manual install](#manual-install)
  5. - [Required packages and software](#required-packages-and-software)
  6. - [Install rtl_sdr](#install-rtl_sdr)
  7. - [Install WXToIMG](#install-wxtoimg)
  8. - [Raspberry-noaa configuration](#raspberry-noaa-configuration)
  9. - [Clone this repo](#clone-this-repo)
  10. - [Install the default configuration files](#install-the-default-configuration-files)
  11. - [Install Meteor software](#install-meteor-software)
  12. - [Setup Nginx](#setup-nginx)
  13. - [Setup Database](#setup-database)
  14. - [Setup RamFS](#setup-ramfs)
  15. - [Setup ISS reception and decoding (SSTV)](#setup-iss-reception-and-decoding-sstv)
  16. - [Cron the scheduling job](#cron-the-scheduling-job)
  17. - [Set your Twitter credentials](#set-your-twitter-credentials)
  18. # Raspberry PI operating system
  19. I'm using [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) as it have full support for Raspberry PI, simple package manager and it's pretty stable
  20. # Automatic install
  21. 1. Update repositories and install git
  22. ```
  23. sudo apt update
  24. sudo apt install git
  25. ```
  26. 2. Clone this repository on your home directory
  27. ```
  28. cd $HOME
  29. git clone https://github.com/reynico/raspberry-noaa.git
  30. cd raspberry-noaa
  31. ```
  32. 2. Run `./install.sh`. You will be asked for your ground station lat/lon position.
  33. 3. If you want automatic Twitter posting, see: [Set your Twitter credentials](#set-your-twitter-credentials)
  34. This is pretty much the entire setup. If you are interested about the behind of scenes please check the following section
  35. ---
  36. # Manual install
  37. ## Required packages and software
  38. ```
  39. sudo apt update -yq
  40. sudo apt install -yq predict \
  41. python-setuptools \
  42. ntp \
  43. cmake \
  44. libusb-1.0 \
  45. sox \
  46. at \
  47. bc \
  48. nginx \
  49. libncurses5-dev \
  50. libncursesw5-dev \
  51. libatlas-base-dev \
  52. python3-pip \
  53. imagemagick \
  54. libxft-dev \
  55. libxft2 \
  56. libjpeg9 \
  57. libjpeg9-dev \
  58. socat \
  59. php7.2-fpm \
  60. php7.2-sqlite \
  61. sqlite3 \
  62. libgfortran5
  63. ```
  64. ```
  65. sudo pip3 install numpy ephem tweepy Pillow
  66. ```
  67. ### Install rtl_sdr
  68. ```
  69. sudo cp templates/modprobe.d/rtlsdr.conf /etc/modprobe.d/rtlsdr.conf
  70. ```
  71. - clone rlt-sdr git repo and install rtl-sdr:
  72. ```
  73. cd /tmp/
  74. git clone https://github.com/osmocom/rtl-sdr.git
  75. cd rtl-sdr/
  76. mkdir build
  77. cd build
  78. cmake ../ -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON
  79. make
  80. sudo make install
  81. sudo ldconfig
  82. cd /tmp/
  83. sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/
  84. ```
  85. ### Install WXToIMG
  86. There's a deb package for it
  87. ```
  88. sudo dpkg -i software/wxtoimg-armhf-2.11.2-beta.deb
  89. ```
  90. ## Raspberry-noaa configuration
  91. ### Clone this repo
  92. ```
  93. cd $HOME
  94. git clone https://github.com/reynico/raspberry-noaa.git
  95. cd raspberry-noaa
  96. ```
  97. ### Install the default configuration files
  98. - noaa.conf: paths, satellite elevation and loggin
  99. ```
  100. cp "templates/noaa.conf" "$HOME/.noaa.conf"
  101. ```
  102. - predict.qth: Predict's ground station settings
  103. ```
  104. cp "templates/predict.qth" "$HOME/.predict/predict.qth"
  105. ```
  106. - wxtoimgrc: WxToIMG ground station settings and license
  107. ```
  108. cp "templates/wxtoimgrc" "$HOME/.wxtoimgrc"
  109. ```
  110. Don't forget to adjust your settings in those files
  111. ### Install Meteor software
  112. - meteor_demod
  113. ```
  114. git clone https://github.com/dbdexter-dev/meteor_demod.git
  115. cd meteor_demod
  116. make
  117. sudo make install
  118. cd ..
  119. ```
  120. - medet_arm
  121. ```
  122. sudo cp software/medet_arm /usr/bin/medet_arm
  123. sudo chmod +x /usr/bin/medet_arm
  124. ```
  125. ### Setup Nginx
  126. ```
  127. sudo cp templates/nginx.cfg /etc/nginx/sites-enabled/default
  128. sudo mkdir -p /var/www/wx
  129. sudo chown -R www-data:www-data /var/www/wx
  130. sudo usermod -a -G www-data pi
  131. sudo chmod 775 /var/www/wx
  132. sudo cp templates/index.html /var/www/wx/index.html
  133. sudo cp templates/logo-small.png /var/www/wx/logo-small.png
  134. sudo systemctl restart nginx
  135. sudo cp -rp templates/webpanel/* /var/www/wx/
  136. ```
  137. ### Setup Database
  138. ```
  139. sqlite3 "panel.db" < "templates/webpanel_schema.sql"
  140. ```
  141. ### Setup RamFS
  142. ```
  143. sudo mkdir -p /var/ramfs
  144. cat templates/fstab | sudo tee -a /etc/fstab > /dev/null
  145. sudo mount -a
  146. sudo chmod 777 /var/ramfs
  147. ```
  148. ### Setup ISS reception and decoding (SSTV)
  149. ```
  150. wget -qr https://github.com/reynico/pd120_decoder/archive/master.zip -O /tmp/master.zip
  151. cd /tmp
  152. unzip master.zip
  153. cd pd120_decoder-master/pd120_decoder/
  154. pip3 install --user -r requirements.txt
  155. cp demod.py utils.py "/home/pi/raspberry-noaa/"
  156. ```
  157. ### Cron the scheduling job
  158. ```
  159. cat <(crontab -l) <(echo "1 0 * * * /home/pi/raspberry-noaa/schedule.sh") | crontab -
  160. ```
  161. ### Set your Twitter credentials
  162. - Go to [Twitter Developer site](http://developer.twitter.com/) and apply for a developer account.
  163. ```
  164. cp "templates/tweepy.conf" "$HOME/.tweepy.conf"
  165. ```
  166. - Set your credentials on `"$HOME/.tweepy.conf"`
  167. ```
  168. export CONSUMER_KEY = ''
  169. export CONSUMER_SECRET = ''
  170. export ACCESS_TOKEN_KEY = ''
  171. export ACCESS_TOKEN_SECRET = ''
  172. ```