Regd : HC05 Bluetooth data reading issue low byte data in Mobile app

Hi guys .,
I am getting a weird issue here ., lot confusing me ., I am writing (Serial.write) data of 115200 bps to HC05 Bluetooth module ., which i connected in the Serial3 of Arduino DUE board .,

data is like this

when i send {a} the Bluetooth has to send me 7 byte data ( comes only once no continuous )

when i send {c} the bluetooth has to send me 29 bytes data ( long data streaming continuous ) until i send {g} to STOP the data sending .

i download the blue tooth reading app TerminalBT from play store and sending commands ., The high bytes data i could see in my terminalBT as ASCII values ., but low byte count data i am not able to see in my terminalBT window .,

I downloaded many Bluetooth readers to verify this all the same .,

Another issue is in high speed data what i get i am not getting first byte in my buffer i am simply sending as char data ., is it i need to use CTS ,RTS with my program to sync the data sending to bluetooth socket ? .

the same data i am writing to SerialUSB native port in parallel i get all data properly with first byte is sitting in first array buffer .

Please advice if i missed out any thing here .

Sending Low byte data write

void send_data(char a)
{

  SerialUSB.write(a);
  
  Serial3.write(a);
  
  
}

Code at sending high byte data write

                 SerialUSB.write(temp,28);   
                
                 
                 Serial3.write(temp,28);

Good luck over at http://snippets-r-us.com

:confused: sorry

void data_read()
{
  
  while (SerialUSB.available()>0)
  {
    delay(10);  //small delay to allow input buffer to fill
    char c  = SerialUSB.read();  //gets one byte from serial buffer
    readString += c;
  }

  while (Serial3.available()>0)
  {
    delay(10);  //small delay to allow input buffer to fill
    char c  = Serial3.read();  //gets one byte from serial buffer
    readString += c;
  }
}

Sending data of low data rate

void send_NOS()
{
  send_data(HEADER);
  send_data(NOS);
  send_data(UC_8_clevel);
  send_data(UC_8_Rlevel);
  send_data(UC_8_Error_NOS);
  send_data( UC_8_checksum_NOS);
  send_data(FOOTER);
}
  while (SerialUSB.available()>0)
  {
    delay(10);  //small delay to allow input buffer to fill
    char c  = SerialUSB.read();  //gets one byte from serial buffer
    readString += c;
  }

The SerialUSB object is a bit of a misnomer. It is NOT using Serial at all. The delay() is absolutely pointless. YOU need to collect the data as it becomes available, and store it until the end of the packet, not guesswork, defines that a complete packet has been received.

Neither of your snippets would compile. That means that you are on your own to solve the problem.