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