A n 9 3 – Silicon Laboratories SI2493/57/34/15/04 User Manual
Page 264

A N 9 3
264
Rev. 1.3
// ,,8 enables synch access on answering a connect
cpInputRd = SendAndWaitFor("AT+ES=6,,8\r", cpInputRd, "OK\r\n", 300);
// AT+ESA=0,0,0,,1 synch access mode control
// 0,,,, modem transmits SYN if underrun during transparent mode
// ,0... modem tx's flags after underrun after flag happens in framed sub mode
// ,,0,, modem tx's abort on underrun in frame middle during framed sub mode
// ,,,,1 enables CRC generation and checking
cpInputRd = SendAndWaitFor("AT+ESA=0,0,0,,1\r", cpInputRd, "OK\r\n", 300);
// "AT:U87,010A Synch access mode config
// 0x0400 bit 10 Minimal transparency
// 0x0100 bit 8 Upon connection immediately enter framed sub mode
// 0x000A bits 3:0 Wait for 10 bytes before starting xmission.
cpInputRd = SendAndWaitFor("AT:U87,050A\r", cpInputRd, "OK\r\n", 300);
// :U7A,1 Fast connect
cpInputRd = SendAndWaitFor("AT:U7A,1\r", cpInputRd, "OK\r\n", 300);
AssertRTS(false);
if ((hpTelNoFile = fopen(fnameTelno, "rb")) == NULL)
{
fprintf(stderr, "The Tel. Number File is missing.\n");
exit(1);
}
char caOutGoing[256];
bool bValidLine = GetFileTextLine(caOutGoing);
printf("Phone Number: %s\n",caOutGoing);
if(bValidLine)
cpInputRd = SendAndWaitFor(caOutGoing, cpInputRd, "CONNECT\r\n", 120000);
else
{
fprintf(stderr, "The Tel. Number File is incorrect.\n");
exit(1);
}
int iLength;
iCharCount = 0; //reset the total chars to 0 for data mode.
// Skip waiting for the speed packet.
// cpInputRd = WaitForResponse("\0x19\0xbe\0x24\0x24\0x19\0xb1", cpInputRd, 6000); // ???
// Long training happens now!
cpInputRd = WaitForResponse(caSNRM_PKT_STR, cpInputRd, 6000);
Delay(50); //Delay to allow the line to turn around