blob: 95288f7c4df2671133374d9500fc85ef33c56f52 [file] [log] [blame]
#!/bin/sh
#
# run IMS on spesific APN
# CID7 must be free for MO PDP used by IMS
# If IMS use MT PDP on ccinet4 instead wsetup script must be called before
#
APN=$1
CID=7
## check AT channel
status=`serial_atcmd "AT" | grep OK`
if [ -z "$status" ]; then
echo "AT CHANNEL ERROR"
exit 1
fi
status=`serial_atcmd "AT+CGPIAF=0,0,0,0" | grep OK`
if [ -z "$status" ]; then
echo "AT CHANNEL ERROR"
exit 1
fi
if [ -n "$APN" ]; then
## configure IMS APN
status=`serial_atcmd "AT*IMSCFG=KEY_IMS_PDP_APN,$APN" | grep OK`
if [ -z "$status" ]; then
echo "AT CHANNEL ERROR"
exit 1
fi
fi
ifup wan6$CID
## enable IMS
status=`serial_atcmd "AT*IMSCFG=KEY_IMS_SUPPORT,true" | grep OK`
if [ -z "$status" ]; then
echo "AT CHANNEL ERROR"
exit 1
fi