Create a 3G dialing Image
1. to configure the kernel, add
Easy NFS debugging
Usbserial load driver
2. Configure other options: vendor
3G add dialing tools and scripts
It is best to add Netcat to busybox for debugging.
3. modify the configuration file and add support for additional modules. Therefore, we define the following:
Sbin/3G. Sh
Etc_ro/web/Internet/WAN. asp
920 <option value = "MU-Q101" id = "MU-Q101"> nu MU-Q101 </option>
+ <Option value = "mc8630" id = "mc8630"> ZTE mc8630 </option>
921 <option value = "HUAWEI-E169" id = "e169"> Huawei e169 </option>
Elif ["$ Dev" = "HUAWEI-E169"]; then
Usb_modeswitch-C/etc_ro/USB/usb_modeswitch_HUAWEI-E169.conf
+ Elif ["$ Dev" = "mc8630"]; then
+ Echo "We use mc8630, no need usb_modeswitch"
Elif ["$ Dev" = "HUAWEI-E169"]; then
Vend_id = "0x12d1"
Prod_id = "0x1001"
+ Elif ["$ Dev" = "mc8630"]; then
+ Vend_id = "0x19d2"
+ Prod_id = "0 xfffe"
-Insmod usbserial vendor = $ vend_id Product = $ prod_id
+ Insmod/etc_ro/usbserial. Ko vendor = $ vend_id Product = $ prod_id
If ["$ Dev "! = "OPTION-ICON225"]; then
-Config-3g-ppp.sh-P pass-u user-M $ modem_f-C generic_conn.scr-D generic_disconn.scr
+ Config-3g-ppp.sh-P card-u card-B 115200-M $ modem_f-C my_conn.scr-D generic_disconn. SC
Pppd call 3G
4. Compile my_conn.scr
-Send "ATD * 99 # ^ m"
+ Send "ATD #777 ^ m"
-Set com 115200n81
+ Set com 3366n81
-Send "at + cfun = 1; + cgdcont = 1, \" IP \ ", \" Internet \ "^ m"
-Waitfor 10 "OK", "Err", "error"
Try remeber {
Vendor = 0x19d2 Product = 0 xfffe
+ Config-3g-ppp.sh-P card-u card-B 460800-M $ modem_f-C generic_conn.scr-D generic_disconn. SC
}
4. Compile and load the image. on the web page, select the 3G module.
5.
========================================================== ========================================================== =
6. debugging records
Other possible initialization and at configurations (captured from the official website)
Init2 = atz
Init3 = atq0 V1 E1 S0 = 0 & C1 & D2 + F> ISDN = 0
Auto reconnect = off
Crtscts
Lock
Asyncmap 20a0000
Kdebug 4
-Detach
LCP-Echo-failure 4
LCP-Echo-interval 30
Ipcp-max-failure 30
Ipcp-max-configure 30
-CCP
-VJ
Nvram_get2860 wan_3g_dev
Lan_ip = 'nvram _ Get 2860 lan_ipaddr'
Stp_en = 'nvram _ Get 2860 stpenabled'
Nat_en = 'nvram _ Get 2860 natenabled'
Bssidnum = 'nvram _ Get 2860 bssidnum'
Radio_off = 'nvram _ Get 2860 radiooff'
Obtain the configuration information of the 3G module in Flash paramter.
# Nvram_get 2860 wan_3g_dev
HUAWEI-E169
Ralink_init make_wireless_config rt2860 ??? Set flash paramter
Ralink_init make_wireless_config rt2860
Is this configuration causing pppd problems?
CAT/dev/mtd1 can print all the environment variables, but you need to copy them and format them again.
Network
# Iwpriv
Mkdir/var/lock
CAT/var/log/PPP-connect-Errors
Pppd debug-nodetach crtscts lock connect 'chat "" ATD #777 connect '/dev/ttyusb0 115200
Chat-v-s "" atdt #777 connect
-S ouput to stderr but syslog, all message will be sent to stderr
-S don't use Syslog
-E enable echo to stdout
Pppd debug nodetach logfd 1 connect 'chat-v-s "" At OK atdt #777 connect '/dev/ttyusb0 115200
Logfile a.txt
Notty doesn't use tty, allowed a pseudo-tty
Pty special Pty command to connect remote
Anser:
61 <7> out Nak enhancement disabled, no core support
64 <7> out Nak enhancement disabled, no core support
74 <7> out Nak enhancement disabled, no core support
37 <7> out Nak enhancement disabled, no core support
37 <7> out Nak enhancement disabled, no core support
37 <7> out Nak enhancement disabled, no core support
0d <7> out Nak enhancement disabled, no core support
# Pppd file 3G
Send (at ^ m)
CT (OK)
At ^ m
OK
-- Got it
Send (ATH ^ m)
CT (OK)
^ M
Ath ^ m
OK
-- Got it
Send (atdt #777 ^ m)
Secondary CT (CONNECT)
^ M
Atdt #777 ^ m
Connect
-- Got it
Serial Connection established.
Using Channel 5
Using interface ppp0
Connect: ppp0 <-->/dev/ttyusb0
Rcvd [LCP confreq id = 0x1 <MRU 1448> <asyncmap 0x0> <auth chap MD5> <magic 0x4f5e7508> <pcomp> <accomp>]
Warning-secret file/etc_ro/PPP/PAP-secrets has world and/or group access
Sent [LCP confreq id = 0x1 <asyncmap 0x0> <magic 0x8fc751f0> <pcomp> <accomp>]
Sent [LCP confnak id = 0x1 <auth Pap>]
Rcvd [LCP confack id = 0x1 <asyncmap 0x0> <magic 0x8fc751f0> <pcomp> <accomp>]
Rcvd [LCP confreq id = 0x2 <MRU 1448> <asyncmap 0x0> <auth Pap> <magic 0x4f5e7508> <pcomp> <accomp>]
Sent [LCP confack id = 0x2 <MRU 1448> <asyncmap 0x0> <auth Pap> <magic 0x4f5e7508> <pcomp> <accomp>]
Warning-secret file/etc_ro/PPP/PAP-secrets has world and/or group access
Sent [pap authreq id = 0x1 user = "card" Password = Rcvd [pap authack id = 0x1 ""]
PAP authentication succeeded
Sent [CCP confreq id = 0x1 <BSD V1 15>]
Sent [ipcp confreq id = 0x1 <compress VJ 0f 01> <ADDR 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Rcvd [ipcp confreq id = 0x3 <compress VJ 07 00> <ADDR 115.168.43.12>]
Sent [ipcp confack id = 0x3 <compress VJ 07 00> <ADDR 115.168.43.12>]
Rcvd [CCP confreq id = 0x4 <MPPE-H-m-S-l-D + C>]
Sent [CCP confrej id = 0x4 <MPPE-H-m-S-l-D + C>]
Rcvd [CCP confrej id = 0x1 <BSD V1 15>]
Sent [CCP confreq id = 0x2]
Rcvd [ipcp confnak id = 0x1 <compress VJ 07 00> <ADDR 122.229.143.56> <ms-dns1 202.101.172.37> <ms-dns3 202.101.173.157>]
Sent [ipcp confreq id = 0x2 <compress VJ 07 00> <ADDR 122.229.143.56> <ms-dns1 202.101.172.37> <ms-dns3 202.101.173.157>]
Rcvd [CCP termack id = 0x5]
Sent [CCP termreq id = 0x3 "no compression negotiated"]
Rcvd [ipcp confack id = 0x2 <compress VJ 07 00> <ADDR 122.229.143.56> <ms-dns1 202.101.172.37> <ms-dns3 202.101.173.157>]
Local IP address 122.229.143.56
Remote IP address 115.168.43.12
Primary DNS address 202.101.172.37
Secondary DNS address 202.101.173.157
Script/etc_ro/PPP/IP-up started (PID 956)
Rcvd [CCP termack id = 0x3]
Rt305x_esw: link status changed
Rt305x_esw: link status changed
/Dev/ttyusb0
460800
Connect '/bin/chat-T 3-v-F/tmp/Unicom'
Disconnect 'echo disconnect now>/tmp/pppdis'
Debug
Noipdefault
Nodetach
Usepeerdns
Ipcp-Accept-Local
Ipcp-Accept-remote
Defaultroute
Require-Chap
# Login
User card
Password card
Remotename
Abort "no carrier"
Abort "No dialtone"
Abort "error"
Abort "No answer"
Abort "busy"
Timeout 120
""
OK atz
OK "atq0 V1 E1 S0 = 0 & C1 & D2 + F
Okay atdt #777
Connect
Pppd debug auth login user card password card nodetach logfd 1 connect 'chat-v-s "" At OK atdt #777 connect '/dev/ttyusb0 115200
Pppd debug nodetach logfd 1 connect 'chat-v-s "" At OK ath OK atdt #777 connect '/dev/ttyusb0 115200
Do not go online after dialing.
Use:
Pppd debug nodetach logfd 1 connect 'chat-T 13-v-s "" At OK atdt #777 connect '/dev/ttyusb0 115200
Pppd debug nodetach logfile/tmp/log connect 'chat-v-s "" At OK atdt #777 connect '/dev/ttyusb0 115200
Pppd debug nodetach logfd 1 connect 'chat-T 1-v-s "" at OK ath connect '/dev/ttyusb1 115200
Pppd debug nodetach logfd 1 connect 'chat-v-s "" At OK at connect '/dev/ttyusb1 115200
Disconnect ''Command executed when disconnected
Show-Password: Display password in plaintext
122.229.95.19
115. 168.43.151
Debug 3G dialing on the vro