123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <?xml version='1.0' encoding='iso-8859-1'?>
- <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
- <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
- <head>
- <title>
- CM_ENCRYPTED.sh
- </title>
- <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
- <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
- <meta name='author' content='cmaier@cmassoc.net'/>
- <meta name='robots' content='noindex,nofollow'/>
- <link href='toolkit.css' rel='stylesheet' type='text/css'/>
- </head>
- <body>
- <div class='headerlink'>
- [<a href='boot.sh.html' title=' boot.sh '>PREV</a>]
- [<a href='toolkit.html' title=' Index '>HOME</a>]
- [<a href='firmware.sh.html' title=' firmware.sh '>NEXT</a>]
- </div>
- <pre>
- #!/bin/sh
- # file: scripts/CM_ENCRYPTED.sh
- # This script formats and sends a CM_ENCRYPTED_PAYBOOT message to a
- # specific slave device; the message is written as a text file then
- # passed to efsu to send;
-
- # ====================================================================
- # host symbols;
- # --------------------------------------------------------------------
- . ./hardware.sh
- # ====================================================================
- # file symbols;
- # --------------------------------------------------------------------
- COUNT=1
- FRAME=test.hex
- # ====================================================================
- # display usage information;e
- # --------------------------------------------------------------------
- usage()
- {
- cat << EOF
- usage: ${options}
- This scripts sets the up and down bandwidth on Slave devices in the network
- OPTIONS
- -h show this message
- -s slave device name
- -u Upstream Bandwidth required in Mbps
- -d Downstream Bandwidth required in Mbps
- Note: Bandwidth value support 0-15 input values and 0 selects full line rate
- EOF
- }
- # ====================================================================
- # command line parser routine
- # --------------------------------------------------------------------
- device=
- while getopts "hs:u:d:" OPTION
- do
- case ${OPTION} in
- h)
- usage
- exit 1
- ;;
- s)
- device=${OPTARG}
- ;;
- esac
- done
- if [[ -z ${device} ]]; then
- usage
- exit 1
- elif [ ${device} = slave1 ]; then
- target=${slave1}
- elif [ ${device} = slave2 ]; then
- target=${slave2}
- elif [ ${device} = slave3 ]; then
- target=${slave3}
- elif [ ${device} = slave4 ]; then
- target=${slave4}
- elif [ ${device} = slave5 ]; then
- target=${slave5}
- else
- target=${master}
- fi
- # ====================================================================
- # Format the MME with processed values from command line
- # --------------------------------------------------------------------
- da="ff ff ff ff ff ff"
- sa="ff ff ff ff ff ff"
- mtype="88 e1"
- mmv="01"
- mmtype="06 60"
- FMI="00 00"
- PEKS="0F"
- AVLN="00"
- PID="04"
- PRN="09 75"
- PMN="01"
- UUID="55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa"
- LEN="00 00"
- HLE="AA 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55"
- fill="ff ff ff ff ff ff ff ff ff"
- cat > ${FRAME} <<EOF
- ${da} ${sa} ${mtype} ${mmv} ${mmtype} ${FMI} ${PEKS} ${AVLN} ${PID} ${PRN} ${PMN} ${UUID} ${LEN} ${HLE} ${fill} ${fill} ${fill} ${fill} ${fill} ${fill} ${fill} ${fill}
- EOF
- # ====================================================================
- # check environment;
- # --------------------------------------------------------------------
- if [ ! -f ${FRAME} ]; then
- echo "File ${FRAME} is missing or misplaced"
- exit 1
- fi
-
- # ====================================================================
- # send traffic in both directions;
- # --------------------------------------------------------------------
- efsu -i ${ETH2} -h ${FRAME} -l ${COUNT} -v
- rm ${FRAME}
- </pre>
- <div class='footerlink'>
- [<a href='boot.sh.html' title=' boot.sh '>PREV</a>]
- [<a href='toolkit.html' title=' Index '>HOME</a>]
- [<a href='firmware.sh.html' title=' firmware.sh '>NEXT</a>]
- </div>
- </body>
- </html>
|