Safe changes in the Arduino Libraries and use them
I found the path to the files i want change in the github link so i can change the files(C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino).

I enable the uart for 9 bit, i add sbi(*_ucsrb, UCSZ12);  in HardwareSerial::begin

I decided that i only send a Flag to my PC when the 9th bit is set. For that i change the _rx_buffer to a 2 byte matrix (short _rx_buffer). Now i send the databyte in the low-byte and flags for 9 bit, framing error and overrun error in the high-byte. That i can do that i change the void HardwareSerial::_rx_complete_irq(void) code like the follow:

void HardwareSerial::_rx_complete_irq(void)
{
  if (bit_is_clear(*_ucsra, UPE0))
  {
    bool is_address = UCSR0B &amp; _BV(RXB80);
    bool is_framError = UCSR0A &amp; _BV(FE0);
    bool is_overError = UCSR0A &amp; _BV(DOR0);
    unsigned char c = *_udr;
    rx_buffer_index_t i = (unsigned int)(_rx_buffer_head + 1) % SERIAL_RX_BUFFER_SIZE;

    if (i != _rx_buffer_tail) 
    {
     _rx_buffer[_rx_buffer_head] = c;
     _rx_buffer[_rx_buffer_head] |= is_address &lt;&lt; 8;
     _rx_buffer[_rx_buffer_head] |= is_framError &lt;&lt; 9;
     _rx_buffer[_rx_buffer_head] |= is_overError &lt;&lt; 10;
     _rx_buffer_head = i;
    } 
  } 
  else {    *_udr;  };
}


I hope this will work and i can evaluate the data right at the PC.

Frindly wishes sniffi