BLE is a great technology to master, but when starting out, beware the clones of the clones

By T.K.
Hareendran, contributing writer

I recently got a hold
of some cheap Bluetooth modules from eBay to build a project with Bluetooth Low Energy (BLE) communication. The eBay seller’s listing used the name “HM-10 BLE Bluetooth 4.0” for
the module, which is a far-famed Arduino-compatible BLE module with UART serial
communication interface. A few days after my order, I got the packet, but I quickly
discovered that the modules I received seemed like dirt-cheap clones of the real
HM-10 BLE module, which was developed and is supported by Jinan
Huamao Technology
. (Oh well; if I don’t have a little chaos in my life, I feel lost!)

1-HM-10-BLEs

HM-10 BLE Bluetooth 4.0
The HM-10 is a
tiny 3.3-V BLE Bluetooth 4.0 module based on the TI CC2540/CC2541 Bluetooth SoC. It can be controlled via AT commands, which are sent
over the serial UART connection. Most of the latest HM-10 modules, though, are based
on the CC2541 chip, with lower power and a shorter range than the former CC2540
version. Take note: HM-10 is a BLE Bluetooth 4.0 module, which means that it
cannot connect to Bluetooth 2/2.1 modules like the good old HC-05 and HC-06.
This is because BLE is not an upgrade to Bluetooth Classic; it works in a very
different way.

The HM-10 offers
only edge connections, so it usually comes mounted on a breakout board that extends
requisite connections to breadboard-friendly male-header pins (which is how
mine came from eBay). The six-pin breakout board also typically includes an
onboard LDO voltage regulator (3.3 V) that makes the module compatible with a 5-V
power rail. A good example of one such 5-V-compatible module is the somewhat-expensive “Keyes
HM-10” module with on-board voltage regulator and logic level translator.
Sadly, most of the other cheap “HM-10 eBay modules” do
not have these inbuilt logic level translators; thus, the UART remains at a 3.3-V
level, which makes them mismatched to the UART of common 5-V microcontrollers.
This mismatch calls for an external logic level translator/shifter circuitry.

2-HM-10-BLE_Annotated

The HM-10 module, shown here in blue, is usually
delivered mounted to a breakout board containing IO pins and level translator circuits.

Clones and clones
After lots of crawling
about on the web, I finally found that the modules I got were actually clones
of the CC41-A, named as MLT-BT05, which is itself another distant clone of the HM-10.
The “clone of the clone” is different in
hardware and in firmware to some extent. Although the hardware looks identical,
there’s no second crystal (see the empty solder pads). Furthermore, the three-pin
voltage regulator chip seems like a different type.

3-CC-41A _Identification

Fortunately,
both the HM-10 and CC41 use AT commands over the serial connection to configure the module. When
the module is connected to another BLE device, the serial connection can be
used for sending and receiving data (data mode), and when the module is
disconnected from another BLE device, the serial connection is for sending and
receiving commands (command mode). A single serial interface can be used for
both data and commands.

However, the
HM-10 AT commands are different from CC41 AT commands. For example, end-of-line
termination with HM-10 expects no new-line (NL) or carriage-return (CR), while
the CC41 demands both. The MLT-BT05 also follows the CC41’s AT
commands style, but with some minor divergences.

Initial validation
I’d used both
my Arduino board and Android phone to validate the connectivity. For the first
test, I used an Arduino Uno to ensure that my HM-10 clone can work with Arduino
platform without apparent issues. Once I had the
hardware up and running, I uploaded a test code, switched on the Serial Monitor
(9600 baud, NL and CR selected), and typed some AT commands. Happily, I
received prompt answers from the clone. Furthermore, the BLE module showed that it will
work autonomously without the need of a costly microcontroller. More on this
idea in a future post.

4-Arduino-Serial-Test

The second test
took place using an Android phone with the free app “BLE Scanner” (by Bluepixel
Technology LLP) downloaded from Google Play store (see the screenshot). For
that tryout, I just powered up the BLE module from a 5-V breadboard power
supply. The onboard LED (system LED @P101), was useful to be able to see whether the module
is powered and whether it is connected. This LED will flash when turned on and stay
on if it is connected to a BLE device.

5-Android-Test

In my view, Bluetooth Low Energy is an empowering
technology. If you plan to prototype an affordable electronic device that
features low-power wireless networking, then there is no smarter solution than
BLE. You can start with trialing a less complex and cheaper BLE module
(preferably on the breakout board), such as the HM-10. That could be all you need,
assuming that
the likelihood of using clones doesn’t nettle you. If you do have a clone, then,
you will find it crucial to ensure that it has the functionality that you are
looking for. In the meantime, Huamao has now released newer versions of the HM10 as well as the HM11 — the limited edition of HM10 with enhancements
that include compatibility up to Bluetooth 4.2 and 5-V tolerance.

More hands-on reviews by T. K.:
Hands-on review: When hacking an OBD-II
adapter, choose carefully
Hands-on review: ESP32 offers a powerful
IoT-enabled MCU for novices and pros alike
Hands-on review: getting started with the
Intel tinyTILE
Hands-on review: Open-source MinnowBoard
Turbot SBC is fast, powerful, and versatile

Hands-on review: Analyze signals with free,
open-source sigrok PulseView