Compare incoming packet

he everyone, so i made a UDP connection between two Arduino,

and i want to control the LED in the Second Arduino From the First by Sending a letter 'O'

and make it off by Sending a letter 'F'

   Udp.read(packetBuffer, UDP_TX_PACKET_MAX_SIZE);
    Serial.println("Contents:");
   // if(strcmp(packetBuffer,"Crestron connect"==0)){
    
    if ( packetBuffer == 'O') {
      digitalWrite(LED, HIGH);
      Serial.println("ON");
    }
    else if ( packetBuffer == 'F') {
      digitalWrite(LED, LOW);
      Serial.println("OF");
    }
    Serial.println(packetBuffer);
  }

am I comparing the incoming chart the right way?
cuz it doesn't go inside the if

Please post the complete program.

...R

so i made a UDP connection between two Arduino,

Please understand Robin2's request for complete code to include the sender code as well as the receiver code?

What are the exact contents of packetBuffer? Are there any line endings?