TD拨号成功方案

时间:2020-12-18 14:40:36

使用BlackfinBF561芯片和uClinux的嵌入式环境,LC6311 TD开发板模块。

一、关于PPP拨号工具的配置

关于PPP支持:

http://docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:ppp&s[]=ppp

make  linux_menuconfig

Device Drivers  --->

Network device support  --->

<*>   PPP (point-to-point protocol) support

<*>     PPP support for async serial ports

<*>    SLIP (serial line) support

[*]     CSLIP compressed headers

[*]     Keepalive and linefill 

make config_menuconfig

Network Applications  --->

[*]   pppd

[ ]   enable PPPOE (NEW)                #注意这个不要选

Miscellaneous Applications

[*] chat

二、关于串口正常工作的配置

make  linux_menuconfig

Device Drivers  --->

   Character devices-

<*>   blackfin serial port support

<*>   console on Blackfin serial ports

<*>     UART mode-->

            <*>DMA mode

<*>   Enable UART0 hardware flow control

            <*>UART0 CTS PIN

            <*>UART0 RTS PIN

三、关于USB口正常工作的配置

主要两部分:

USB部分以及SCSI的设置用于支持U盘等。

Device Drivers --->

USB support --->

<*> Support for Host-side USB

[*] USB device class-devices (DEPRECATED)

<*> ISP1362 HCD support

--- NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'

--- may also be needed; see USB_STORAGE Help for more information

<*> USB Mass Storage support

SCSI device support --->

<*> SCSI device support

[*] legacy /proc/scsi/ support

<*> SCSI disk support

[*] Probe all LUNs on each SCSI device

四、拨号脚本

uClinux-dist-2008R1-RC8/user/pppd/ppp-2.4.4/etc.ppp/下新建两个文件夹peerschat,分别存放TDtd2脚本文件,重新编译内核,telnet远程登录到板卡系统中,使用pppd call TD命令进行拨号即可。

/etc/ppp/peers下的TD脚本为:

modem

ttyUSB0ttyS0

115200

crtsctsnocrtscts

connect '/usr/sbin/chat -v -f /etc/ppp/chat/td2'

mru 1154

mtu 1154

debug

noauth

nodetach

noipdefault

defaultroute

/etc/ppp/chat下的td2脚本为:

ABORT BUSY

ABORT 'NO CARRIER'

ABORT 'ERROR'

ABORT '+CME ERROR: 100'

''

AT+CFUN=5

OK

AT+CFUN=1

OK

AT+COPS=0

OK

AT+CGDCONT=1,"IP","CMNET","",0,0

OK

AT+CGEQREQ=1,2,128,128,64,64,0,0,"0E0","0E0",,0,0

OK

ATD*98*1#

TIMEOUT 20

CONNECT

/etc/ppp下的options脚本为:

lock

nocrtscts

nocdtrcts

local

novj

usepeerdns

defaultroute

noipdefault

ipcp-accept-local

ipcp-accept-remote

在使用串口拨号的时候使用硬件流控,在使用USB拨号的时候不使用硬件流控,在使用USB模块的时候,首先在内核配置的时候,

Device Drivers ---> USB support ---> USB Serial Converter support --->

<M> USB Serial Converter support

[*] USB Generic Serial Driver

生成的usbserial.ko加载到开发板内核,并创建3G模块设备节点,即在系统启动后对应的/lib/…/usb/serial/下执行以下命令即可。

insmod usbserial.ko vendor=0x1ab7 product=0x6000

mknod /dev/ttyUSB0 c 188 0