Loading ...
Sorry, an error occurred while loading the content.

Local Echo Script

Expand Messages
  • Dennis
    Just wondering if I can get some help in scripting, particularly on the embedded node. What I want it to do is run once, then end as it seems to start again.
    Message 1 of 1 , Apr 14 8:26 PM
    • 0 Attachment
      Just wondering if I can get some help in scripting, particularly on
      the embedded node.
      What I want it to do is run once, then end as it seems to start again.
      Secondly I have the echo.wav file in the /flash-disk/ directory which
      is owned by root.
      How can I change it so repeater can record to it.

      Is there any restriction to changing permission on embedded node.

      Here is the script:
      # filename: local_echo
      # description: This is a hacked veriosn of the parrot script written
      by VK3JED
      # VK3JKD.
      # history:
      ######################################################################
      ##
      ######################################################################
      ##
      #echo `date '+%b %d %Y %T %z'` "Local Echo" >> $LOGFILE
      #
      # Convenience functions
      #
      # Send message to LOGFILE
      #function log () {
      # MESSAGE=$@
      # if [ -n "$LOGFILE" ]; then
      # echo "`date '+%b %d %Y %T %z'` ${0##*/}: $MESSAGE" >> $LOGFILE
      # fi
      #}

      ######################################################################
      #
      #
      # Standard Script Opening
      #
      # Make sure we are user repeater!!!
      if [ `/usr/bin/whoami` != "repeater" ] ; then
      echo This program must be run as user REPEATER!
      exit 1
      fi

      # Make sure we have sourced the environment file
      if [ "$RUN_ENV" != "TRUE" ] ; then
      . /home/irlp/custom/environment
      fi


      while [ TRUE ] ; do
      if [ -f /flash-disk/audio/1_aus.wav ] ; then
      ${BIN}/key
      usleep ${TXDELAY:-500000}
      ${BIN}/play /flash-disk/audio/1_aus.wav
      usleep 500000
      ${BIN}/unkey
      else
      ${CUSTOM}/confirm
      fi

      echo -n "Waiting for COS..."
      while $BIN/cosstate ; do
      usleep 20000
      done

      echo -n "RECORDING..."
      ${BIN}/record /flash-disk/audio/echo.wav >&/dev/null &
      ${BIN}/coscheck
      sleep 1
      echo -n "PLAYING..."
      export LOCKED="YES"
      while [ $LOCKED = "YES" ] ; do
      if !( ps ax | grep wavplay | grep connected ) ; then export
      LOCKED="NO" ; fi
      usleep 20000
      done
      $BIN/key
      usleep ${TXDELAY:-500000}
      if [ ! "$1" = "once" ] && [ -f /flash-disk/audio/2_aus.wav ] ; then
      ${BIN}/play /flash-disk/audio/2_aus.wav
      fi
      ${BIN}/play /flash-disk/audio/echo.wav
      usleep 500000
      ${BIN}/unkey

      exit 0

      sleep 1
      done

      exit 0

      I've had the script working on fedora well but with the embedded node
      it seems to be different.

      regards
      Dennis @ Scone
      VK2DWJ
      IRLP 6233
      Echolink 2056
    Your message has been successfully submitted and would be delivered to recipients shortly.