In order to be sure your bluetooth module is configured correctly, you can follow these steps.
Connect Bluetooth module to USB Serial Converter: You will need to connect the bluetooth module directly to your PC through serial interface. Today, most computers do not come with a serial interface so you must use a USB to Serial Converter such as this. Connect the pins.
Bluetooth Module <—-> USB to Serial Module (FTDI)
VCC <—> 5V
GND <—> GND
TXD <—> RXD
RXD <—> TXD
Connect USB Serial Converter to PC. Connect the USB to Serial Converter to your computer. Once connected your bluetooth module should start blinking. To check if your computer is registering the module properly this is what you should see if you open your Device Manager on your PC. One USB Serial Port should be active.
If your bluetooth module’s LED is on solid and not blinking that means the device is connected. So switch off the bluetooth of your PC and/or smart phone.
Launch your Arduino IDE. In order to program your Bluetooth module you need to open your Arduino IDE. Select the correct Serial Port (COM4).
Open Serial Monitor. Use the Serial Monitor on your Arduino IDE to talk to your Bluetooth module. Pick 9600 baud at the bottom of the screen. Your Bluetooth module LED should continue to blink. Type AT in the Command line. If you are properly talking to your Bluetooth module, it should return OK.
Change the Baudrate. First set the baud rate of your Bluetooth module to 57600, the default speed of the Firmata firmware that is programmed into your Arduino. Do this by typing AT+BAUD7. The Bluetooth module should return OK57600.
Change the name. Next give your Bluetooth module a name by typing AT+NAMEwhatevernameyouwant where “whatevernameyouwant” is the name you want to use. In our case we used MiiBot. The Bluetooth module should return OKsetname.
Change the pairing code. The following example shows how to change the pairing code to 4321. In the Serial Monitor type AT+PIN4321. The Bluetooth moduel should reply: OKsetPIN as shown below.