28 lines
352 B
Bash
28 lines
352 B
Bash
#!/bin/bash
|
|
|
|
# /etc/init.d/sim800c.sh
|
|
|
|
case "$1" in
|
|
start)
|
|
echo "AT+CFUN=1,1" > /dev/ttyS3
|
|
echo "AT+IPR=115200" > /dev/ttyS3
|
|
pon sim800c
|
|
;;
|
|
stop)
|
|
poff sim800c
|
|
# sleep 3
|
|
# echo "+++" > /dev/ttyS3
|
|
# sleep 3
|
|
echo "AT+CFUN=1,1" > /dev/ttyS3
|
|
;;
|
|
restart|reload)
|
|
$0 stop
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit 0
|