LoRa timeout with multiple transmissions

Im working on a project that has two Heltec LoRa ESP32 boards that can both send and receive commands. I created multiple test sketches that successfully sent commands to the other board to change variables complete different tasks. However when I implemented this sketch I stop receiving LoRa messages and am unable to send anymore commands.

This is the command sketch for one of the boards
It's purpose is to send commands to the other board to dictate its function and receive verification messages back


#include "heltec.h"

#define BAND    915E6  //you can set band here directly,e.g. 868E6,915E6

String command;
String rc = "";
String deviceType = "GRDSEN1";
String id = "A000001";
String key = "sfd32f2nn25dsa8";
String identification = String(deviceType) + "," + String(id) + "," + String(key);
void setup() {
  //WIFI Kit series V1 not support Vext control
  Heltec.begin(true /*DisplayEnable Enable*/, true /*Heltec.LoRa Disable*/, true /*Serial Enable*/, true /*PABOOST Enable*/, BAND /*long BAND*/);
  Serial.begin(115200);


}

void loop() {
  // try to parse packet
  rc = LoRa.readString();
  int packetSize = LoRa.parsePacket();
  if (packetSize) {
    // received a packet
    Serial.println(rc);
    // read packet


  }

  sendsensitivity();
}

void sendsensitivity()
{
  while (Serial.available()) {
    command = Serial.readStringUntil('\n');
    command.trim();
    if (command.equals("login")) {
      LoRa.beginPacket();
      LoRa.setTxPower(20, RF_PACONFIG_PASELECT_PABOOST);
      LoRa.print(identification);
      LoRa.endPacket();
    }

    else if (command.equals("Pair")) {
      LoRa.beginPacket();
      LoRa.setTxPower(20, RF_PACONFIG_PASELECT_PABOOST);
      LoRa.print("Pair");
      LoRa.endPacket();
    }
    else if (command.equals("Power Saver")) {
      LoRa.beginPacket();
      LoRa.setTxPower(20, RF_PACONFIG_PASELECT_PABOOST);
      LoRa.print("Power Saver");
      LoRa.endPacket();
    }
    else if (command.equals("Sleep")) {
      LoRa.beginPacket();
      LoRa.setTxPower(20, RF_PACONFIG_PASELECT_PABOOST);
      LoRa.print("Sleep");
      LoRa.endPacket();
    }
    else if (command.equals("Default")) {
      LoRa.beginPacket();
      LoRa.setTxPower(20, RF_PACONFIG_PASELECT_PABOOST);
      LoRa.print("Default");
      LoRa.endPacket();
    }
    else if (command.equals("Disconnect")) {
      LoRa.beginPacket();
      LoRa.setTxPower(20, RF_PACONFIG_PASELECT_PABOOST);
      LoRa.print("Disconnect");
      LoRa.endPacket();
    }
    else {
      Serial.println("bad command");
    }
    Serial.print("Command: ");
    Serial.println(command);
  }
}

This is the computing sketch
*It's function is to run different equations depending on the command sent and then send verification messages to the command board *

#include "heltec.h"

#define BAND 915E6

char identification[] = "";
char deviceTypeHud[40] = "";
char deviceIdHud[40] = "";
char encryptionHud[256] = "";
String rc = "";
String hudCommand = "";
String deviceType = "GRDSEN1";
String id = "A000001";
boolean IDstatus = false;
boolean PAIRINGstatus = false;
boolean PAIRstatus = false;
String newDevice;
String newid;
String key;
String deviceIdentification = String(deviceType) + "," + String(id);

void setup()
{
  Heltec.begin(false /*DisplayEnable Enable*/, true /*Heltec.LoRa Disable*/, true /*Serial Enable*/, true /*PABOOST Enable*/, BAND /*long BAND*/);
  Serial.begin(115200);

  
}


void loop()
{
  newDevice = deviceTypeHud;
  newid = deviceIdHud;
  key = encryptionHud;
  rc = LoRa.readString();
  int message_len = rc.length() + 1;
  rc.toCharArray(identification, message_len);
  int packetSize = LoRa.parsePacket();
  if (packetSize) {
    sscanf( identification, "%7[^,],%7[^,],%15[^,]", deviceTypeHud, deviceIdHud, encryptionHud);
    Serial.println("getting device info");
    if ((newDevice = deviceType) and (newid= id)) {
      LoRa.beginPacket();//////////////////////////////////////////////////////////////////////////////////////////////1
      LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
      LoRa.print(deviceIdentification);
      LoRa.endPacket();
      Serial.println("info match success");
      IDstatus = true;
      if (IDstatus = true) {
        LoRa.beginPacket();////////////////////////////////////////////////////////////////////////////////////////////2
        LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
        LoRa.print("Ready to Pair");
        LoRa.endPacket();
        Serial.println("pairing......");
        PAIRINGstatus = true;
        if (PAIRINGstatus = true) {
          LoRa.beginPacket();///////////////////////////////////////////////////////////////////////////////////////////3
          LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
          LoRa.print("Enter: Pair");
          LoRa.endPacket();
          Serial.println("Waiting for user");
          if (hudCommand.equals("Pair")) {
            LoRa.beginPacket();/////////////////////////////////////////////////////////////////////////////////////////4
            LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
            LoRa.print("Device Paired");
            LoRa.endPacket();
            Serial.println("PAIRED");
            String encryptKey = encryptionHud;
            PAIRstatus = true;
            if (PAIRstatus = true) {
              //USE ENCRYPTION//////////////////////////////////////////////////////////////////////////////////////////5
              //REPLACE WITH ACTUAL PROGRAM
              String title1 = "normal program: ";
              String problem1 = "1 X 1= ";
              int answer1 = 1;
              String status = "default";
              LoRa.beginPacket();
              LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
              LoRa.println(title1);
              LoRa.print(problem1);
              LoRa.println(answer1);
              LoRa.println(status);
              LoRa.println("");
              LoRa.endPacket();
              Serial.println("Default Program running");
              Serial.println("");
              Serial.println("");
            } else if (hudCommand.equals("Default")) {
              //USE ENCRYPTION////////////////////////////////////////////////////////////////////////////////////////5a
              hudCommand = LoRa.readStringUntil('\n');
              //REPLACE WITH SAME PROGRAM USED AS DEFAULT
              String title2 = "Default program: ";
              String problem2 = "1 X 1= ";
              int answer2 = 1;
              String status = "default";
              LoRa.beginPacket();
              LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
              LoRa.println(title2);
              LoRa.print(problem2);
              LoRa.println(answer2);
              LoRa.println(status);
              LoRa.println("");
              LoRa.endPacket();
              Serial.println("USER: Default Program running");
              Serial.println("");
              Serial.println("");
            } else if (hudCommand.equals("Power Saver")) {
              //USE ENCRYPTION////////////////////////////////////////////////////////////////////////////////////////5b
              hudCommand = LoRa.readStringUntil('\n');
              //REPLACE WITH POWER SAVER PROGRAM
              String title3 = "Power Saver program: ";
              String problem3 = "2 X 2= ";
              int answer3 = 4;
              String status = "pwrsave";
              LoRa.beginPacket();
              LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
              LoRa.println(title3);
              LoRa.print(problem3);
              LoRa.println(answer3);
              LoRa.println(status);
              LoRa.println("");
              LoRa.endPacket();
              Serial.println("USER: Power Save Program running");
              Serial.println("");
              Serial.println("");
            } else if (hudCommand.equals("Sleep")) {
              //USE ENCRYPTION////////////////////////////////////////////////////////////////////////////////////////5c
              //REPLACE WITH SLEEP PROGRAM
              String title4 = "Sleep program: ";
              String problem4 = "3 X 3= ";
              int answer4 = 9;
              String status = "sleep";
              LoRa.beginPacket();
              LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
              LoRa.println(title4);
              LoRa.print(problem4);
              LoRa.println(answer4);
              LoRa.println(status);
              LoRa.println("");
              LoRa.endPacket();
              Serial.println("USER: Sleep Program running");
              Serial.println("");
              Serial.println("");

            }

          } else if (hudCommand.equals("Disconnect")) {
            LoRa.beginPacket();////////////////////////////////////////////////////////////////////////////////////4a
            LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
            LoRa.println("Device Disconnected");
            LoRa.println("");
            LoRa.endPacket();
            Serial.println("");
            Serial.println("Device Disconnected");
            Serial.println("");
            String encryptKey = "0";
          }
        } else {
          LoRa.beginPacket();//////////////////////////////////////////////////////////////////////////////////////3a
          LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
          LoRa.println("Device Failed to Pair");
          LoRa.println("");
          LoRa.endPacket();
          Serial.println("");
          Serial.println("");
          Serial.println("##########################");
          Serial.println("### DEVICE PAIR FAILED ###");
          Serial.println("##########################");
          Serial.println("");
          Serial.println("");
        }

      } else {
        LoRa.beginPacket();///////////////////////////////////////////////////////////////////////////////////////2a
        LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
        LoRa.println("Device Unable to Pair");
        LoRa.println("");
        LoRa.endPacket();
        Serial.println("");
        Serial.println("");
        Serial.println("##########################");
        Serial.println("### DEVICE CAN'T PAIR  ###");
        Serial.println("##########################");
        Serial.println("");
        Serial.println("");
      }

    } else {
      LoRa.beginPacket();//////////////////////////////////////////////////////////////////////////////////////1a
      LoRa.setTxPower(17, RF_PACONFIG_PASELECT_PABOOST);
      LoRa.println("Incorrect Device Type or Device ID");
      LoRa.println("");
      LoRa.endPacket();
      Serial.println("");
      Serial.println("");
      Serial.println("##############################");
      Serial.println("### INCORRECT DEVICE OR ID ###");
      Serial.println("##############################");
      Serial.println("");
      Serial.println("");
    }

  }

}


I am getting empty lines when I am supposed to be getting verification messages and then both boards stop receiving and sending data. my serial out put on two different occasions below ( I have the command boards connected to my laptop and the computing board on my desktop, The top image is the computing/desktop and the bottom is the command/laptop)


I have already ran separate test sketches eliminating some of the unnecessary features to try and isolate the issue but I cant seem to figure out the exact problem. After doing some research i'm thinking the boards are timing out or i'm just doing too much with the if and else if statements. Can anyone help me out or point me in the right direction? Thank you.