openwrt 3g模塊上網

硬件環境:linux

    開發板爲RT5053F   網絡

    3G模塊爲中興 MC2176 電信版less


如下是操做步驟async

  • 加入VID 、PIDide

    VID 、 PID 的獲取方法是  將設備插入電腦在linux下執行lsusb命令,如圖

    或者是依照無線模塊驅動使用手冊,將產品支持的IDS全部增長option.c文件裏
    openwrt-1407在例如如下位置:
    build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620n/linux-3.10.49/drivers/usb/serial/option.c
    

  • 內核的編譯配置
    make kernel_ menuconfig
    USB串口驅動相關的配置項:
    Device Drivers  ---> [*] USB support  --->   
    	<*>   Support for Host-side USB
    	[*]     USB announce new devices
    	[*]     Enable USB persist by default
    	<*>     EHCI HCD (USB 2.0) support
    	[*]       Root Hub Transaction Translators
    	[*]       Improved Transaction Translator scheduling
    	<*>     OHCI HCD (USB 1.1) support
    	<*>     USB Modem (CDC ACM) support
    	<*>     USB Printer support
    	<*>     USB Wireless Device Management support
    	<*>   USB Serial Converter support  ---> 
    		<*>   USB driver for GSM and CDMA modems
    

    PPP撥號的相關配置:ui

    Device Drivers  ---> [*] Network device support  --->
    	<*>   PPP (point-to-point protocol) support
    	<*>     PPP BSD-Compress compression
    	<*>     PPP Deflate compression
    	[*]     PPP filtering
    	<*>     PPP MPPE compression (encryption)
    	[*]     PPP multilink support
    	<*>     PPP over Ethernet
    	<*>     PPP support for async serial ports
    	<*>     PPP support for sync tty ports
    

    所需軟件包:spa

    ppp
    chat
    comgt
    librt
    libusb-1.0
    usb-modeswith
    zlib
    

    保存 運行make V=99 後將編譯好的鏡像文件燒寫到開發板。而後啓動開發板rest






  • 配置 網絡code

    /etc/config/network
    config interface 'ppp0'
            option ifname 'ppp0'
            option service 'evdo'
            option username 'card'
            option password 'card'
            option device '/dev/ttyUSB0'
            option proto '3g'
            option dialnumber '#777'
            option apn 'ctnet'
            option auto 1
    


  • 從新啓動網絡接口

    /etc/init.d/netwrok restart

    從新啓動後 執行ifcong命令,若出現ppp接口表示撥號成功,如圖

  • 相關文章
    相關標籤/搜索