Connecting two Cortexes through UART

For a while now I have been messing around with the UART ports on the Vex Cortexes. Recently I have tried connecting two of them together to see if I could send and receive information. I started by using the code below on both of the Cortexes to send a char. Both would send and receive and I could check that by displaying to a LCD on the other UART port. Although I began to run into some issues rather quickly. When I would connect one into itself (Attaching the TX wire directly to the RX wire) I got a good reading. It would count up as it was supposed to. When I would connect the two Cortexes together this was not the case. I would only read zero on both of them. So I thought this had something to do with the timings, so I removed the wait1msec on one of the Cortexes and something strange happened. When I looked at the LCD with the one without the timings it would display numbers rapidly changing, however when I looked at the one with the timings it just showed me a zero. I have tried to look for a better understanding of how the “sendchar” and “receivechar” commands work but I do not get a clear answer. What I am wondering is if sendchar/receivechar waits for it to get a response, like a handshake, before continuing with the rest of the program. Any help would be appreciated! Thanks!

Here is the Code:

#pragma config(UART_Usage, UART1, uartUserControl, baudRate115200, IOPins, None, None)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//



task UARTReceive(){

	int rcvChar;

	while(true){
		rcvChar = getChar(uartOne);
		if(rcvChar == -1){
			wait1Msec(3);
			continue;
		}

		clearLCDLine(0);
		clearLCDLine(1);
		displayLCDNumber(0, 0, rcvChar);
		wait1Msec(1000); //Timings I have been messing around with
	}
}





task main()
{


	long nTotalXmitChars = 0;
	unsigned char xmitChar;

	startTask(UARTReceive);


	while(true){
		++nTotalXmitChars;
		xmitChar = nTotalXmitChars % 256;
		sendChar(uartOne, xmitChar);
		while(!bXmitComplete(uartOne)){
			wait1Msec(1);
		}


		motor[6] = -127;
		motor[7] = -127;
		motor[8] = -127;
		wait1Msec(1000); //Timings I have been messing around with
	}

}

Remove the continue statement in UARTReceive

I took out the continue statement and It still displayed 0 except now it sometime flashes -1

edit: After sometime leaving it running it seems to be jumping between numbers. It seems to be random which numbers it hits but it goes through multiple numbers not just 0 and -1. Do I need some sort of handshake to sync them up?

you may be interested in this.
https://vexforum.com/t/communicating-between-two-cortex-dual-cortex-robot/24236/1

Thank you. I think that will help a lot.