25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_reception.sh 747 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. if [ -z "$1" ]; then
  3. echo "Usage: $0 <frequency>. Example: $0 90.3"
  4. exit 1
  5. fi
  6. command_exists() {
  7. if ! command -v "$1" &> /dev/null; then
  8. echo "Required command not found: $1"
  9. exit 1
  10. fi
  11. }
  12. command_exists "sox"
  13. command_exists "socat"
  14. ## import common lib
  15. . "$HOME/.noaa.conf"
  16. . "$NOAA_HOME/common.sh"
  17. IP=$(ip route | grep "link src" | awk {'print $NF'})
  18. echo "$(tput setaf 2)
  19. The server is in testing mode tuned to $1 Mhz!
  20. Open a terminal in your computer and paste:
  21. ncat $IP 8073 | play -t mp3 -
  22. $(tput sgr0)
  23. "
  24. rtl_fm ${BIAS_TEE} -f "$1M" -s 256k -g 48 -p 55 -E deemp -F 9 - \
  25. | sox -traw -r256k -es -b16 -c1 -V1 - -tmp3 - \
  26. | socat -u - TCP-LISTEN:8073 1>/dev/null