User`s manual
Table Of Contents
- 1. Introduction
- 2. Getting Started
- Powering on the W406-LX
- Connecting the W406-LX to a PC
- Configuring the Ethernet Interface
- USB Port for Expansion
- SD Socket for Storage Expansion
- Setting Up the Wireless Module
- Configuring the SIM Card
- Entering the PIN Code
- Verifying the SIM Card Status
- Enabling or Disabling the PIN Code Authentication
- Changing the PIN Code
- Unlocking the SIM Card
- Connecting to the Internet
- Reconnecting to the Internet
- Disconnecting from the Internet
- Detecting an Internet Connection Error
- Sending and Reading an SMS Message
- Deleting an SMS Message
- Test Program—Developing Hello.c
- 3. Managing Embedded Linux
- 4. Managing Communications
- 5. Development Tool Chains
- 6. Programmer’s Guide
- 7. Software Lock
- A. System Commands

W406-LX User’s Manual Managing Communications
4-23
ifconfig tap${i} 0.0.0.0 promisc up
i=`expr $i + 1`
if [ $i -ge $maxtap ]; then
break
fi
done
# null ip address of internal interface
ifconfig $iface 0.0.0.0 promisc up
# enable bridge ip
ifconfig br0 $IPADDR netmask $NETMASK broadcast $BROADCAST
ipf=/proc/sys/net/ipv4/ip_forward
# enable IP forwarding
echo 1 > $ipf
echo “ip forwarding enabled to”
cat $ipf
}
stop() {
echo “shutdown openvpn bridge.”
ifcfg_vpn
i=`expr 0`
while :
do
# disconnect tap device from the bridge
brctl delif br0 tap${i}
openvpn --rmtun --dev tap${i}
i=`expr $i + 1`
if [ $i -ge $maxtap ]; then
break
fi
done
brctl delif br0 $iface
brctl delbr br0
ifconfig br0 down
ifconfig $iface $IPADDR netmask $NETMASK broadcast $BROADCAST
killall -TERM openvpn
}
case “$1” in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo “Usage: $0 [start|stop|restart]”
exit
1
esac
exit 0
#---------------------------------- end -----------------------------
Create link symbols to enable this script at boot time:
# ln -s /etc/openvpn/openvpn-bridge /etc/rc.d/rc3.d/S32vpn-br # for example
# ln -s /etc/openvpn/openvpn-bridge /etc/rc.d/rc6.d/K32vpn-br # for example