Arduino connection with bluetooth hc-06

Hello people

I have a little problem. I need to connect the Arduino Mini Pro with an HC-06 Bluetooth.

input/outputs: Arduino HC-06

GND ------------------ G(GND)

VCC --------------------- V

D0(TX)-----------------2

D1(RX) -----------------3

I tried this code:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3); // RX, TX

void setup()
{
Serial.begin(9600);
Serial.println("Goodnight moon!");
//mySerial.begin(115200);    //if you change the baud and want to re-run this sketch, make sure this baud rate matches the new rate.
mySerial.begin(38400);
//mySerial.begin(9600);


delay(1000);
mySerial.print("AT");
delay(1000);
mySerial.print("AT+VERSION");
//delay(1000);
//mySerial.print("AT+PIN1234"); // Set pin to 1234  was 1342
//delay(1000);
//mySerial.print("AT+NAMEJY-MCU-HC06"); // Set the name to JY-MCU-HC06
delay(1000);
//mySerial.print("AT+BAUD8"); // Set baudrate to 115200
//mySerial.print("AT+BAUD4"); // Set baudrate to 9600
//mySerial.print("AT+BAUD7"); // Set baudrate to 57600
delay(1000);
}

void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}

But, i can not to get the ok. Can you help me? Thank you.

The AT mode is activated by connecting the KEY pin to a certain logic level (ie. low - consult your datasheet for details) and powering the module on.