本文介绍了HM10 ble 改变特征值 AT 命令 Arduino的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能帮我用AT命令写特征值,或者如何使用Hm10模块将数据从arduino发送到另一个ble设备.

Can anyone help me with the AT command to write characteristic value, Or how to send data from arduino to another ble device using Hm10 module.

HM10 发送 AT+START 后,会做广告包,可以检测服务和特征,但是特征值是默认的 0x00,我该如何更改?

The HM10 after sending the AT+START, does advertise packets, and can detect the service and characteristic, But the characteristic value is the default 0x00, How can I change that?

多次检查数据表,但找不到能够执行相同操作的 AT 命令.

Have checked the data sheet multiple times but can not find an AT command that is capable of doing the same.

更新:在中央模式下设置 HM10 的类似问题:

UPDATE: Similar problem with setting the HM10 in Central Mode:

中央模式设置!

1) AT+ROLE1 - 设置为中央模式

1) AT+ROLE1 - Set up to Central Mode

2) AT+IMME1 - 从 RESET 开始

2) AT+IMME1 - Start from RESET

3) AT+SHOW1 - 显示发现的设备

3) AT+SHOW1 - Show discovered devices

4) AT+DISC?- 发现设备获取设备 MAC ID,

4) AT+DISC? - Discover Devices Get Device MAC ID,

5) AT+CON[MAC ID]

5) AT+CON[MAC ID]

结果:总是给出 OK+CONNA 并在 10 秒后给出 OK+CONNF

RESULT: Always gives OK+CONNA and after 10seconds OK+CONNF

我很困惑,在AT+DISC"之前使用AT+START"?导致 AT+START 不起作用,反之亦然.使用 AT+START 会导致 OK+CONN 循环,然后是 OK+LOST,并且不再接受更多的 AT 命令.我相信它确实会导致

I am confused, Use of "AT+START" before "AT+DISC?" causes AT+START to not work and viceversa.Using AT+START results into a loop of OK+CONN followed by OK+LOST continuously and no more AT commands are accepted. I believe it does result in a

你能就正确的顺序提出建议吗?

Can you advice on the right order?

使用 LightBlue iOS 应用程序作为外围设备.如何选择服务并订阅特征以从应用程序接收数据?

Using LightBlue iOS app as the peripheral. How am I to select a service and subscribe to a characteristic to receive data from the application?

谢谢.

推荐答案

没有AT命令设置特征值.

There is no AT command to set a characteristic value.

HM10 是一个串行端口仿真设备 - 您发送到 HM10 模块的任何串行数据(除了 AT 命令)都可以通过它的 BLE 特性获得.不幸的是,数据表没有记录服务和特性,但是 这段代码表明串行RX/TX特性是0000ffe1-0000-1000-8000-00805f9b34fb

The HM10 is a serial-port emulation device - whatever serial data you send to the HM10 module (aside from the AT commands) is made available on it's BLE characteristic. Unfortunately the data sheet doesn't document the service and characteristics, but this code suggests that the serial RX/TX characteristic is 0000ffe1-0000-1000-8000-00805f9b34fb

因此,写入串行端口的数据应显示为该特性的值.写入该特性的数据应从 HM10 模块上的 TX 串口引脚传送出去.

So, data written to the serial port should appear as the value of that characteristic. Data written to that characteristic should be delivered out of the TX serial port pin on the HM10 module.

这篇关于HM10 ble 改变特征值 AT 命令 Arduino的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-24 12:43