vi /etc/rc.local 红色部分为添加部分 注: echo "AT^NDISDUP=1,1,\"cmnet\""> /dev/ttyUSB2 为移动 APN echo "AT^NDISDUP=1,1,\"3gnet\""> /dev/ttyUSB2 为联通 echo "AT^NDISDUP=1,1,\"ctnet\""> /dev/ttyUSB2 为电信 此处我使用的联通卡测试 # By default this script does nothing. echo 30000 > /proc/sys/vm/min_free_kbytes sleep 12 echo "ATE0" > /dev/ttyUSB2 echo "AT^NDISDUP=1,1,\"3gnet\""> /dev/ttyUSB2 ifconfig eth0 down ifconfig wlan0 down sleep 1 ifconfig usb0 up sleep 5 udhcpc -iusb0 ifconfig eth0 up echo "Finished!" exit 0 |
|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )
GMT+8, 2024-11-22 11:16
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.