Remote script download using RC intrinsic function
3.3 Embedded Application Code
The following code sample (using Sony Ericsson's M2mpower help file)
can be used to set-up the RC functionality within a script.
/* This example shows how simple Over the Air Download can work
using the RC function. */
int
Rslt;
RemoteMode ()
{
int
st = 0;
int
first;
int
num;
int
cnt;
st = 0;
cnt = 0;
chcrt
(1);
prtf("\nRemote
/* auto answer on data channel */
chw
(1, "ATS0=1\n\r", 8);
/* wait for data mode */
st = 0;
first = 1;
while
(st == 0 && cnt < 60)
{
/* check status of call every second */
dlys
cnt++;
st =
/* check for DCD */
st = st & 0x02;
}
/* setup
while
(st != 0)
{
if
(first == 1)
{
}
LZT 123 7799 R1B
Mode\n");
(1);
chsts
(1);
remote control */
st =
rc
(1);
prtf
("rc status NUMBER 1 =
first = 0;
%d\n", st);
9