How best read multiple lines of text as a response over serial?

I’m sending AT commands over a SoftwareSerial connection and when the AT command is successful, the module issues the following as a response:


I know this from a serial monitor tool such as TeraTerm/Hterm.

My current sketch usually produces a load of garbage in the response. I know the baud rates are set correctly though. A good example of what I can capture and print to the Arduino IDE looks like this, and is not the entire response:


And at worst, something like this:


I can’t control what the response format is and from looking at the Serial Basics tutorial, I could use “{” and “}” as start and end markers, but they appear three times over the full response.

I have tried with AltSoftSerial because I read that it’s better than SoftwareSerial, but I get no response at all using that, in fact the module I’m sending the AT commands to does not receive them.

I think I need to use a loop to iterate through each line and look for the braces, but I am struggling with the best way to capture the entire response before parsing it. Any help would be greatly appreciated.

The code:

#include <SoftwareSerial.h>
SoftwareSerial mySerial(8, 9);

void setup() {
#define NL ("\r\n")
  Serial.println("Starting serial monitor at 115200...");

void loop() {
  int BUF = 255;
  char cov[BUF];
  int objID = 3;
  int propID = 0;
  int i = 0;
  int j = 0;
  String rc;

  for (i = 0; i < 6; i++) {

    memset(cov, 0x00, BUF);
    sprintf(cov, "AT+BCOV=%d,%d,%d%s", objID, propID, j, "\r\n");
    Serial.print("Counter: "); Serial.println(i);
    Serial.print("Sending COV message to node: "); Serial.println(cov);
    //toggle j from 0 > 1
    if (j == 0) {
      j = 1;
    } else if (j == 1) {
      j = 0;

    while (mySerial.available() > 0) {
      rc = mySerial.readString();
      Serial.print("Received: "); Serial.println(rc);

Does software serial go anywhere near 115200?

From the AltSoftSerial description:

"Without other libraries, on Teensy or Arduino (with the issue 776 fix), interrupt latency is about 3 to 4 µs. 115200 baud is possible."

Quick edit - my board is an UNO.