Bluetooth Modules

This post will be updated as I get time.

A while ago I purchased a few more Bluetooth 4.0 modules. I had no real plan for these except playing with them. For my own projects that use Bluetooth I still use the basic HC-05s and HC-06s with Bluetooth V2.0 or 2.1. These have proven themselves to be very reliable and easy to use.

Here are some of the Bluetooth modules I have
new Bluetooth Modules

I am using a basic serial communication sketch to talk to the Bluetooth modules and this can be downloaded at the bottom of the page. The sketch uses AltSoftSerial and you will need to install this library before being able to compile the sketch.

If you are having problems identifying which module you have or cannot get it connected start by finding its name. Connect to power and then use a device to scan for Bluetooth. If using an Android device and it does not show in Settings => Scan for Bluetooth use a Bluetooth 4 app such as B-BLE. Sometimes Bluetooth 4 devices do not show up in settings but will show up when using a Bluetooth 4 compatible app.

 
 

HM-10

These were sold as originals and I paid slightly more than I normally would of because of it. The mini daughter boards are not identical to the ones listed on the Jinan Huamao website, the crystal looks slightly smaller and I have a black T320 chip rather than the metallic one in the Jinan photos.However, if they are fakes (or at least not originals) then they are closer than the usual copies.

The screen print on the back of the breakout board is not the full artwork I expected and I think I damaged one of the modules when I removed the clear plastic cover.

Update: Just seen the same modules with the Keyes logo.

HM-10

When compared to other Bluetooth modules the pins are reversed and there is a BRK pin rather then a EN or KEY pin.

The STATE pin is connected to the on board LED. Blinking when waiting for pairing or a connection. Solid on when connected and just after pairing.
The BRK pin allows you to reset a connection. When there is an active connection, bring the BRK pin momentarily LOW breaks the connection. When there is no connection making the BRK HIGH or LOW has no effect.

CC2540 or CC2541 chip.
Bluetooth version 4.0
Firmware HMSoft V540
Default baud rate is 9600
Default PIN is 000000
Default name is HMSOFT

The HM-10 is a Bluetooth 4.0 BLE module and not compatible with Bluetooth 2.0 or 2.1. The model I received includes the CC2541 chip as opposed to the CC2540 chip.

HM-10_01

AT commands do not require line ending characters (\r\n) and should be in uppercase.
Firmware is HMSoft V540. This is the latest version at the time of writing.
The modules boot in to AT mode and go in to communication mode when a connection is made.

You can change whether or not the module requires a PIN for pairing with the TYPE command:
HM-10_07

I have found that you can pair with this device in the usual manner via the Android Bluetooth settings even when TYPE is set to 0.
HM-10_05_800

These modules are Bluetooth 4.0 only and require an idevice with IOS 5 or later and an Android device that supports Bluetooth 4 and is using Android 4.3 or later.

Sony Z3 Compact:
These are visible in the Bluetooth Settings => scan for Bluetooth devices and allow you to pair. See above screen shot. Not sure the pairing does anything though. The B-BLE app finds them and is able to read information.
HM-10_06_800

Huawei honor pro 6
The HM10 modules do not show up in the Bluetooth settings.They do appear in the B-BLE android app though.
HM-10_10_800

On a Windows 8.1 PC I can pair and using the default settings I am required to enter the PIN using the default settings.

Downloads

JNHuaMao Technology Company Bluetooth 4.0 BLE module Data sheet
How to upgrade the firmware (official PDF)

Links

Jinan Huamao website. Note this sometimes gets reported as a malware site but I have not had any issues.
Jinan Huamao download page. The firmwares listed are for upgrade only and do not contain the whole file (no boot loader).
HM-10 as iBeacon guide from blueluminance
BLE Central has more information on the HM-10 BLE Module here.

 
 

HM-11. Non break out version.

For a future project I wanted a Bluetooth module that was as small as possible and the HM-11 without a breakout board looked suitable. However, After playing with them for a while I decided to stick with Bluetooth v2 and will use a HC-05 without the breakout board instead.

HM-11_800

Basically the same as the HM-10 but in a small package.

CC2540 or CC2541 chip.
Bluetooth version 4.0
Firmware HMSoft V540
Default baud rate is 9600
Default PIN is 000000
Default name is HMSOFT

The HM-11 is Bluetooth 4.0 BLE only and not compatible with Bluetooth 2.0 or 2.1. The model I received includes the CC2541 chip as opposed to the CC2540 chip.

HM-11_04_sm_01

Pins

Since there is no break out board all pins are 3.3v
HM011_02
HM-11_03

The minimum connections to get the modules working are TX, RX, VCC and GND. I also added a LED to pin 15 so that I had visual confirmation that the module was on. The extra white wire is attached to pin 16 (SYSTEM KEY) but this is not connected in the below photos. The wire is single core wire wrap wire which I find very convenient for this kind of work.
HM-11_07_Breadbaord_01_1200
HM-11_07_Breadbaord_02_1200

 
 

BT05-A mini BLE Bluetooth V4.0 iBeacon

Similar modules sold as DX-BT05. This module is based on the Bolutek CC41-A. This is the same form factor as the HM-11, however, the layout is different. The BT05 is sometimes sold as a HM-10 and regarded as a copy of the HM-10, however, I don’t see these as copies more like a different version of the same thing. Not sure where these originate from as I can’t find this version on the bolutek website nor can I find a manufacturer (didn’t spend too long looking though).

BT-05A_iBeacon

The break out pins are standard layout with a STATE pin and a EN pin.

CC2540 or CC2541 chip.
Bluetooth version 4.0
Firmware is reported as Firmware V3.0.6,Bluetooth V4.0 LE.
Default baud rate is 9600
Default PIN is 000000
The modules report themselves as BT05-A.

This is a Bluetooth 4.0 BLE module and not compatible with Bluetooth 2.0 or 2.1. The model I received includes the CC2541 chip as opposed to the CC2540 chip.

BT-05A_iBeacon_SM_001

AT commands require line ending characters (\r\n). Since the firmware is by Bolutek AT+HELP gets you a list of the available commands.
BT-05A_iBeacon_SM_002

The modules boot in to AT mode and go in to communication mode when a connection is made.

These are smaller than most other modules. Both the breakout board and the actual Bluetooth board are smaller than similar modules. The modules include a small push button switch which I have not investigated yet. A Google search for “DX-BT05 4.0″ will get results for similar boards using the regular sized breakout board.

The STATE pin is LOW when no connection and HIGH when there is an active connection.
The EN pin looks like it is connected to pin 16 on the small Bluetooth board (not confirmed), when brought LOW, it will break an active connection. It does not disable the module though.

Pins

DX-BT05_4.0_pin_diagram

Pin 16 (P0_6)
When the module is in sleep mode, briefly bringing PIN 16 LOW will wake up the module and the module will respond with “+WAKE\r\nOK\r\n”.
When there is a connection, briefly bringing PIN 16 LOW will initiate a disconnection request.

Sleep Mode

Sleep mode is entered using “AT+SLEEP\r\n”. The module will return “+ SLEEP\r\nOK\r\n”
To wake, either send a string of 80 or more characters (the string cannot contain AT commands) or bring pin 16 LOW for a short period. If the module wakes successfully it will return “+WAKE\r\nOK\r\n”

LED in master mode

– quick flash 300ms on, 300ms off – searching/waiting for a connection.
– on – connected.

LED in slave mode

– slow flash (800ms on, 800ms off) – waiting for pairing
– on – connected

According to the seller this is compatible with Android 4.3 or later as long as the device supports Bluetooth 4.0/BLE. It is compatible with iphone 4s onwards and also ipad 3,4,and the ipad minis.

If your Android device does not find the BT module the module may be in master/central mode. Change to slave/peripheral mode using the command AT+ROLE0

Sony Z3 Compact:
The modules show up in Settings => Bluetooth as “BT05-A” but it does not pair (I think is it not required). If you try to pair you briefly get a “trying to pair message” and then it goes back to just showing the name.
BT-05A_02

The B-BLE app connects without the need for the PIN.
BT-05A_03_800

Huawei honor 6 pro:
The BT-05A does not show up in the Settings => search for Bluetooth devices. It does show up in the B-BLE app as a BT05-A
BT-05A_01_800

Serial Connection:
The HMBLE Terminal app on the Sony finds and connects to the BT-05A and serial communication works as expected:
BT-05A_04
BT-05A_05_800

A PC running Windows 8.1 with Bluetooth BLE finds and connects. A PIN is not required to make a connection.
BT-05A_iBeacon_PC_001
BT-05A_iBeacon_PC_002

Downloads

Basic spec sheet in Chinese
AT Commands (Chinese)
BLE-CC41-A basic AT commands

Further Information

Arduino forum: Hm-10 ble device not working
Bolutek website
Uploading firmware. Not tested.

 
 

AT-09 Bluetooth V4.0 CC2541 / HM-10

Also sold as Bluetooth v4.0 BLE CC2540/CC2541 iBeacon and another module that is similar to the HM-10. Has the same firmware as the BT-05A above.

Another one where I bought twice due to them being sold under a different names.

AT-09 BT05 Bluetooth 4.0 BLE iBeacon

Uses the zs-040 breakout board.
Features the CC2541 chip.
Default baud rate is 9600.
Default PIN is 000000.
AT commands require line ending characters (\r\n).
Firmware is reported as Firmware V3.0.6,Bluetooth V4.0 LE.
The firmware is by Bolutek and AT+HELP gets you a list of the available commands.
The modules report themselves as BT05.

The STATE pin is normally LOW and goes HIGH when the device is connected.
The EN pin doesn’t seem to do anything. I haven’t really looked at this though.

AT-09 - BT-05_BBLE_04

AT-09 - BT-05_BBLE_05

Sony Z3 Compact:
The AT-09 shows up in Settings => Bluetooth as “BT05″. If you try to pair you briefly get a “trying to pair message” and then it goes back to just showing the name. The B-BLE app connects without any issue and does not need the PIN.
AT-09 - BT-05_BBLE_02_800

Huawei honor 6 Pro:
Does not show up in the Bluetooth settings => scan for Bluetooth devices.
Using the B-BLE app it shows as “BT05″ and connects without a problem and does not require the PIN.
AT-09 - BT-05_BBLE_01_800

A Windows based PC connects and does not need the PIN.
BT05 Connected

 
 

SPP-C HC-06 / BT06 HC-06

I purchased 2 sets. One set sold as SPP-Cs and one sold as BT-06s. Both have the same firmware and show up as either BT-04A or ??04-A

When I purchased these I only saw them on taobao and I only saw the HC-06 versions. Now there are HC-05 versions and both the HC-6 and HC-05 are available on the usual sites like ebay and dx.com. The sites I have checked show the same incorrect data sheets as you get from the taobao sellers. Next time I order I may add a couple of the HC-05s to see if there is any difference.

BT06-SPP-C

Uses the zs-040 breakout board and has the Bolutek Bluetooth V2.1 version firmware. These are HC-06 slave only modules and the ones I have are 4 pin versions; no STATE pin, no EN pin.

Features the Beken BK3231 chip which is a Bluetooth 3.0 HID device.
Bluetooth v2.1 + EDR
Default baud rate is 9600.
Default PIN is 1234.
Firmware is reported as BOLUTEK Firmware V2.2, Bluetooth V2.1
The firmware is by Bolutek so AT+HELP gets you a list of the available commands.
The modules report themselves as BT04-A or ??04-A

Default to AT mode when powered on. AT commands require line ending characters (\r\n).

If you open the serial monitor and then cycle the power to the module you get

+READY
+PAIRABLE

SPP-CA_SM_02

AT+HELP gets you a list of the available commands
SPP-CA_SM_03

Not sure if this is a full list or if the firmware is different to other “Bolutek Bluetooth v2.1 firmwares. If you Google this you quickly find data sheets that show a different command set.

Sony Z3 Compact:
Listed in Settings => Scan for Bluetooth devices as BT04-A. Can be paired the same as other Bluttooth v2 modules. Once paired they can connect to a Bluetooth 2/2.1 serial terminal app.

Huawei honor pro 6
Takes a while to show up in Settings => Scan for Bluetooth devices. Initally listed by the mac address which then changed to ??04-A.

Windows 8.1
Able connect to a PC running Windows 8.1 with Bluetooth and show up as BT04-A

Pins

SPP_CA-HC-06_Pins_01
PO 5 MCU-INT goes HIGH when a connection is made.
The LED blinks 800ms / 800 ms off when waiting for pairing or for a connection. When a connection is made the LED turns on (no blink).

Downloads

Bolutek SPP-CA hardware Guide Chinese only. This is for the Bolutek version but looks to be the same as the Beken BK3231 chip version.
BK3231 data sheet

Further Information

The BK3231 chip is a highly integrated single-chip Bluetooth HID device. It integrates the high-performance transceiver, rich features baseband processor, and Bluetooth HID profile. Features:
1. Operation voltage from 2.8 V to 3.6 V
2. Bluetooth 2.1 compliant
3. -88dBm sensitivity for 1 Mbps mode and 2 dBm transmit power
4. HID v1.0
5. 16 MHz crystal reference clock

Beken BK3231 product page on the international site
The Bolutek Chinese website has a SPP-CA module but it has a different layout so I suspect the ones I have are copies or they have repurposed the Bolutek firmware.

 
 

HC-06 zs-040 hc01.com v2.0

These look like the common HC-05/HC-06 on the zs-040 breakout boards but have a different firmware.

zs-040_hc01.com_v2.0_01_1200

The modules here were sold as HC-06s and do not have STATE pins or EN pins.

Uses the CSR BC04 (BC417) chip
Bluetooth version v2.0 + EDR
Firmware hc01.comV2.0. The firmware is SLAVE only version and I believe it is the updated Linvor firmware.
Default baud rate is 9600
Default PIN is 1234
Default name is HC-06
The small Bluetooth boards have a blue LED at the top left.

zs-040_hc01.com_v2.0_02

AT commands are required to be in upper case and nl/cr line endings not required.

AT+LED turns off the on board LED. This is the blue LED on the small daughter board not the red LED on the larger breakout board. I originally though the 2 LEDs were linked but if you turn off the blue LED the red LED keeps flashing.

AT+LED0 – turn off the blue LED, returns LED ON
AT+LED1 – turn on the blue LED, returns LED ON

Other commands can be found in the data sheet.

Interesting there is a ROLE command;
AT+ROLE=S puts the module in to SLAVE mode, returns OK+ROLE:S
AT+ROLE=M puts the module in to MASTER mode, returns OK+ROLE:M
The commands are accepted and I originally thought this may mean the modules can be used as HC-05s but I cannot get any of the usual HC-05 commands to work; ROLE, AT+ROLE, AT+ROLE=, AT+ROLE? doesn’t work for example.

Downloads

Chinese Data Sheet
English Data Sheet.Data sheet for the 1.8 firmware but the commands seem to be the same.

The modules I have match the photo in the Chinese data sheet. The photo in the English data sheet would appear to be an older version.

Further Information

Guangzhou HC website (Chinese only but google translate works)
Website download page (Chinese only again). Note the English docs are not as up-to-date as the Chinese docs.
Wavesen product page.This shows the older no blue LED version. Wavesen and HC01 are the same company.

 
 

HC-05 zs-040 hc01.com V2.1

Another version of the HC-05 on the zs-040 breakout board.

zs-040_HC-05_hc01.com_V2.1_01_1200

The hardware is basically the same as the HC-06. The difference is the firmware. The HC-05s can operate as MASTER or SLAVE devices.

These start in communication mode and need to be put in to AT mode by bringing pin 34 HIGH. This can be done by closing the small button switch as you power the modules. When in AT mode the baud rate is set to 38400.
Unlike the other zs-040 HC-05 modules I have it looks like bringing pin 34 HIGH after the modules have started does not put them in AT mode. I haven’t really investigated this properly though.

Uses the CSR BC04 (BC417) chip
Bluetooth version v2.0 + EDR
Firmware hc01.comV2.1.
Default communication baud rate is 9600
AT mode baud rate is 38400
Default PIN is 1234
Default name is HC-05
The small Bluetooth boards have a blue LED at the top left.

The EN pin when briefly brought LOW, breaks an active connection and resets the module.
The STATE pin goes HIGH when a connection is made.

zs-040_HC-05_hc01.com_V2.1_02

AT commands require the nl/cr line endings and can be in upper case or lower case.

Downloads

Chinese data sheet
English data sheet
Chinese AT command guide
English AT command guide

As with the HC-06s the Chinese data sheets are more up-to-date than the English ones.

Further Information

Guangzhou HC website (Chinese only but google translate works)
Website download page (Chinese only again). Note the English docs are not as up-to-date as the Chinese docs.
Wavesen product page.Only the first photo shows the the correct (with LED) version. The other photos still show the the older no blue LED version.

 
 
 
 
 
 

Basic Communication Sketch

Hardware serial is used to talk to the host computer/Arduino serial monitor and AltSoftSerial is used to talk to the Bluetooth module. The sketch can be used to talk to any module that uses serial communication.

//  Basic bluetooth communication sketch using AltSoftSerial (ASS). 
//  Uses hardware serial to talk to the host computer and ASS for communication with the bluetooth module
//
//  When a command is entered in the serial monitor on the computer 
//  the Arduino will relay it to the bluetooth module and display the result in the serial monitor.
//
//  Pins
//  BT VCC to Arduino 5V out. 
//  BT GND to GND
//  Arduino D8 ASS RX - BT TX no need voltage divider 
//  Arduino D9 ASS TX - BT TX through a voltage divider
//
 
#include <AltSoftSerial.h>
AltSoftSerial BTSerial; 
 
 
char c=' ';
boolean NL = true;
 
void setup() 
{
    Serial.begin(9600);
    Serial.print("Sketch:   ");   Serial.println(__FILE__);
    Serial.print("Uploaded: ");   Serial.println(__DATE__);
    Serial.println(" ");
 
    BTSerial.begin(9600);  
    Serial.println("BTserial started at 9600");
    Serial.println("");
 
}
 
void loop()
{
 
    // Read from the Bluetooth module and send to the Arduino Serial Monitor
    if (BTSerial.available())
    {
        c = BTSerial.read();
        Serial.write(c);
    }
 
 
    // Read from the Serial Monitor and send to the Bluetooth module
    if (Serial.available())
    {
        c = Serial.read();
        BTSerial.write(c);   
 
        // Echo the user input to the main window. The ">" character indicates the user entered text.
        if (NL) { Serial.print(">");  NL = false; }
        Serial.write(c);
        if (c==10) { NL = true; }
    }
 
}

 

Android Apps

B-BLE(BLE4.0 Scan) can be downloaded from Google Play
BLE Scanner is also available
HM BLE Terminal is available here. Please note I have some minor issues with AT commands appearing by themselves. Not sure if it is the app or me.
Bluetooth spp tools pro is another serial terminal app that I have not trried yet but looks quite good.

 
 
 

13 thoughts on “Bluetooth Modules

  1. Pingback: Control an Arduino via the HM-10 BLE module, from a mobile app on your smartphone | Evothings

  2. I have 2 AT-09s. B-BLE is able to connect to them and I can pair them when their Roles are set to o and 1.
    But all pairing requests from other BT devices are rejected by the AT-09s.
    I need to pair one of these devices to my Android 6.0 mobile.
    Any way to do that?
    Many thanks for your good info above.

  3. Hi Martyn,
    I must admit that this is the best Bluetooth modules overview I ever came across.
    I know that there are datasheets available, however some parameters are not precisely described in datasheets.
    What I have in mind is current consumption.
    I looking for a Bluetooth module that has the lowest power hunger.
    In my design +-5mA equals +-24h of work.
    The main condition are:
    Current consumption under constant data transfer from the Bluetooth module at 9600 and 115200kbps (transmission).
    Current consumption under constant data transfer to the Bluetooth module at 9600 and 115200kbps (reception).
    Current consumption with no data transfer before power safe mode kicks in.

    Any info regarding this matter would be appreciated.
    Chris

    P.S. Sorry for my English.

    • Unfortunately I haven’t looked in to power consumption and so I can’t help. I have found the data sheets to be pretty accurate with other things so would think that the current draw stated would also be accurate.

  4. Update to the previous.

    The 2 AT-09s can pair with each other using the AT+INQ command which enumerates available devices, followed by the AT+CONNx command where x is the number of the enumerated device above. However the devices enumerated are only ever other AT-09s. No other BT devices are ever detected and, hence cannot be connected to.

    • I haven’t looked into this but would suspect that the modules with the Bolutek firmware would all see each other. Especially if they used the CC2540 or CC2541 chip.
      If I get time this weekend I will see if the different modules can see each other.

  5. Hi Martyn,

    Many thanks.
    I can now connect 2 AT-09 devices and transmit between them. I have all AT commands from the AT+HELP command working as advertised with the exception of AT+START, which seems to have no function.
    Using 2 Tera Term terminals through Pololu USB to Serial converters I can do eveything I need. I can drive the AT-09’s from an Arduino Uno either as Master or Slave. Everything is going swimmingly. EXCEPT—–
    The AT-09 as Master sees only AT-09 slaves. It will not show a Win8 as a visible device, but the Win8 PC can connect to an AT-09 slave. Whether data is received by the Win8 device I cannot say because I have to write something with C# to implement the device – which I have not yet done.
    What I’m trying to achieve is this:
    I have an Arduino Uno application where it monitors 4 digital 1-wire heat probes and a pressure transducer. The device measures under-hood parameters from a diesel turbo-charger/inter-cooler installation and offers an opinion on how effective the inter-cooler is any given time. Currently thee display is 16×2 LCD. I want to send the data to an Android phone so it’s easier to read and the Arduino can be left under the hood without wires and a pressure pipe leading into the car through a window. Hence I need to make the AT-09 pair with the Uno since the Android API will only countenance paired devices. The likes of B-BLE, while nice to see, don’t offer access to the data stream incoming off the link.
    In the meantime I’m learning plenty about BT, which was not even a gleam in anyone’s eye when I was a DOS developer in the 1980s.

    • Depending on the BT dongle & software you have your PC it may or may not see the AT-09 and if it sees it it may not be able to connect. It is also possible that your PC can opperate in master mode only.

      My Win7 PC with a Bluetooth 4 dongle and the Blue Soleil software does not see the AT-09/BT05 module.
      My Win8.1 laptop with built in Bluetooth sees them and connects.

      I have 4 Android devices and they all see the AT-09s when using BLE apps.

Leave a Reply

Your email address will not be published. Required fields are marked *


9 + = fifteen

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>