3.2
IPRC Embedded Application Code
The following code sample shows how to initiate an IPRC session for RC mode. In
this case TCP listen is used so that the module acts as a server and waits for the
download application to initiate a TCP/IP connection on port 5001.
possible for the module to initiate the connection. Once a connection is established
the IPRC function is called to put the module into RC mode enabling remote
download to take place.
Note that IPRC will not work with UDP. Also, the script only displays its IP address
on the debug port. A proper script would have to include a way of communicating
the IP address to the remote end, via SMS, for instance.
int
socket;
RemoteMode ()
{
int
int
int
state = tcpa(socket, &port, &address);
/* Check to see if the socket is connected */
if
{
/* Setup
if
{
}
else
{
}
}
}
MyScript()
{
dlys
return
}
Gx64 APPLICATION NOTE
EA Remote Download
Page: 12/22
state;
port;
address;
(state == 0)
Remote Control mode */
(iprc
(1, socket) == 1)
prtf
("Entered RC mode, waiting for IP connection to end\r\n");
state =
ipstate
(socket) & 0x20;
while
(state != 0)
{
dlys
(1);
state = ipstate(socket) & 0x20;
}
prtf
("Exited RC mode.
rst
(0);
prtf
("Failed to enter RC mode\r\n");
(1);
(0);
This document is the sole and exclusive property of WAVECOM. Not to be distributed or divulged without prior written agreement.
Ce document est la propriété exclusive de WAVECOM. Il ne peut être communiqué ou divulgué à des tiers sans son autorisation préalable
Resetting module\r\n");
It is also
Need help?
Do you have a question about the GR64 and is the answer not in the manual?
Questions and answers