Kaynağa Gözat

Add testing tool and usage guide

tags/v1.3
Nico Rey 4 yıl önce
ebeveyn
işleme
2a86903746
3 değiştirilmiş dosya ile 72 ekleme ve 0 silme
  1. +3
    -0
      README.md
  2. +36
    -0
      WORKING.md
  3. +33
    -0
      test_reception.sh

+ 3
- 0
README.md Dosyayı Görüntüle

@@ -16,5 +16,8 @@ There's an [install.sh](install.sh) script that does (almost) everything at once
## Post config
* [Setup Twitter auto posting feature](INSTALL.md#set-your-twitter-credentials)

## How do I know if it is running properly?
This project is intended as a zero-maintenance system where you just power-up the Raspberry PI and wait for images to be received. However, if you are in doubt about it just follow the [working guide](WORKING.md)

## Hardware setup
Raspberry-noaa runs on Raspberry PI 2 and up. See the [hardware notes](HARDWARE.md)

+ 36
- 0
WORKING.md Dosyayı Görüntüle

@@ -0,0 +1,36 @@
![Raspberry NOAA](header_1600.png)

# Reception
First thing we need to test is reception. It's the way to be sure the antenna, reception line, reception hardware and software are working properly. There is a [test_reception.sh](test_reception.sh) script that makes testing easy, just tune a broadcast FM near you and listen to the audio, then make the proper adjustments to improve reception.

Open a SSH connection to your Raspberry PI and execute `test_reception.sh <tune frequency>`.

```bash
cd raspberry-noaa/
./test_reception.sh 90.3
```

Now open a terminal on your Linux/Mac/(And maybe windows?) computer and run

```bash
ncat your.raspberry.pi.ip 8073 | play -t mp3 -
```
where `your.raspberry.pi.ip` is your Raspberry PI IP address. Now you should listen to the frequency tuned before

# Schedule
This project uses [crontab](https://crontab.guru/) to schedule the scheduler (funny huh?). Running

```bash
crontab -l
```

This will show the schedule entry for `schedule.sh`, the script that downloads the kepler elements from Internet and creates [at](https://linux.die.net/man/1/at) jobs for each pass.

```bash
atq
```

Will show the scheduled jobs for today, each job can be described using `at -c <job_id>`.

# Images
Images are saved in the web server's directory, so you can access your received images at http://your.raspberry.pi.ip/, where `your.raspberry.pi.ip` is your Raspberry PI IP address.

+ 33
- 0
test_reception.sh Dosyayı Görüntüle

@@ -0,0 +1,33 @@
#!/bin/bash

if [ -z "$1" ]; then
echo "Usage: $0 <frequency>. Example: $0 90.3"
exit 1
fi

command_exists() {
if ! command -v "$1" &> /dev/null; then
echo "Required command not found: $1"
exit 1
fi
}

command_exists "sox"
command_exists "socat"

## import common lib
. "$HOME/.noaa.conf"
. "$NOAA_HOME/common.sh"

IP=$(ip route | grep "link src" | awk {'print $NF'})

echo "$(tput setaf 2)
The server is in testing mode tuned to $1 Mhz!
Open a terminal in your computer and paste:
ncat $IP 8073 | play -t mp3 -
$(tput sgr0)
"

rtl_fm ${BIAS_TEE} -f "$1M" -s 256k -g 48 -p 55 -E deemp -F 9 - \
| sox -traw -r256k -es -b16 -c1 -V1 - -tmp3 - \
| socat -u - TCP-LISTEN:8073 1>/dev/null

Yükleniyor…
İptal
Kaydet