[Hilo] How to abort AT+KTCPCNX=1?


#1

[Hilo] How to abort AT+KTCPCNX=1 when I don’t’ want to wait the response anymore?

Answer: For AT+KTCPCNX=1, it will activate the PDP context and then connect the remote IP/port.
During AT+KTCPCNX, you can use any character to abort. Then modem will return “NO CARRIER” immediately.
But please do not forget to use <AT+KTCPCLOSE> to release all the resources at the end for safty.

For example:
AT+KTCPCFG=0,0,“111.111.111.111”,111
+KTCPCFG: 1
OK
AT+KTCPCNX=1
a ----You can input any character to abort immediately, here I input ‘a’
NO CARRIER
AT+KCGPADDR ----Since my abort happens during the remote IP connection, so PDP is kept
+KCGPADDR: 0,“10.17.212.131”
OK
AT+KTCPCLOSE=1,1
OK ----Please do not forget to use AT+KTCPCLOSE to release the PDP resources at the end

AT+KTCPCFG=0,0,“111.111.111.111”,111
+KTCPCFG: 1
OK
AT+KTCPCNX=1
A
NO CARRIER
+KTCP_NOTIF: 1,5
AT+KCGPADDR ----PDP is released since the abort happens just when the connection set up.
OK
AT+KTCPCLOSE=1,1
OK