“MY-I.MX6 评估板 开发指导手册 3G模块(MU609)”的版本间的差异
(创建页面,内容为“= '''内核配置''' = ---- 提示:内核配置对3G模块的支持在《MY-I.MX6 V2.5 Linux编译手册》中已经完成。<br> = '''编译ppp''' = ---- == '''...”) |
|||
第1行: | 第1行: | ||
− | = '''内核配置''' = | + | = '''内核配置(kernel configuration)''' = |
---- | ---- | ||
提示:内核配置对3G模块的支持在《MY-I.MX6 V2.5 Linux编译手册》中已经完成。<br> | 提示:内核配置对3G模块的支持在《MY-I.MX6 V2.5 Linux编译手册》中已经完成。<br> | ||
− | = '''编译ppp''' = | + | <span style="background:#CCCCCC">tips:3G module supported by kernel configuration was described in《MY-I.MX6 V2.5 Linux compilation manual》。</span><br> |
+ | = '''编译ppp(compife ppp)''' = | ||
---- | ---- | ||
− | == '''准备源码''' == | + | == '''准备源码(prepare source code)''' == |
− | === 下载源码包 === | + | === 下载源码包(download source code package) === |
从网盘下载ppp-2.4.4.tar.gz,路径为MY-I.MX6 V2.5/04_模块/3G_MU609。<br> | 从网盘下载ppp-2.4.4.tar.gz,路径为MY-I.MX6 V2.5/04_模块/3G_MU609。<br> | ||
− | === 创建并进入3G工作目录 === | + | <span style="background:#CCCCCC">download ppp-2.4.4.tar.gz from network disk,path is MY-I.MX6 V2.5/04_ module/3G_MU609。</span><br> |
+ | === 创建并进入3G工作目录(create and enter 3G working directory) === | ||
$ mkdir ~/MY-I.MX6/3G/<br> | $ mkdir ~/MY-I.MX6/3G/<br> | ||
$ cd ~/MY-I.MX6/3G/<br> | $ cd ~/MY-I.MX6/3G/<br> | ||
− | === 解压源码包 === | + | |
+ | |||
+ | |||
+ | === 解压源码包(decompress source code package) === | ||
*将ppp源码包复制到工作目录<br> | *将ppp源码包复制到工作目录<br> | ||
+ | <span style="background:#CCCCCC">copy ppp source code packge to working directory</span><br> | ||
*解压源码包<br> | *解压源码包<br> | ||
+ | <span style="background:#CCCCCC">decompress source code package</span><br> | ||
$ tar zxf ppp-2.4.4.tar.gz<br> | $ tar zxf ppp-2.4.4.tar.gz<br> | ||
− | == '''编译''' == | + | == '''编译(compilation)''' == |
*进入源码目录<br> | *进入源码目录<br> | ||
+ | <span style="background:#CCCCCC">enter source code directory</span><br> | ||
$ cd ppp-2.4.4/<br> | $ cd ppp-2.4.4/<br> | ||
− | === 生成配置文件 === | + | === 生成配置文件(created configruation file) === |
$ ./configure<br> | $ ./configure<br> | ||
− | === 编译源码 === | + | === 编译源码(compife source code) === |
*使MY-I.MX6配置文件生效<br> | *使MY-I.MX6配置文件生效<br> | ||
+ | <span style="background:#CCCCCC">make MY-I.MX6 configuration file valid</span><br> | ||
$ source ~/MY-I.MX6/my-imx6_build.conf<br> | $ source ~/MY-I.MX6/my-imx6_build.conf<br> | ||
*编译<br> | *编译<br> | ||
+ | <span style="background:#CCCCCC">compilation</span><br> | ||
$ make CC=${CROSS_COMPILE}gcc<br> | $ make CC=${CROSS_COMPILE}gcc<br> | ||
− | == '''目标文件''' == | + | |
+ | |||
+ | |||
+ | == '''目标文件(target file)''' == | ||
编译完成后即可得到pppd和chat,这两个文件即我们的目标文件。<br> | 编译完成后即可得到pppd和chat,这两个文件即我们的目标文件。<br> | ||
− | + | <span style="background:#CCCCCC">pppd and chat can be gained after compilation is finished,which are our target files。</span><br> | |
+ | pppd 路径: pppd/pppd<br> | ||
+ | <span style="background:#CCCCCC">pppd path: pppd/pppd</span><br> | ||
chat路径: chat/chat<br> | chat路径: chat/chat<br> | ||
− | = ''' | + | <span style="background:#CCCCCC">chat path: chat/chat</span><br> |
+ | = '''打包文件系统(package file system)''' = | ||
---- | ---- | ||
− | == '''准备应用程序''' == | + | == '''准备应用程序(prepare application)''' == |
*将目标文件复制到文件系统中的usr/sbin目录里<br> | *将目标文件复制到文件系统中的usr/sbin目录里<br> | ||
+ | <span style="background:#CCCCCC">copy target file to usr/sbin directory in file system</span><br> | ||
$ cp pppd/pppd ~/MY-I.MX6/rootfs/usr/sbin<br> | $ cp pppd/pppd ~/MY-I.MX6/rootfs/usr/sbin<br> | ||
$ cp chat/chat ~/MY-I.MX6/rootfs/usr/sbin<br> | $ cp chat/chat ~/MY-I.MX6/rootfs/usr/sbin<br> | ||
*进入文件系统目录<br> | *进入文件系统目录<br> | ||
+ | <span style="background:#CCCCCC">enter file system directory</span><br> | ||
$ cd ~/MY-I.MX6/rootfs<br> | $ cd ~/MY-I.MX6/rootfs<br> | ||
*创建拨号脚本目录<br> | *创建拨号脚本目录<br> | ||
+ | <span style="background:#CCCCCC">create dialing script directory</span><br> | ||
$ mkdir etc/ppp/peers/ –p<br> | $ mkdir etc/ppp/peers/ –p<br> | ||
− | == '''创建脚本''' == | + | == '''创建脚本(create script)''' == |
+ | |||
+ | |||
+ | |||
+ | |||
=== wcdma === | === wcdma === | ||
在etc/ppp/peers/下创文件wcdma并写入以下内容<br> | 在etc/ppp/peers/下创文件wcdma并写入以下内容<br> | ||
+ | <span style="background:#CCCCCC">create file of wcdma and write in below contents under etc/ppp/peers/</span><br> | ||
+ | |||
nodetach<br> | nodetach<br> | ||
lock<br> | lock<br> | ||
第61行: | 第86行: | ||
disconnect '/usr/sbin/chat -s -v -f /etc/ppp/peers/wcdma-chat-disconnect'<br> | disconnect '/usr/sbin/chat -s -v -f /etc/ppp/peers/wcdma-chat-disconnect'<br> | ||
=== wcdma-chat-connect === | === wcdma-chat-connect === | ||
+ | |||
在etc/ppp/peers/下创文件wcdma-chat-connect并写入以下内容<br> | 在etc/ppp/peers/下创文件wcdma-chat-connect并写入以下内容<br> | ||
+ | <span style="background:#CCCCCC">create file of wcdma-chat-connect and write in below contents under etc/ppp/peers/</span><br> | ||
+ | |||
ABORT 'NO CARRIER'<br> | ABORT 'NO CARRIER'<br> | ||
ABORT 'ERROR'<br> | ABORT 'ERROR'<br> | ||
第73行: | 第101行: | ||
CONNECT \d\c<br> | CONNECT \d\c<br> | ||
=== wcdma-chat-disconnect === | === wcdma-chat-disconnect === | ||
+ | |||
在etc/ppp/peers/下创文件wcdma-chat-disconnect并写入以下内容<br> | 在etc/ppp/peers/下创文件wcdma-chat-disconnect并写入以下内容<br> | ||
+ | <span style="background:#CCCCCC">create file of wcdma-chat-disconnect and write in below contents etc/ppp/peers/</span><br> | ||
+ | |||
ABORT "ERROR"<br> | ABORT "ERROR"<br> | ||
ABORT "NO DIALTONE"<br> | ABORT "NO DIALTONE"<br> | ||
第80行: | 第111行: | ||
'' "+++ATH"<br> | '' "+++ATH"<br> | ||
SAY "\nGoodbay\n"<br> | SAY "\nGoodbay\n"<br> | ||
− | == '''打包文件系统''' == | + | |
+ | |||
+ | |||
+ | == '''打包文件系统(package file system)''' == | ||
$ tar cjf ../rootfs.tar.bz2 *<br> | $ tar cjf ../rootfs.tar.bz2 *<br> | ||
− | == '''3G模块测试''' == | + | == '''3G模块测试(3G module test)''' == |
启动开发板,执行下面的命令:<br> | 启动开发板,执行下面的命令:<br> | ||
+ | <span style="background:#CCCCCC">start up development board,execute below command:</span><br> | ||
$ pppd call wcdma &<br> | $ pppd call wcdma &<br> |
2017年5月26日 (五) 11:13的版本
目录
= 内核配置(kernel configuration) =
提示:内核配置对3G模块的支持在《MY-I.MX6 V2.5 Linux编译手册》中已经完成。
tips:3G module supported by kernel configuration was described in《MY-I.MX6 V2.5 Linux compilation manual》。
= 编译ppp(compife ppp) =
准备源码(prepare source code)
下载源码包(download source code package)
从网盘下载ppp-2.4.4.tar.gz,路径为MY-I.MX6 V2.5/04_模块/3G_MU609。
download ppp-2.4.4.tar.gz from network disk,path is MY-I.MX6 V2.5/04_ module/3G_MU609。
创建并进入3G工作目录(create and enter 3G working directory)
$ mkdir ~/MY-I.MX6/3G/
$ cd ~/MY-I.MX6/3G/
解压源码包(decompress source code package)
- 将ppp源码包复制到工作目录
copy ppp source code packge to working directory
- 解压源码包
decompress source code package
$ tar zxf ppp-2.4.4.tar.gz
编译(compilation)
- 进入源码目录
enter source code directory
$ cd ppp-2.4.4/
生成配置文件(created configruation file)
$ ./configure
编译源码(compife source code)
- 使MY-I.MX6配置文件生效
make MY-I.MX6 configuration file valid
$ source ~/MY-I.MX6/my-imx6_build.conf
- 编译
compilation
$ make CC=${CROSS_COMPILE}gcc
目标文件(target file)
编译完成后即可得到pppd和chat,这两个文件即我们的目标文件。
pppd and chat can be gained after compilation is finished,which are our target files。
pppd 路径: pppd/pppd
pppd path: pppd/pppd
chat路径: chat/chat
chat path: chat/chat
= 打包文件系统(package file system) =
准备应用程序(prepare application)
- 将目标文件复制到文件系统中的usr/sbin目录里
copy target file to usr/sbin directory in file system
$ cp pppd/pppd ~/MY-I.MX6/rootfs/usr/sbin
$ cp chat/chat ~/MY-I.MX6/rootfs/usr/sbin
- 进入文件系统目录
enter file system directory
$ cd ~/MY-I.MX6/rootfs
- 创建拨号脚本目录
create dialing script directory
$ mkdir etc/ppp/peers/ –p
创建脚本(create script)
wcdma
在etc/ppp/peers/下创文件wcdma并写入以下内容
create file of wcdma and write in below contents under etc/ppp/peers/
nodetach
lock
/dev/ttyUSB0
115200
user "card"
password "card"
crtscts
show-password
usepeerdns
noauth
noipdefault
novj
novjccomp
noccp
defaultroute
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'
wcdma-chat-connect
在etc/ppp/peers/下创文件wcdma-chat-connect并写入以下内容
create file of wcdma-chat-connect and write in below contents under etc/ppp/peers/
ABORT 'NO CARRIER'
ABORT 'ERROR'
ABORT 'NO DIALTONE'
ABORT 'BUSY'
ABORT 'NO ANSWER'
\rAT
OK \rATZ
OK \rAT+CGDCONT=1,"IP","3gnet",,0,0
OK-AT-OK ATDT*99#
CONNECT \d\c
wcdma-chat-disconnect
在etc/ppp/peers/下创文件wcdma-chat-disconnect并写入以下内容
create file of wcdma-chat-disconnect and write in below contents etc/ppp/peers/
ABORT "ERROR"
ABORT "NO DIALTONE"
SAY "\nSending break to the modem\n"
"\K"
"+++ATH"
SAY "\nGoodbay\n"
打包文件系统(package file system)
$ tar cjf ../rootfs.tar.bz2 *
3G模块测试(3G module test)
启动开发板,执行下面的命令:
start up development board,execute below command:
$ pppd call wcdma &