You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于HM10软串口BLE特性、UUID/GATT配置及硬件串口对接的技术咨询

Hey there! Let’s break down your questions clearly—since you’re new to BLE and HM10, I’ll keep things straightforward and actionable.


1. HM10 on Software Serial: BLE Support & UUID/GATT Configuration

First off: Yes, the HM10 fully supports BLE features even when connected via software serial—the module itself is a BLE peripheral, so as long as your software serial connection is stable (correct baud rate, 3.3V level matching, no heavy CPU load), it will work normally.

To adjust UUIDs and GATT configurations, you’ll use AT commands directly over the serial link. Here’s a step-by-step guide:

  • Enter AT mode: Most HM10 modules require holding the KEY pin high during power-up, or sending a specific trigger (check your module’s datasheet if holding KEY doesn’t work). Once in mode, send AT followed by a carriage return—you’ll get an OK response if it worked.
  • Modify Service UUID: Use the AT+UUID=<your-UUID> command. For example:
    AT+UUID=0000FFE0-0000-1000-8000-00805F9B34FB
    
    The module will return OK if the change is accepted.
  • Modify Characteristic UUID: Use AT+CHAR=<your-characteristic-UUID> to set the UUID for the data transfer characteristic:
    AT+CHAR=0000FFE1-0000-1000-8000-00805F9B34FB
    
  • Save changes: Don’t forget to send AT+SAVE to store the configuration permanently—otherwise, it’ll reset to defaults on power loss.
  • Pro tip: Send AT+HELP to get a full list of supported commands, since firmware versions can vary slightly in syntax.

2. BLE Bidirectional Transfer, Configuration & Hardware Serial Alternative

Bidirectional Data Transfer & BLE Mode Setup

Since you’ve been working on this for weeks, let’s simplify the workflow:

  1. Confirm your HM10 is in BLE mode (default for most modules, but you can force it with AT+ROLE0 to set it as a peripheral).
  2. Enable notifications for the data characteristic with AT+NOTI1—this lets the module push incoming serial data to your phone automatically.
  3. Use a BLE testing app like nRF Connect on your phone: connect to the HM10’s broadcast name, find your configured characteristic, and you can send data to the module (it’ll appear on the serial port) and receive data from the serial port via notifications.

Using Hardware RX-TX Instead of Software Serial

Absolutely—this is actually highly recommended! Hardware serial (UART) is handled by dedicated hardware on your microcontroller, so it’s far more stable than software serial (which relies on CPU interrupts and can drop data under load).

To set it up:

  • Connect HM10’s TX pin to your microcontroller’s RX pin, and HM10’s RX pin to your microcontroller’s TX pin.
  • Critical note: HM10 uses 3.3V logic—if your microcontroller is 5V, add a level shifter between the pins to avoid damaging the module.
  • Match the baud rate (default is usually 9600 or 115200; check with AT+BAUD? if unsure).

The rest of the setup (AT commands, BLE configuration) works exactly the same as with software serial—you’ll just get more reliable data transfer.


A few quick beginner tips to save you time:

  • Always test AT commands with a USB-to-serial adapter first before connecting to your microcontroller—this helps rule out wiring issues.
  • Make sure your HM10 has a stable 3.3V power supply (at least 50mA current draw)—unstable power causes weird BLE connection drops.

内容的提问来源于stack exchange,提问作者Chakradhar Nakka

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 06:30:44