Skip to content

Instantly share code, notes, and snippets.

@maluta
Created July 26, 2012 19:46
Show Gist options
  • Select an option

  • Save maluta/3184099 to your computer and use it in GitHub Desktop.

Select an option

Save maluta/3184099 to your computer and use it in GitHub Desktop.
echo "Please select your test function"
echo " 1 - CANAL 0"
echo " 2 - CANAL 7"
echo " 3 - CANAL 8"
echo " 4 - CANAL 15"
echo ""
read -p "Please make your choice:" cmd
case $cmd in
"1")
echo "(canal 0)"
echo 2 > /sys/devices/platform/mxc_spi.0/spi1.1/download
;;
"2")
echo "(canal 7)"
echo 3 > /sys/devices/platform/mxc_spi.0/spi1.1/download
;;
"3")
echo "(canal 8)"
echo 4 > /sys/devices/platform/mxc_spi.0/spi1.1/download
;;
"4")
echo "(canal 15)"
echo 5 > /sys/devices/platform/mxc_spi.0/spi1.1/download
;;
*)
echo "input incorrect!!!"
;;
esac
echo -n /usr/mxt/anatel/imxt_ap.bin > /sys/devices/platform/mxc_spi.0/spi1.1/download
read -p "Press [Enter] key to stop the Zigbee test."
echo 0 > /sys/devices/platform/mxc_spi.0/spi1.1/download
echo -e "Zigbee device stopped!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment