Modem has three nodes: ttyusb0, ttyusb1, and ttyusb2.
Ttyusb1 is the AT command node and ttyusb2 is the data node (which is the data node? Ask the vendor)
First, set the modem through ttyusb1 as follows:
1. At + cgdcont = 1, "ip", "cmnet"
2. At + cgatt = 1
3. ATD * 99 *** 1 # (my SIM card is from China Mobile)
After logging on to the GPRS network, create a PPP connection.
Modify/etc/PPP/peers/cmnet as follows, only the first and second items need special processing:
---------------------------------------------
/Dev/ttyusb2 # Set this parameter based on the data node of your modem.
115200 # Can I use at + IPR? View modem speed
Nocrtscts
Nocdtrcts
Local
Usepeerdns
Defaultroute
Noipdefault
Ipcp-Accept-Local
Lock
Nodetach
Persist
User card
Password card
-----------------------------------------------------------------
# Pppd call cment
# Busybox ifconfig-A: You can see the newly created network node and the IP address has been assigned.
# Ping news.sina.com.cn.
Note:
1. There are a lot of AT commands. The three commands are actually used for accessing the Internet. Maybe they are related to my modem.
2. Many people use the AT command automatically executed by chat. My device does not have the chat, so I will first execute the AT command on the Internet through the command line, the effect is the same
3. I added an antenna, at + CSQ? The test signal is good, so you don't need to consider the problem of poor signal.