CUSTOMATCOMMANDS
225 HSPA+ATCommandsReferenceGuide
ParametersandValues
<connId> Socketconnectionidentifier.
1‐6
<txProt> Transmissionprotocol.
0 TCP.
1 UDP.
<rPort> Remotehostporttocontact.
1‐65535
<IPaddr> Stringtype,addressoftheremotehost.Canbe:
anyvalidIPaddressintheformat:“xxx.xxx.xxx.xxx”.
anyhostnametobesolvedwithaDNSquery.
<closureType> Socke
tclosurebehaviorforTCP.
0 Localhostclosesimmediatelywhenremotehosthasclosed.Default:0.
255 Localhostclosesafteranescapesequence(+++).
<lPort> UDPconnectionslocalport.
1‐65535
<connMode> Connectionmode.
0 Onlinemodeconnection.Default:0.
1 Commandmodeconnection.
Notes
<closureType>parameterisvalidforTCPconnectionsonlyandhasnoeffect(ifused)forUDPconnections.
<lPort>parameterisvalidforUDPconnectionsonlyandhasnoeffect(ifused )forTCPconnections.
Note:If<connMode>issettoonlinemodeconnectionandthecommandissuccessfulonline datamodeis
entered,withtheintermediateresultcodeCONNECT.AftertheCONNECTyoucansuspendthedirect interface
tothesocketconnection(thesocketstaysopen)usingtheescapesequence(+++):themodulemovesbackto
comman
dmodeandyoureceivethefinalresultcodeOKafterthesuspension.Aftersuch asuspension,it’s
possibletoresumeitineverymoment(unlessthesocket inactivitytimertimeouts,see#SCFG)byusingthe#SO
commandwiththecorresponding<con nId>.
Ifyouset<connMode>tocommandmodeconnectionandthecommandissuccessful,thesocketisopened,you
remainincommandmodeandtheresultcodeOKappears.
Ifthereareinputdataarrivedthrough aconnectedsocketandnotyetreadbecausethemod uleentered
commandmodebeforereadingthem(afteranescapesequenceorafter#SDisissuedwith<connMode>setto
commandmodeconnection),thesedataarebufferedandtheSRINGURCisreceived.TheSRINGpresentation
formatdep
endsonthelast#SCFGEXTsetting.Itispossibletoreadthesedataafterwardsissuing#SRECV.Under
thesamehypothesesitispossibletosenddatawhileincommandmodeissuing#SSEND
Resumeofthesocket(#SO)aftersuspensionorclosure(#SH)hastobedoneonthesameinstanceonwhichthe
socketwasopenedthrough#SD.Infact,suspensionisdoneontheinstanceitself
Examples
Opensocket1inonlinemode
AT#SD=1,0,80,”www.google.com”,0,0,0
CONNECT
Commentaires sur ces manuels