RPi to Arduino thru rs485 not receiving all characters

I do not understand why Serial.flush() did not work. Assuming your using Arduino IDE > 1.0 then it should block until the last byte in the Serial write buffer is sent.

Glad you have the problem licked though.