Type Here to Get Search Results !

How to change the name, password and baud rate of HC-05 bluetooth module

Topic - How to change the name, password and baud rate of HC-05 Bluetooth module

HC-05 Bluetooth module has a wide range of application in different arduino related project. HC-05 is commonly used for the serial communication purpose, where we need to transfer the data from our smart phone to any specific circuit or the vice versa. HC-05 is mostly preferred by the developers because of its functionality and simplicity. HC-05 is easily available in the market and it can be incorporate to the circuit by RX and TX connection. Beside this HC-05 Bluetooth module can be used in different modes like master and slave mode. But before using the HC-05 module in any circuit, we have to set up the HC-05 module properly to avoid any type of problems in our project. In this session I will let you know about some basic settings of HC-05, by which you can easily configure your Bluetooth module. Specifically we will keep our attention on three main topics which are –

(1) How to change the name of HC-05 Bluetooth module.

(2) How to change the password of HC-05 Bluetooth module.

(3) How to change the baud rate of HC-05 Bluetooth module.

Circuit Connection –

To set up the Bluetooth module, we need to do the connections between the Bluetooth module HC-05 and Arduino Uno. You can easily built your circuit by following five basic steps.

(1) Connect the enable pin of Bluetooth module with the +5 volt pin of arduino uno.

(2) Connect the VCC pin of Bluetooth module with the 3.3 volt pin of arduino uno.

(3) Connect the ground pin of Bluetooth module with the ground pin of arduino uno.

(4) Connect the RX pin of HC-05 module with the RX pin of arduino uno.

(5) Connect the TX pin of HC-05 module with the TX pin of arduino uno.

These are the connections that you have to make for setting up your Bluetooth module. For better understand follow the circuit diagram given below –


Once you built the circuit, connect the arduino with your computer and do the following as mentioned below. 

Coding –

Now we come to the final step which is coding. In the coding part you have to connect the arduino with your computer. But before connecting the arduino, you have to press the button of your Bluetooth module HC-05. At the bottom right corner you can see a small button on HC-05. You have to keep pressing the button of the Bluetooth module, until you connect the arduino with your computer.

Now you can observe that the Led of HC-05 module is blinking after 2-3 seconds. It means the HC-05 module is now operated in AT mode. If the Led of your Bluetooth module is blinking faster, then the connection is not established properly. And your Bluetooth module will not give any response in AT commands. You can reconnect the arduino with your computer and fix the above problem. If everything is done properly then open the Arduino IDE software and go to the serial monitor at top right corner. Open the serial monitor. Here you have to change some settings.

(1) Change the baud rate to “38400” in serial monitor.

(2) Also select the “both NL & CR” option in the serial monitor.

This two things are very important for customizing the HC-05 module. And if you forget to change the values your code will not run in serial monitor. As a result you will get an unexpected error.

You can check the present values of HC-05 module by using the following codes -

(1) To check the status of your HC-05 module you have write AT and then press enter. The massage “OK” will display on the screen. It means the HC-05 module is now in AT mode and you can go further to change the parameters of your HC-05 module. If the HC-05 is not responding in AT command, then no massage will appear in the screen. It means HC-05 is not in it’s AT mode and you have to reconnect the arduino with your computer.

AT and press enter

(2) Now to check the present name of your Bluetooth module write AT+NAME and then press enter. In the screen you can see the present or default name of your Bluetooth module. If you never change the name of the module before then it will show the default name of the Bluetooth module which is “HC-05”.

AT+NAME and press enter

(3) To check the current password of your Bluetooth module write AT+PSWD and then press enter. At this command you will get the current password of your Bluetooth module. If you never change the password before, then you get the default password of HC-05 which is either “0000” or “1234”.

AT+PSWD and press enter

(4) To check the default baud rate of your Bluetooth module write AT+UART and then press enter. By default the baud rate of HC-05 module is 9600. In your computer screen the baud rate is displayed in this format “9600,0,0”.

AT+UART and press enter

To edit or change the parameters of your HC-05 module you have to write down the following code in the serial monitor.

(1) To change the name of your Bluetooth module write “AT+NAME = the name you want”. To understand the code you can follow the example -

AT+NAME = TECH STUDIO

(2) To change the password of your Bluetooth module write “AT+PSWD = “the password you want” ”. For better understand you can follow the mentioned code –

AT+PSWD = “5555”

(3) To change the baud rate of your HC-05 module you have to write the code in a specific manner like “AT+UART = the baud rate you want to set,0,0”. Take a look to the example for better understanding –

AT+UART = 115200,0,0

These are the codes to change the name, password and baud rate of the HC-05 module. After changing the parameters you can simply check the changed values of HC-05 module by the codes mentioned earlier. And this is how you can customize the HC-05 Bluetooth module according to your need.