###### Try This : Your Code Updated With Possible Fixes ######
After examining your code and comparing it to my working code I believe I have found a definitive answer. I'm altering your code so you can copy it and try it. I'll add comments where I've changed it.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(15, 14); // RX, TX
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
Serial.println("Enter AT commands:"); // a prompt in Serial Monitor
// Deleted while loop, unnecessary
// set the data rate for the SoftwareSerial port
// notice that your comment on previous line says SoftwareSerial port
// but you are setting the Serial3 port -- this is where we use mySerial
// Serial3.begin(38400); // commented your line of code
mySerial.begin(38400);
}
void loop() { // run over and over
//if (Serial3.available()) { // we don't use Serial3 any more
if (mySerial.available()) {
//Serial.write(Serial3.read());
Serial.write(mySerial.read());
}
if (Serial.available()) {
//Serial3.write(Serial.read());
mySerial.write(Serial.read());
}
}
I am confident that if you use this newly modified code it will solve your problem. I should've noticed this earlier.
Here's the rest of my original answer.
I have struggled with this myself. As a matter of fact it took me a few months of owning some HC-05s before I finally dug up an answer. It's been a while since I worked with it so I'll do my best to explain what to do.
