rk3288 ubuntu16.04 L506全网通4G模块ppp拨号

1.查看模块id

        #lsusb

        Bus 003 Device 007: ID 05c6:9025 Qualcomm, Inc. Qualcomm HSUSB Device

2.内核配置

           #make ARCH=arm menuconfig

            Device Drivers -->

                network device support-->

                        ppp support

                        ppp multilink support

                        ppp support for async serial ports

                        ppp support for sync tty ports

                        ppp deflate compression

                        PPP filtering

                        ppp BSD_compress compression

                        ppp over Ethernet

                        SLIP(serial line )support

                        CSLIP compressed headers

3.在驱动中增加模块支持

         #vim kernel/drivers/usb/serial/option.c

          在option_ids[]数组中添加L506的id

          { USB_DEVICE(0x05c6,0x9025)},

           重新编译内核并烧写

            #ls /dev/ttyUSB*

            /dev/ttyUSB0 /dev/ttyUSB2 /dev/ttyUSB3 /dev/ttyUSB4

4.准备拨号脚本

        #cd /etc/ppp/peers

        #vim  wcdma

        脚本内容:

        debug

        nodetach

        lock

        /dev/ttyUSB3

        115200

        crtscts    

        show-password    

        usepeerdns    

        noauth   

        noipdefault 

        novj   

        novjccomp

        noccp

        ipcp-accept-local

        ipcp-accept-remote

        connect '/usr/sbin/chat -s -v -f /etc/ppp/peers/wcdma-chat-connect'   

        disconnect '/usr/sbin/chat -s -v -f /etc/ppp/peers/wcdma-chat-disconnect'


        #vim wcdma-chat-connect

        脚本内容:

        ABORT 'NO CARRIER' #判断AT返回值参见错误

        ABORT 'ERROR'

        ABORT 'NO DIALTONE'

        ABORT 'BUSY'

        ABORT 'BO ANSWER'

        '' \rAT                                    

        OK \rATZ                                

        OK \rAT+CGDCONT=1,"IP","cmnet"    

        OK-AT-OK ATDT*99***1# 

        CONNECT \d\c


        #vim  wcdma-chat-disconnect

        脚本内容:

        ABORT "ERROR" 

        ABORT "NO DIALTONE"

        SAY "\n Sending break to the modem\n"

        '' "\K"

        '' "+++ATH"        

        SAY "\nGoodbay\n"

5.拨号

        #pppd call wcdma &

         会有一堆请求连接的信息打印出来。连接成功后会分配ip地址,并且有ifconfig -a 命令会多出一个ppp0节点。

        重新设置默认网卡

        # route add default dev ppp0

你可能感兴趣的:(rk3288 ubuntu16.04 L506全网通4G模块ppp拨号)