Raspberry Pi Serial Arduino not working

I hav an Arduino connected via serial to a Raspberry PI running of084. The Raspi send an byte to the arduino and the arduino should send two byte arrays back. It was working on Mac->Arduino but not on the Raspberry PI.
I started again with an example to figure out what is not working but i didn’t receive any data. The Serial Connection on Raspberry pi is established.

Here is the of code:
void ofApp::updateSerial()
{
//arduinoControl[1] = 0;//intValues[5];
serial.writeByte(1);
// we want to read 8 bytes
int bytesRequired = 11;
unsigned char bytes[bytesRequired];
int bytesRemaining = bytesRequired;
// loop until we’ve read everything
while ( bytesRemaining > 0 )
{
// check for data
if ( serial.available() > 0 )
{
// try to read - note offset into the bytes[] array, this is so
// that we don’t overwrite the bytes we already have
int bytesArrayOffset = bytesRequired - bytesRemaining;
int result = serial.readBytes( &bytes[bytesArrayOffset],
bytesRemaining );

    // check for error code
        if ( result == OF_SERIAL_ERROR )
        {
            // something bad happened
            ofLog( OF_LOG_ERROR, "unrecoverable error reading from serial" );
            // bail out
            break;
        }
        else if ( result == OF_SERIAL_NO_DATA )
        {
            // nothing was read, try again
        }
        else
        {
            // we read some data!
            bytesRemaining -= result;
        }
    }
}
cout << "byte0 " << bytes[0] << "byte1 " << bytes[1] << "byte5 " << bytes[5] << "byte9 " << bytes[9] << endl;

}

And here is the Arduino Code
int motorPin = 10; // LED connected to digital pin 9
int motorSpeed = 0;
int aPins[6] = {A0,A1,A2,A3,A4,A5}; //analog input pins - potis und motor
byte aValues[6] = {0,0,0,0,0,0};
int dPins[5] = {3,4,5,6,7}; //digital button pins
byte dValues[5] = {0,0,0,0,0};
boolean b;

void setup()
{
Serial.begin(9600);
for(int i = 0;i < 5;i++)
{
pinMode(dPins[i], INPUT); // sets the digital pins as input
}
b = false;
Serial.flush();
// pinMode(motorPin, OUTPUT); // sets the pin as output
pinMode(13, OUTPUT); // sets the pin as output
}

void loop()
{
readAnalogSensors();
readDigitalSensors();
if (Serial.available() > 0)
{
motorSpeed = Serial.read();
if(b)
{
digitalWrite(13,HIGH);
b = false;
}
else
{
digitalWrite(13,LOW);
b = true;
}
printValues();
}
analogWrite(motorPin,motorSpeed);
// Serial.flush();
}

void readAnalogSensors()
{
for(int i = 0;i < 6;i++)
{
aValues[i] = 128 + i;//analogRead(aPins[i]) / 4;
}
}

void readDigitalSensors()
{
for(int i = 0;i < 5;i++)
{
dValues[i] = i;//digitalRead(dPins[i]);
}
}

void printValues()
{
Serial.write(dValues,5);
Serial.write(aValues,6);
}

Ok i am one step further. I figured out that if i start minicom on the pi via ssh and then start the of app everything works fine like expected. Anybody a suggestion why?