PROBLEM RESOLVED: Struggling to read serial data out of serial RX buffer

(made progress with one suggestion from this forum; problem still persists... on to Round 2)

SYNOPSIS
O'scope shows 5-byte TTL signal going into pin 19 of Mega2560. (Full sketch shown below) but some relevant snippets from sketch are:
SoftwareSerial upLink(19,18);
upLink.begin(9600);
(the sketch then sends commands out pin 18, connected device responds, sends response to pin 19)
if (upLink.available() > 0)
The sketch never enters the if loop -- why does the "if" test not detect the 5 bytes coming into pin 19?

OVERVIEW and BACKGROUND
I am an amateur radio operator, using the Arduino to enhance morse code satellite communications. The purpose of this project is to control and adapt the radio's frequency to compensate for Doppler frequency shift due to the satellites changing relative velocity. Prior to requesting help I've done considerable reading, but am stymied -- turning to this forum for help, please.

CONFIGURATION DETAILS
An Arduino Mega2560 communicates with a Yaesu FT-817nd radio transceiver. Eventually two different radios will be used, so I choose the Mega2560 (as it has multiple serial ports). An RS232-to-TTL converter is used between the Arduino and radio. Only 5 bytes are transferred between Arduino and radio, and vice versa, when they communicate. A 200 MHz dual trace 1-m-ohm scope is used to monitor both RX and TX serial communication lines. Scope screenshot is attached to this post. The radio asks for two stop bits; the Arduino supplies only one stop bit -- but other people have used Arduino to control this radio successfully with only one stop bit. (I've examined some of their code and haven't uncovered the source of my problem. Others' code is sgnificantly personalized to their application, so i hasn't been possible for me to run it as-is.)

SUCCESS
a) Able to send control commands to radio and control different aspects of the radio. For example, I can change the frequency, lock/unlock the front panel.
b) Sent interrogation command to radio, and able to see the radio respond (oscilloscope trace attached). The top trace is the TX sent to the radio; the bottom trace is the RX signal coming back from the radio. I've examined the contents of both signals and verified they are correct. The radio responds promptly, within about 1 msec.

FAILURE MODE
a) I can see a five-byte TTL signal entering the Arduino RX pin 19. (See the bottom trace on the o'scope.)
b) Using the code below nothing is printed to the serial monitor, indicating the receive buffer is empty.
c) With another version of code, I did print out what was attempted to be read out of the serial buffer, and read only multiples of "255".

Any constructive feedback is very welcome. Thank you.

#include <Arduino.h>
#include <SoftwareSerial.h> 

SoftwareSerial upLink(19,18);    //RX, TX create an instance of a SoftwareSerial object

////////////////////////  SETUP  /////////////////////////////////////////////////////
void setup()              
  {                     
  Serial.begin(9600);   // used for printing information to the serial monitor screen
  upLink.begin(9600);   // start serial port which was previously defined on pins 19(RX), 18(TX)
                        // at baud rate 9600, call it "upLink"
  }

////////////////////////  LOOP  /////////////////////////////////////////////////////
void loop() 
{
  delay(500);


//=============================================================================
// ========== COMMAND TO UPLINK RADIO TO REPORT FREQUENCY =====================
byte cmdReportFreq[5] = {0x00,0x00,0x00,0x00,0x03};     // 5-byte command to radio to report frequency
    int j = 0;
    while (j<5)
      {
      upLink.write(cmdReportFreq[j]); // VERIFIED on o'scope:  all five bytes get sent
                                      // 5.170 msec, see response coming back on o'scope
      j++;
      }

//=============================================================================
// ========== READ UPLINK FREQUENCY OUT OF RX BUFFER ==========================

   upLink.listen();                 // prepare to listen to the upLink serial RX pin
                                    // Arduino can listen to only ONE software serial port at a time
                                    // discards data from other instances that were listening

  int incomingByte = 0;             // to store incoming serial data
  delay(10);                        // wait 10 msec for radio to respond
                                    // measured response time from radio:  approx 1 msec

  if (upLink.available() > 0) 
  {
    incomingByte = Serial.read();   // read the incoming byte:
    
    Serial.print("Arduino received this byte from radio: ");   // say what you got
    Serial.println(incomingByte, DEC);                         // print out byte as decimal number
  }    
}

SatelliteComs:

    incomingByte = Serial.read();   // read the incoming byte:

You're reading from the hardware serial Serial object here. You should read from the SoftwareSerial object upLink instead:

    incomingByte = upLink .read();   // read the incoming byte:

Thank you for the prompt response. I incorporated the correction, but unfortunately that did not solve the problem. I can still see bytes incoming to pin 19 on the o'scope, but the code never enters the IF loop; the serial monitor screen is completely blank -- nothing written to it.

if (upLink.available() > 0)

Additional suggestions would be most welcome; thank you.

#include <Arduino.h>
#include <SoftwareSerial.h> 

SoftwareSerial upLink(19,18);    //RX, TX create an instance of a SoftwareSerial object

////////////////////////  SETUP  /////////////////////////////////////////////////////
void setup()              
  {                     
  Serial.begin(9600);   // used for printing information to the serial monitor screen
  upLink.begin(9600);   // start serial port which was previously defined on pins 19(RX), 18(TX)
                        // at baud rate 9600, call it "upLink"
  }

////////////////////////  LOOP  /////////////////////////////////////////////////////
void loop() 
{
  delay(500);

//=============================================================================
// ========== COMMAND TO UPLINK RADIO TO REPORT FREQUENCY =====================
byte cmdReportFreq[5] = {0x00,0x00,0x00,0x00,0x03};     // 5-byte command to radio to report frequency
    int j = 0;
    while (j<5)
      {
      upLink.write(cmdReportFreq[j]); // VERIFIED on o'scope:  all five bytes get sent
                                      // 5.170 msec, see response coming back on o'scope
      j++;
      }

//=============================================================================
// ========== READ UPLINK FREQUENCY OUT OF RX BUFFER ==========================

   upLink.listen();                 // prepare to listen to the upLink serial RX pin
                                    // Arduino can listen to only ONE software serial port at a time
                                    // discards data from other instances that were listening

  int incomingByte = 0;             // to store incoming serial data
  delay(10);                        // wait 10 msec for radio to respond
                                    // measured response time from radio:  approx 1 msec

  if (upLink.available() > 0) 
  {
    incomingByte = upLink.read();   // read the incoming byte  
                                    // 5-23-19 Arduino forum: corrected from "serial.read()"    
    Serial.println("Arduino received this byte from radio: ");   // say what you got
    Serial.print(incomingByte, DEC);                         // print out byte as decimal number
  }
}

A mega has 4 serial ports; based on your code you don't need SoftwareSerial but can use e.g. Serial1 or Serial2 or Serial3; just check which pins you need to use.

Hello Sterretje,

THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I can now see the path forward to completing this cool project. I appreciate your prompt response so much -- I've been banging my head against this one. These Arduino's are fun to learn!

Oh and you probably can't use your upLink because Arduino's software serial pins are limited.

Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).

This is a quote from the following site:

https://www.arduino.cc/en/Reference/SoftwareSerial

Where your upLink tries to define RX and TX on 18 and 19th pins, it's pretty much impossible using the SoftwareSerial library.