HC-05 Bluetooth Module

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.
One of the better pages is arduino-info.wikispaces.com/BlueTooth-HC05-HC06-Modules-How-To

A note about using multiple HC-05 modules with an Android device and renaming your HC-05s

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. This makes it very unlikely that any 2 modules I am working with have the same name. I put a sticker on the HC-05 module with the last 4 of the MAC address and I know exactly which module I am connected to.

You can query the MAC address of an HC-05 module with command “AT+ADDR?\r\n” It will return a string like this“+ADDR:2017:5:152449. This represents MAC address 20:17:05:15:24:49 in conventional dot (or colon) notation. So in this example, I would rename the module HC05-2449 using command “AT+NAME=HC05-2449\r\n”

A quirk: even though the “AT+NAME=XXXX” command works fine on my modules (with version of “hc01.comV2.1”), the AT+NAME? command is totally ignored and returns nothing (no OK, no ERROR). This may be due to the particular firmware in my modules.

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 when you are in the Bluetooth settings page. Even if you tell Android to forget the device, it will remember the name-MAC address as a set (at least for a while). 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.