DUE: Problems with reading from Serial.

Thanks for your reply, AMPS-N.

I work with IDE v.1.5.4 (with RingBuffer set to 400) and IDE v.1.6.1. None of them works with this particular code, but other codes that do not include serial.available and serial.read works perfectly.