Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
55
package/network/utils/comgt/files/directip.gcom
Normal file
55
package/network/utils/comgt/files/directip.gcom
Normal file
@@ -0,0 +1,55 @@
|
||||
opengt
|
||||
set com 115200n81
|
||||
set comecho off
|
||||
set senddelay 0.05
|
||||
waitquiet 1 0.2
|
||||
|
||||
:start
|
||||
if $env("USE_AUTH") = "0" goto connect
|
||||
send "AT$QCPDPP=3,"
|
||||
send $env("USE_AUTH")
|
||||
send ",\""
|
||||
if $env("USE_USER") <> "" send $env("USE_USER")
|
||||
send "\",\""
|
||||
if $env("USE_PASS") <> "" send $env("USE_PASS")
|
||||
send "\"^m"
|
||||
waitfor 5 "OK"
|
||||
if % = 0 goto connect
|
||||
print "WWAN error. Auth failed.\r\n"
|
||||
exit 1
|
||||
|
||||
:connect
|
||||
send "AT+CFUN=1^m"
|
||||
send "AT+CGDCONT=3,\"IP\",\""
|
||||
send $env("USE_APN")
|
||||
send "\"^m"
|
||||
waitfor 5 "OK"
|
||||
if % = 0 goto connok
|
||||
print "WWAN error. Connection failed.\r\n"
|
||||
exit 1
|
||||
|
||||
:connok
|
||||
let c=1
|
||||
:loop
|
||||
sleep 2
|
||||
send "AT+CGATT?^m"
|
||||
waitfor 5 "+CGATT: 1"
|
||||
if % = 0 goto carrierok
|
||||
if c > 10 goto carriererr
|
||||
inc c
|
||||
goto loop
|
||||
|
||||
:carriererr
|
||||
print "WWAN error. No carrier.\r\n"
|
||||
exit 1
|
||||
|
||||
:carrierok
|
||||
send "AT!SCACT=1,3^m"
|
||||
waitfor 5 "OK"
|
||||
if % = 0 goto dialok
|
||||
print "WWAN error. Dialing failed.\r\n"
|
||||
exit 1
|
||||
|
||||
:dialok
|
||||
print "WWAN connection established.\r\n"
|
||||
exit 0
|
||||
Reference in New Issue
Block a user