"GTA01"|"GTA02")
GSMD_OPTS="-s 115200 -F"
GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
+ GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
GSM_DEV="/dev/ttySAC0"
;;
"HTC Apache"|"HTC Blueangel")
# If your GSM device needs to be powered up, uncomment and modify the next line
#GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
+ # If your GSM device then needs to be reset, uncomment and modify the next line
+ #GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
+
# This should be in a common /etc/default/serial, together with
# BT_DEV and IR_DEV for devices that have those on a serial port
#GSM_DEV="/dev/ttyS1"
case "$1" in
start)
- [ -n $GSM_POW ] && ( echo "0" >$GSM_POW; sleep 1 )
- [ -n $GSM_POW ] && ( echo "1" >$GSM_POW; sleep 1 )
- [ -n $GSM_RES ] && ( echo "1" >$GSM_RES; sleep 1 )
- [ -n $GSM_RES ] && ( echo "0" >$GSM_RES; sleep 2 )
+ [ -n "$GSM_POW" ] && ( echo "0" >$GSM_POW; sleep 1 )
+ [ -n "$GSM_POW" ] && ( echo "1" >$GSM_POW; sleep 1 )
+ [ -n "$GSM_RES" ] && ( echo "1" >$GSM_RES; sleep 1 )
+ [ -n "$GSM_RES" ] && ( echo "0" >$GSM_RES; sleep 2 )
echo -n "Starting GSM daemon: "
start-stop-daemon -S -x /usr/sbin/gsmd -- gsmd -p $GSM_DEV $GSMD_OPTS >/tmp/gsm.log 2>&1 &
fi
;;
stop)
- [ -n $GSM_POW ] && echo "0" >$GSM_POW
+ [ -n "$GSM_POW" ] && echo "0" >$GSM_POW
echo -n "Stopping GSM daemon: "
start-stop-daemon -K -x /usr/sbin/gsmd