HM-10 and HC-05 with ASI Biont: Why Bluetooth UART Integration Silently Fails (and How to Wire It Right)

Two modules that look identical, both speak "serial over the air," and both are sold as the easiest way to get a microcontroller talking to anything. Yet a beginner plugs an HC-05 into a project, wires RX to TX, tells the AI agent "here is my Bluetooth module," and gets absolutely nothing back — no error, no data, just silence. The myth is that HM-10 and HC-05 are interchangeable wireless UART pipes. They are not. HC-05 is Bluetooth Classic SPP; HM-10 is BLE GATT with services and characteristics. They use different AT commands, different pairing behavior, and different ways of connecting to ASI Biont. Get the type wrong and the integration fails quietly, which is the worst kind of failure.

This article walks through how to identify your module, configure it, and connect it to ASI Biont so the agent can actually read and write data over Bluetooth UART. If you have ever stared at a serial monitor wondering why the module answers AT but never passes a byte of sensor data, this is for you.

First, find out what you actually own

Before any code, before any chat with the agent, run one test. Power the module at 3.3 V (HM-10) or 3.6–6 V (HC-05 breakout with regulator), open a serial terminal at 9600 baud for HM-10 and 38400 baud for HC-05 (the factory defaults), and send AT. Both reply OK. That tells you nothing yet.

Now send AT+NAME?:

  • HC-05 answers something like +NAME:HC-05.
  • HM-10 answers OK+NAME:HMSoft or OK+Get:0 depending on firmware.

The giveaway is the reply format. HC-05 uses +COMMAND: prefixes and needs a newline; HM-10 uses OK+ prefixes and does not. If you send AT+NAME? to an HM-10 and get ERROR, you are probably talking to an HC-05, or your baud rate is wrong.

The 5-second type check Send AT+VERSION?. HC-05 returns a Classic firmware string like +VERSION:2.0. HM-10 returns something like +VERSION=Firmware V3.0.6,Bluetooth V4.0 LE. The letters LE settle it.

Why does this matter so much? Because the two chips do not just speak different dialects — they live on different radio stacks. An HC-05 appears to the host as a serial port after pairing (SPP). An HM-10 never appears as a serial port at all; it advertises a GATT server, and you must connect to a specific service and characteristic to exchange bytes. An agent that opens a "serial port" for an HM-10 will wait forever.

The wiring is the same, the configuration is not

Physically, both modules connect to an Arduino or ESP32 the same way: module TX to board RX, module RX to board TX through a voltage divider if the board is 5 V and the module is 3.3 V, plus VCC and GND. On an ESP32, use a hardware UART such as Serial2 on GPIO16/17 rather than SoftwareSerial — BLE timing is unforgiving and bit-banged serial drops bytes under load.

Parameter HC-05 (Classic SPP) HM-10 (BLE GATT)
Radio Bluetooth Classic 2.0/2.1 Bluetooth 4.0+ Low Energy
Default baud 38400 9600
Command prefix AT+... with CRLF AT+... without line ending
Pairing PIN (1234 or 0000) No PIN, just connect
Data channel SPP serial socket GATT service FFE0, characteristic FFE1
Host sees it as Virtual COM port BLE peripheral

That table is the whole reason integrations break. People configure an HC-05 with HM-10 commands or vice versa, the module ignores them, and the project is declared "broken" when it was never configured at all.

Configuring each module with real AT commands

For the HC-05, enter AT mode by holding the button (or pulling the EN/KEY pin high) while powering on. The LED blinks slowly, roughly once every two seconds. Then:

AT+NAME=TempNode        // set advertised name
AT+PSWD=1234            // pairing PIN
AT+UART=9600,0,0        // baud, stop bits, parity
AT+ROLE=0               // 0 = slave, 1 = master
AT+CMODE=1              // connect to any device

For the HM-10, no button is needed — it accepts AT commands over serial at any time when not connected. The sequence is shorter:

AT+NAME TempNode
AT+BAUD4              // 9600 baud (BAUD4 = 9600)
AT+ROLE0              // peripheral
AT+RESET

Notice the difference: HC-05 uses AT+UART=9600,0,0, HM-10 uses AT+BAUD4. If you paste the HC-05 command into an HM-10, you get ERROR and no change. If you paste the HM-10 command into an HC-05, same thing. The module keeps its old settings and your agent keeps connecting at the wrong speed.

Configure first, connect second An unconfigured module usually still advertises and still accepts a connection — it just uses factory defaults. That is why the failure looks like "the agent connected but sees no data" rather than "the agent cannot connect." Always confirm the name and baud with AT+NAME? and a known-good terminal before involving the agent.

How ASI Biont actually reaches the module

ASI Biont does not need a special Bluetooth driver or a pre-built connector. It connects to any device through execute_python — the AI writes the integration code itself, using real Python libraries, inside a sandbox. For Bluetooth this means bleak (the standard async BLE client for HM-10) or pyserial over a paired virtual COM port for HC-05. You describe the task in chat — module type, port, name, what data you want — and the agent writes and runs the code. No "add device" button, no waiting for a vendor to ship support.

For an HM-10 the connection is a BLE GATT client: find the peripheral by name, connect, locate service FFE0 and characteristic FFE1, then read or write. For an HC-05 the module pairs at the OS level and exposes a serial port; the agent talks to it with pyserial exactly as it would to a USB cable. Same agent, same chat, two completely different code paths — and the agent picks the right one because you told it which chip you have.

If your Bluetooth module is only one link in a larger build, the same chat handles the rest of the stack. The approach in "When the Board Blinks Wrong: Two Ways to Point an LLM at Arduino, ESP32 and IoT — Spec-First Sketching vs Log-Driven Autopsy" is worth reading before you start debugging a silent module. More on the topic: “Arduino, IoT and Embedded Systems: What Your Choice Really Decides — and Why the Course 'Arduino, IoT and Embedded Systems' Beats the Alternatives”.

Reading a temperature sensor over HM-10, end to end

Here is a concrete case. An Arduino Nano reads a DS18B20 sensor and pushes the value as a short ASCII string over an HM-10. The ASI Biont agent connects over BLE, reads the characteristic, and posts the value to Telegram when it crosses a threshold.

On the Arduino side, the sketch is ordinary: read the sensor, print T=23.5\n to Serial, and the HM-10 forwards those bytes to whatever is connected to characteristic FFE1. No Bluetooth code in the sketch at all — that is the point of a UART module.

On the agent side, you describe the job in chat: "Connect to the BLE device named TempNode, read characteristic FFE1 of service FFE0 every 60 seconds, parse the T= value, and if it exceeds 30 send a Telegram message." The AI writes something like this:

import asyncio
from bleak import BleakClient
import requests

ADDRESS = "A4:C1:38:XX:XX:XX"   # from a BLE scan
CHAR_UUID = "0000ffe1-0000-1000-8000-00805f9b34fb"

def notify_telegram(text):
    requests.post(
        "https://api.telegram.org/bot<TOKEN>/sendMessage",
        json={"chat_id": "<CHAT_ID>", "text": text},
        timeout=10,
    )

async def main():
    async with BleakClient(ADDRESS, timeout=20) as client:
        raw = await client.read_gatt_char(CHAR_UUID)
        payload = raw.decode("ascii", errors="ignore").strip()
        if payload.startswith("T="):
            temp = float(payload[2:])
            if temp > 30:
                notify_telegram(f"Temperature alert: {temp} C")

asyncio.run(main())

Two details the AI gets right that beginners often miss. First, the FFE1 UUID is the full 128-bit form, not the short FFE1 — some BLE stacks accept the short form, many do not, and the failure is a Characteristic not found exception. Second, the code reads the characteristic rather than subscribing to notifications, because a one-shot read is enough for a 60-second poll and avoids keeping a long-lived connection open inside the sandbox timeout.

For an HC-05 the same task looks different. The module is paired to the host once, appears as /dev/rfcomm0 on Linux or COM5 on Windows, and the agent uses pyserial:

import serial

with serial.Serial("COM5", 9600, timeout=5) as link:
    line = link.readline().decode("ascii", errors="ignore").strip()
    if line.startswith("T="):
        print("Temperature:", line[2:])

Same sensor, same string, completely different transport. If the agent writes the BLE code for an HC-05, you get a timeout; if it writes the serial code for an HM-10, you get a port that does not exist. The type of module is the single input that decides everything downstream.

What the agent can automate once the channel is open

The value is not the first reading — it is what happens next without you. Once the Bluetooth UART channel works, the agent can:

  1. Poll on a schedule and compare against thresholds (temperature, humidity, battery voltage).
  2. React to a button press — a momentary switch on a GPIO sends BTN=1, and the agent turns on a light through another command written back to the same characteristic.
  3. Detect a leak — a water sensor sends WET, the agent posts to Telegram and, if you have a relay on the other end, writes the off command back over the same FFE1 channel.
  4. Log a history — every reading appended to a file or forwarded to another system, so you can see a trend instead of a single number.

Reading and writing use the same channel, which is the quiet advantage of UART-style modules: you do not need a second protocol for control. The agent writes LED=1 to FFE1 exactly the way the sketch would receive it over a wire.

Same wiring, two different code paths
HM-10 (BLE GATT)
  • Agent uses bleak
  • Connect to service FFE0
  • Read/write characteristic FFE1
  • Full 128-bit UUID required
  • No OS pairing needed
HC-05 (Classic SPP)
  • Agent uses pyserial
  • Pair at OS level first
  • Open virtual COM port
  • Baud must match (38400 default)
  • No GATT services at all

If your project grows beyond one module toward a real sensor network, the broader lessons in "Arduino, IoT and Embedded Systems: What an Arduino IoT Course Actually Teaches — C/C++, Sensors, ESP32 and the Smart Home Reality" apply directly — especially the part about what breaks when you add a second device.

The traps that make Bluetooth integration fail silently

Most failed integrations are not exotic. They are a handful of repeatable mistakes, and each one produces no error message:

  • Wrong module type assumed. The agent is told "Bluetooth UART" with no chip named, guesses BLE, and the HC-05 never answers. Always state HM-10 or HC-05 explicitly.
  • Baud mismatch. HM-10 default is 9600, HC-05 is 38400. If the module was reconfigured and you did not check, the data arrives as garbage or not at all.
  • Short UUID used for FFE1. Use 0000ffe1-0000-1000-8000-00805f9b34fb, not FFE1.
  • HC-05 not paired at the OS level. pyserial cannot open a port that does not exist yet. Pair first, confirm the port name, then hand it to the agent.
  • Voltage divider missing. A 5 V Arduino TX feeding a 3.3 V HM-10 RX works for a while and then stops. The module does not always die loudly.
  • Sandbox timeout. execute_python runs under a 30-second limit, so no while True. Poll once per call and let the agent schedule the next run.
Ask the agent to diagnose, not just connect If readings stop, tell the agent in chat: "the HM-10 connects but read_gatt_char returns empty — check the UUID and try subscribing to notifications instead." The agent can rewrite the code and rerun it in the same conversation, which is often faster than reflashing the board.

Why this is worth doing through an agent at all

The alternative is writing the BLE client, handling reconnects, parsing the payload, and wiring up notifications yourself — for every module and every sensor. With ASI Biont the work collapses into a sentence in chat describing the device and the goal. The AI writes the code with bleak or pyserial, runs it, and you see the result. If the module turns out to be an HC-05 after all, you say so and the agent switches to a serial socket. No plugin, no firmware update, no ticket to a vendor.

The one thing the agent cannot do for you is know which chip is on your desk. That five-second AT+VERSION? check is yours — and it is the difference between an integration that works on the first try and an afternoon spent wondering why the data never arrives.

Describe your module and what you want it to report, and let the agent build the rest: try the integration on asibiont.com.

← All posts

Ask AI about this article

Ask a question about this article — ASI Biont will answer based on its text.