Linux realizes ppp dial-up 4G module networking in global APN Thailand (Thailand)

Thailand has six network operators:
AIS (1-2-Call, you! Mobile)
dtac
TrueMove H
My (by CAT)
My (by CAT)
Penguin SIM (on CAT)
Finn Mobile (previously LINE Mobile, on dtac)

chat script configuration

The chat script is mainly used to complete the dialing process of the 4G module through AT commands.
There is also a commonly used keyword in chat, ABORT, which is used to determine when to terminate the script. During the AT interaction, the module has an error and outputs some errors. When message, ABORT can stop the current script according to the set word.

The following script is named "gprs-connect-chat" to
modify the gprs-connect-chat script
vi /etc/ppp/peers/gprs-chat-connect

Network operator APN

AIS (1-2-Call, you! Mobile)

ABORT "BUSY"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
TIMEOUT 120
"" AT
OK \rATZ
# Connection to the network
OK  \rAT+CGDCONT=1,"IP","internet",,0,0
# Dial the number
OK-AT-OK ATDT*99#
CONNECT \d\c 

dtac

ABORT "BUSY"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
TIMEOUT 120
"" AT
OK \rATZ
# Connection to the network
OK  \rAT+CGDCONT=1,"IP","www.dtac.co.th",,0,0
# Dial the number
OK-AT-OK ATDT*99#
CONNECT \d\c 

TrueMove H

ABORT "BUSY"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
TIMEOUT 120
"" AT
OK \rATZ
# Connection to the network
OK  \rAT+CGDCONT=1,"IP","internet",,0,0
# Dial the number
OK-AT-OK ATDT*99#
CONNECT \d\c 

My (by CAT)

ABORT "BUSY"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
TIMEOUT 120
"" AT
OK \rATZ
# Connection to the network
OK  \rAT+CGDCONT=1,"IP","internet",,0,0
# Dial the number
OK-AT-OK ATDT*99#
CONNECT \d\c 

Penguin SIM (on CAT)

ABORT "BUSY"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
TIMEOUT 120
"" AT
OK \rATZ
# Connection to the network
OK  \rAT+CGDCONT=1,"IP","internet",,0,0
# Dial the number
OK-AT-OK ATDT*99#
CONNECT \d\c 

Finn Mobile (previously LINE Mobile, on dtac)

ABORT "BUSY"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
TIMEOUT 120
"" AT
OK \rATZ
# Connection to the network
OK  \rAT+CGDCONT=1,"IP","internet",,0,0
# Dial the number
OK-AT-OK ATDT*99#
CONNECT \d\c 

Guess you like

Origin blog.csdn.net/weixin_41493857/article/details/108682277