Read one or a few bytes -from external device through Pin 0 (RX)

(Beginner)
Using an UNO R3 (pin DO) to read the Serial output an RF remote control- receiver with a UART output.
Each RF button can be configured to send 1 specific byte.
I'm trying to determine if there are any leading or trailing bytes - my target is to configure the remote to output only the single byte I associate with the remote control button.
I'm using the attached sketch, which I quickly modified from Robin2's Serial tutorial.
Regardless of what number I enter into the Remote I only ever measure the HEX value of "31" (as displayed in CoolTerm). Whether I enter 1, 0, 5 or 244 etc.)
IS there something in the attached code that is causing this?
Will this Sketch capture up to 32 bytes?
Thanks.
Vincent

// Example 1 modVH - Receiving bytes

const byte numBytes = 32;
byte receivedBytes[numBytes];
byte numReceived = 0;

boolean newData = false;

void setup() {
    Serial.begin(9600);
//    Serial.print();
}

void loop() {
    recvOneChar();
    showNewData();
}

void recvOneChar() {
    if (Serial.available() > 0) {
        receivedBytes[32] = Serial.read();
        newData = true;
    }
}

void showNewData() {
    if (newData == true) {
//        Serial.print();
        Serial.print(receivedBytes[32]);
        newData = false;
    }
}

It can be problematic to have a device connected to hardware serial and try to use serial monitor at the same time. Better to use a software serial port for the other device.

Here is a sketch that will read everything coming from the remote. Once that we can see what is coming from the remote we can see how to separate the information that you want. It uses a software serial port to receive from the remote. The sketch is set up for the remote TX to go to pin 4 (soft serial RX).

#include <SoftwareSerial.h>

SoftwareSerial mySerial(4, -1);  // no TX so -1, won't use up a pin

void setup()
{
   Serial.begin(9600);
   Serial.println("ready\n\n");
   mySerial.begin(9600);
}

void loop()
{
  if (mySerial.available()) {
    Serial.write(char(mySerial.read()));
  }
}

Thankyou groundFungus, for the advice and sketch.
With your code it displays the hex value "FF" for each button push. So it seems that there are no supporting bytes sent.
I now have a hint of what to look for in the remote configuration

Are you sure of the baud rate of the sender? Software serial will receive (uaually) up to and including 38400. A baud rate faster than that will need hardware seial.

What do you receive if you change:

Serial.write(char(mySerial.read()));

To:

Serial.print(mySerial.read(), HEX);

That will show any non printable characters like linefeed or carriage return. Please post the serial monitor output.

Each of the following "FF" are from 1 of 6 buttons, each pressed once, one after the other. So I imagine this confirms that there are no non-printable characters (or possibly, one non printing character and no data).

"ready

FFFFFFFFFFFF"

Now I know how to print HEX to the built in serial monitor.
Thanks

Do you have a make/model number of the receiver and/or a link to the datasheet for it?

NCD KFX

As NCD support has pointed out, my application is out of the product's scope (it's designed for use with specific NCD products).
But if I can get it to work it has a number of advantages - easy to associate one (or more) bytes with a specific RC button as well as software RF noise rejection.
There is not much in the way of specs.

I don't see a reason (yet) why it won't work. Have you run the KFX Key Fob Receiver configuration utility?

Can you show the screen for yours (similar to this:)

Thanks for your help and interest.
Found the issue to be related to baud rate mismatch (hidden).