This is an old revision of the document!
The HC-05 Bluetooth module is widely available and inexpensive.
A lot of information is available on the Internet so I am not going to repeat everything here, just some notes and observations that may not be obvious even after plenty of Googling.
Since all the modules come with the same name of “HC-05”, it may be difficult to work with multiple modules at the same time because if you pair multiple HC-05 with one Android phone or tablet, they will all show up as HC-05. How do you know which is which?
This is compounded by the fact that the HC-05 can only be paired with one master at a time. Once you pair an HC-05 with a device, it will forget whatever device it may have been paired with previously. However, the device it was paired with previously may remember it yet it will not be able to reconnect unless you “forget” it and pair again. This can get aggravating, even more so if you try to explain that to a non-technical person.
To alleviate this problem, I rename my modules HC05-XXXX where XXXX are the last 4 digits of the MAC address.
You can query the MAC address of an HC-05 module with command AT+ADDR? It will return a string like this“+ADDR:2017:5:152449. This represents MAC address 20:17:05:15:24:49 in conventional notation. So in this example, I would rename the module HC05-2449 using command “AT+NAME=HC05-2449”
When you pair a Bluetooth device with an Android device, Android remembers the Bluetooth device by its name and its MAC address but it only displays the name. Even if you tell Android to forget the device, it will remember the name-MAC address as a set. So if you previously paired a module to your phone as HC-05, change the name of the module to, say, HC05-2449 and try to pair it again, Android will show it under the old name HC-05, even if you have told Android to forget the device (at least on Android 5.1). Once you pair with it again however, the name will then change to the new name.