blob: 95288f7c4df2671133374d9500fc85ef33c56f52 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#!/bin/sh
2#
3# run IMS on spesific APN
4# CID7 must be free for MO PDP used by IMS
5# If IMS use MT PDP on ccinet4 instead wsetup script must be called before
6#
7
8APN=$1
9CID=7
10
11## check AT channel
12status=`serial_atcmd "AT" | grep OK`
13if [ -z "$status" ]; then
14 echo "AT CHANNEL ERROR"
15 exit 1
16fi
17
18status=`serial_atcmd "AT+CGPIAF=0,0,0,0" | grep OK`
19if [ -z "$status" ]; then
20 echo "AT CHANNEL ERROR"
21 exit 1
22fi
23
24if [ -n "$APN" ]; then
25 ## configure IMS APN
26 status=`serial_atcmd "AT*IMSCFG=KEY_IMS_PDP_APN,$APN" | grep OK`
27 if [ -z "$status" ]; then
28 echo "AT CHANNEL ERROR"
29 exit 1
30 fi
31fi
32
33ifup wan6$CID
34
35## enable IMS
36status=`serial_atcmd "AT*IMSCFG=KEY_IMS_SUPPORT,true" | grep OK`
37if [ -z "$status" ]; then
38 echo "AT CHANNEL ERROR"
39 exit 1
40fi