1 检查/etc/init.d/pppd『红颜色的使上电自动上网注册(如果没有红颜色的语句),请添加』
#!/bin/sh
#
DAEMON=/usr/sbin/pppd
PIDFILE=/var/run/ppp0.pid
# define the interface used for the connection
#DAEMON_OPTS=ppp0
DAEMON_OPTS=call wcdma
case "${1}" in
start)
if [ -e $PIDFILE ]; then
echo "pppd already running"
exit 1
fi
echo "modprobe kernel modules..."
modprobe option.ko
echo "Starting pppd..."
pppd call wcdma &
;;
stop)
if [ ! -e $PIDFILE ]; then
echo "pppd not running"
exit 1
fi
echo "Stopping pppd..."
kill -s SIGTERM `cat $PIDFILE` || echo "failed"
;;
restart)
if [ ! -e $PIDFILE ]; then
echo "pppd not running"
exit 1
fi
echo "Restarting pppd..."
kill -s SIGTERM `cat $PIDFILE` || echo "failed"
sleep 1
$DAEMON $DAEMON_OPTS || echo "failed"
;;
status)
if [ -e $PIDFILE ]; then
echo "pppd running"
else
echo "pppd not running"
fi
;;
hangup)
if [ ! -e $PIDFILE ]; then
echo "pppd not running"
exit 1
fi
echo "pppd hanging up"
kill -s SIGHUP `cat $PIDFILE` || echo "failed"
;;
*)
echo "Usage: ${0} {start|stop|restart|status|hangup}"
exit 1
;;
esac
2 如果不希望上电后3G模块自动上网----手动注册,注释掉红颜色的语句,在console终端里敲入下面的命令即可(不要忘记回车换行):
pppd call wcdma &
3 建议先手动拨号,成功后改为上电自动注册;手动拨号成功会出现:
primary DSN XXX.XXX.XXX.XXX
secondary DSN XXX.XXX.XXX.XXX
vi /etc/resolv.conf,加入内容(primary DSN XXX.XXX.XXX.XXX, secondary DSN XXX.XXX.XXX.XXX):
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
4 使用ifconfig -a 查看是否有ppp0的网络设备;
5
最后测试ppp0网络设备是否能够使用
ping –I ppp0 www.baidu.com
能够ping通就表示3G卡移植驱动成功
原文:http://www.cnblogs.com/zym0805/p/3986038.html