Cannot pair HC-06 to my laptop

I got a Keyes bt_board v2.0 and connect it to arduino leonardo. I try to connect it to my notebook(with bluetooth). It can be find. I connect it with passcode 1234. It says connection is successful, but the bt board's LED still blinking in red. The device can be found in windows named HC-06 and the serial port is COM10. Then I open the Arduino IDE, I found there are COM11 only in the tool>serial port. So I select COM11 but see nothing receive in serial monitor. I also try to use coolterm. It can connect to COM11(red LED still blinking), but when I try to send command it doesn't have any respond but a loading icon appear in the bottom and TX is light green for a very long while.
please tell me what happen

here is the code I load to arduino

#define BUFFERSIZE 127
uint8_t inBuffer[BUFFERSIZE];
int inLength; // length of data in the buffer
int numLoop = 0; // number of times we looped
int ledPin = 13;
void setup() { 
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT); 
} 
void loop() {
  // read string if available
  if (Serial.available()) {
    inLength =  0;
    while (Serial.available()) {
      inBuffer[ inLength] = Serial.read();
      inLength++;
      if (inLength >= BUFFERSIZE)
         break;
    }
  
    Serial.print("Arduino received: ");
    Serial.write(inBuffer ,inLength);
    Serial.println();
  }
  // blink the led and send a number
  digitalWrite(ledPin, HIGH); // set the LED on
  delay(100); // wait a bit
  Serial.println(numLoop);
  digitalWrite(ledPin, LOW); // set the LED off
  delay(1000);
  numLoop++;
}

I use WIndows 7

I understand the Keyes is just a plain vanilla JY-MCU module. In that event, if the LED is flashing, you do not have a connection. You may have had one at some point, but no longer, and I don't know how that could have happened anyway.

I understand the Leonardo is different but I have to ask the question - are you trying to do this with the USB cable still connected?
If yes, and your opening the IDE suggests you might be, disconnect it, it might solve the problem. The COMport you use is the one sniffed by the bluetooth stack.

The code seems more than it should be and certainly doesn't stick to the real job

The following links might be useful

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino