Trigger manually an outgoing connection on modem
Sometimes it is useful to trigger an outgoing connection by scripting. This could then allow for example to establish a connection to the Internet or or to Talk2M when an acquired Tag is changed.
The outgoing connection must be already configured in the eWON.
To trigger the outgoing connection we will use the «Maintain connection» in the Internet connection settings of the eWON.
By scripting we will first activate the «Maintain connection» and wait for the Internet connection.
Once the Internet connection is established we will uncheck the «Maintain connection». Doing so, the connection will not be maintained once the connection timeout parameters have been reached.
GoOnline: LOGEVENT "Online connection triggered by scripting", 101 SETSYS COM,"load" SETSYS COM,"WanCnx",1 SETSYS COM,"WANPermCnx",1 SETSYS COM,"save" PRINT Time$;"Maintain connection activated" Tset 1,5A Ontimer 1, "Goto CheckConnection" END CHECKConnection: A$ = Getsys PRG, "PPPIP" IF A$ <> "0.0.0.0" THEN Tset 1,0 SETSYS COM,"load" SETSYS COM,"WanCnx",1 SETSYS COM,"WANPermCnx",0 SETSYS COM,"save" PRINT Time$;"Maintain connection deactivated" LOGEVENT "Online connection established. PPP IP address: " + A$, 101 ENDIF END