您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

34 行
747 B

  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