Embedded development-The first part of Mobile 4G module porting for iMX6 Development Board

Source: Internet
Author: User
Tags imx6

The first part of Mobile 4G module for QT transplant

More information: http://topeetboard.com More about: https://arm-board.taobao.com

1. First configure the kernel, this step is the same as the Android system porting 3G or 4G modules. General module manufacturers will provide porting documents, according to the document configuration kernel PPP protocol, USB to string, WCDMA, etc., add PID vid can. This step is strictly in accordance with the module kernel modification.
Here the main analysis of the QT file system modification, internal core does not do too much analysis.
The configured kernel can find the ttyusb0-3 device node under dev after powering on.

2. Prepare for the job; Download ppp-2.4.4.tar.gz, this I will upload.

①. Decompression: Tar-vxf ppp-2.4.4.tar.gz.

②. Run configure, Generate Makefile:./configure

③. Compile input command: Make cc=arm-none-linux-gnueabi-gcc-4.4.1
Here is a description, cc=arm-none-linux-gnueabi-gcc-4.4.1 is the compiler, you can enter arm and then double press the TAB key to find their own cross-compiler.

Through the above three steps will be in chat, PPPD, Pppdump, Pppstats generated four executable files chat, pppd, Pppdump, pppstats, for dialing.

3. The following operations are available in the Qt file system, where the QT file system provided by Schindler is used: rootfs.tgz

①. Decompression ROOTFS.TGZ:TAR-VXF rootfs.tgz

②. Create a new folder PPP in etc

③. Copy the four executable files (chat, pppd, Pppdump, pppstats) generated above into PPP.

4. Write the configuration file
①. Under Etc/ppp file Pap-secrets:vim pap-secrets

②. Input
# Secrets for authentication using PAP
# Client Server Secret IP addresses
Card * Card *

In the 4G signal in the communication time there is a password, the password pair can communicate. The above shows that the user is card password is card

③. Create a new folder under ETC/PPP Peers:mkdir peers
Create a new file inside peers Wcdma:vim WCDMA
Input:

#/ETC/PPP/PEERS/WCDMA
# This was PPPD script for China Liantong
# USAGE:ROOT>PPPD Call WCDMA

Hide-password

Noauth

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

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

Debug

/dev/ttyusb2

115200

Defaultroute

Noipdefault

Novj

Novjccomp

Noccp

Ipcp-accept-local

Ipcp-accept-remote

Local

Lock

Dump

Nodetach

User "card"

Password "card"

Crtscts

RemoteName 3GPPP

Ipparam 3GPPP

Usepeerdns

Note Here is/DEV/TTYUSB2, this sentence to be based on their own situation, the 4G module should be some of the manual for the AT command, PPP dialing. Look at your manual and decide if it's ttyUSB2.
Other than that:
User "card"
Password "card"
This corresponds to the above user and password.

④. Also create a new file in peers Wcdma-chat-connect:vim Wcdma-chat-connect input:
ABORT "BUSY"
ABORT "NO CARRIER"
ABORT "NO Dialtone"
ABORT "ERROR"
ABORT "NO ANSWER"
TIMEOUT 120
"At
OK \ratz
Ok \rat+cgdcont=1, "IP", "3gnet", 0,0
Ok-at-ok atdt*99#
CONNECT \d\c

Here OK \rat+cgdcont=1, "IP", "3gnet",, 0,0
Ok-at-ok atdt*99#
These two words will change according to Mobile Unicom or telecom, I use mobile 4G.

⑤. Also create a new Wcdma-chat-disconnect:vim Wcdma-chat-disconnect input in peers:
ABORT "ERROR"

ABORT "NO Dialtone"

SAY "Insending break to the modem\n"

"" \k "

"" +++ath "

SAY "\ngood bye\n"
This completes the most part can be burned in first try.
Test method:
Input after power on: ifconfig eth0 down will eth0 off, because he will conflict with the module.
Then enter the command under/ETC/PPP:
PPPD Call wcdma&
Keep it running in the background, if the migration succeeds, it will print some information, and the following is the last part of the interception:

CHAP Authentication Succeeded
CHAP Authentication Succeeded
Sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
RCVD [IPCP ConfReq id=0x0]
Sent [IPCP Confnak id=0x0 <addr 0.0.0.0>]
RCVD [IPCP confnak id=0x1 <addr 10.211.219.99> <ms-dns1 221.130.33.60> <ms-dns3 221.130.33.52>]
Sent [IPCP ConfReq id=0x2 <addr 10.211.219.99> <ms-dns1 221.130.33.60> <ms-dns3 221.130.33.52>]
RCVD [IPCP ConfReq id=0x1]
Sent [IPCP Confack id=0x1]
RCVD [IPCP confack id=0x2 <addr 10.211.219.99> <ms-dns1 221.130.33.60> <ms-dns3 221.130.33.52>]
Could not determine remote IP address:defaulting to 10.64.64.64
Local IP Address 10.211.219.99
Remote IP Address 10.64.64.64
Primary DNS Address 221.130.33.60
Secondary DNS address 221.130.33.52

Here can be a ping IP address here, note that if the IP address can be flat, you can first try to ping on the computer, and then ping on the Development Board. Enter Ifconfig here to have ppp0 appear.

Embedded development-The first part of Mobile 4G module porting for iMX6 Development Board

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.