Issues With hm-10 Bluetooth Module Inquiry Scan Output

I’m using a hm-10 Bluetooth module with my Arduino uno, and i’m simply trying to scan for surrounding Bluetooth devices until the end of life(Both master and slave mode).

Ideally, I want to scan and output all the ID’s within range of the device.

Any help here? I have tried a fair number of solutions but nothing seems to work.

#include <SoftwareSerial.h>
#define BT_RX 2 // TX
#define BT_TX 3 // RX

SoftwareSerial mySerial(BT_RX,BT_TX);
String myString="";

void setup(){
Serial.begin(9600);
mySerial.begin(9600);
}

void loop(){
mySerial.write(“AT+DISC?”);
delay(7500);

while (mySerial.available()){
char myChar = (char)mySerial.read();
myString+=myChar;
delay(5);
}
if (myString!="") {
//3415131F
Serial.println(“input value :” +myString);
myString="";
}
}