Specifications
AN93
214 Rev. 0.9
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
AssertRTS(true); //RTS=1 for transmitting
Delay(300); //Delay to allow the line
to turn around
// Alternatively use USE CTS
iLength = strlen(caUA_PKT_STR);
WriteFile(hCom, caUA_PKT_STR, iLength, &ulNoOfbytes, 0); // Tx UA messge
Delay(100);
while(1) // Short training happens now!
{
AssertRTS(false); printf("RTS=0 Rx "); //RTS=0 for receiving
cpInputRd=WaitForResponse(caRX_PKT_STR,cpInputRd,3000);//Rx RR message
iLength = strlen(cpInput_test);
for (int i=0; i<iLength; i++)