arduino mega2560 and bluetooth module hc 06

i want to use arduino mega 2560 and bluetooth module hc 06. i connected
hc o6 5v->arduino 5v pin
gnd-> arduino gnd pin
rx-> arduino tx3(14) pin
tx-> arudino rx3(15) pin
and i programmed like this.

#include <SoftwareSerial.h>

SoftwareSerial BTSerial(14, 15);   //bluetooth module Tx:Digital 2 Rx:Digital 3

void setup() {
    Serial.begin(9600);
  BTSerial.begin(38400);
  Serial.println("ATcommand");  //ATcommand Start
}

void loop() {
  if (BTSerial.available())
    Serial.write(BTSerial.read());
  if (Serial.available())
    BTSerial.write(Serial.read());
}

and i see Serial monitor and enter the AT and AT+ROLE=S
BUT NOTHING IN SERIAL MONITOR and HC06 doesn't work as slave
please help me

Arduino Mega2560 with 4 (in words: four) hardware serial interfaces and you use that horrendously crippled SoftwareSerial?

Most serial devices are not tolerant enough to compensate the timing errors SoftwareSerial applies above approx. 9600 baud.

then what method should i use? i don't know arduino mega 2560 well. help me please

then what method should i use?

The labels next to the pins give you a clue. Use Serail3 to read from/write to the RX3 and TX3 pins.

Try it with this.

void setup() {
  Serial.begin(9600);
  Serial1.begin(38400);
  Serial.println("ATcommand");  //ATcommand Start
}

void loop() {
  if (Serial1.available())
    Serial.write(Serial1.read());
  if (Serial.available())
    Serial1.write(Serial.read());
}

You have to connect your BT module to pin 18/19.

Remember this is just a forwarder sketch, it doesn't do anything itself. You should think about increasing the baud rate of the serial connection to the PC to the same value you use on the bluetooth.