Serial to old reciever. Problem with the serial comunication

(more reading here)

It looks like that the PuTTY and Pioneer works on software handshaking via the XON (Transmit On) and XOFF Transmit OFF) signals. These messages are coded in ASCII as 17 (0x11 = DC1 for Data Control 1 = XON) and 19 (0x13 = DC3 for Data Control 3 = XOFF); these are asserted by the Pioneer; these messages are decoded by the PuTTY/Arduino.

Therefore, the Arduino Sketch has to check (by reading XON/XOFF data that is coming from Pioneer) if the Pioneer is ready to accept data to be sent from Arduino -- (Serial.println("44VL");.

The sample codes could be:

A: If using hardware UART Port for the Pioneer

void serialEvent()
{
   byte x = Serial.read();
   if(x == 0x11)   //Pioneer is ready to accept data
   {
       Serial.println("44VL");   //data going to Pioneer
   }

}

B: If using software UART Port for the Pioneer

void loop()
{
   if (mySerial.available()>0)
   {
      if(mySerial.read() == 0x11)   //Pioneer is ready to accept data
      {
         mySerial.println("44VL");    //data going to Pioneer
      }
   }
}