当前位置:网站首页>Bluetooth ble4.0-hm-10 device pairing Guide
Bluetooth ble4.0-hm-10 device pairing Guide
2022-07-26 15:16:00 【SudekiMing】
bluetooth BLE4.0-HM-10 Device pairing Guide
One 、 Product parameters
Ø Bluetooth protocol :Bluetooth Specification V4.0 BLE
Ø There is no byte limit for serial port sending and receiving
Ø Open environment and iphone4s Can achieve 100 Ultra long distance communication
Ø USB agreement :USB V2.0
Ø Working frequency :2.4GHz ISM band
Ø Modulation mode :GFSK(Gaussian Frequency Shift Keying)
Ø Transmitting power :-23dbm, -6dbm, 0dbm, 6dbm, Can pass AT Instruction to modify
Ø spirit Sensitive degree :≤-84dBm at 0.1% BER
Ø Transmission rate :Asynchronous: 6K bytes
Synchronous: 6k Bytes
Ø Safety features :Authentication and encryption
Ø Support services :Central & Peripheral UUID FFE0,FFE1
Ø work Consumption : In automatic sleep mode , Standby current 400uA~800uA, When transmitting 8.5mA.
Ø Power supply :+3.3VDC 50mA
Ø working temperature :–5 ~ +65 Centigrade
Ø Exterior dimensions :HM- 10 26.9mm x 13mm x 2.2 mm; HM-11 1813.52.2mm
Two 、 Product overview
HM-10、HM-11 Series Bluetooth module adopts TI CC2540 chip , To configure 256Kb Space , Support
AT Instructions , Users can change roles as needed ( Lord 、 Slave mode ) And serial port baud rate 、 Equipment name 、
Pairing password and other parameters , Flexible use .
3、 ... and 、HM Key points for connection between series Bluetooth module and MCU :
HM The working voltage of series Bluetooth module is recommended 3.3V, And 3.3V Single chip microcomputer can be directly connected ,
When needed with 5V When the SCM is connected , Please enter the module RX Pin and MCU TX There is a string between the pins
1-2K The resistance of , Protect the module RX Pin , Prevent from being burned .
Four 、 bluetooth BLE4.0-HM-10 Device pairing
1. test
Instructions The reply Parameters
AT OK / OK+LOST nothing
When the module is in standby mode , It will return through the serial port : “OK”
When the module is connected , Will disconnect and return :”OK+LOST”, The premise is that AT+NOTI1
Test whether Bluetooth is available
2. Check this machine MAC Address
Instructions The reply Parameters
AT+ADDR? OK+LADD:MAC Address nothing
Record the queried local MAC Address spare
3. Inquire about / Set broadcast mode
Instructions The reply Parameters
Inquire about :AT+ADTY? OK+ Get:[Para] nothing
Set up : AT+ADTY[Para] OK+ Set:[Para] Para: 0 ~ 3
0: Any device search connection
1: Allow last successful device connection
( On the power 1.28 In seconds )
2: Allow broadcast and search
3: Broadcast only
Default: 0
notes : Instructions available in slave mode
Added since V519 version
Determine whether the instruction settings are available , Set to 0: Any device search connection
4. Inquire about / Set the white list switch ( Only 3 Links to specified addresses )
Instructions The reply Parameters
Inquire about :AT+ALLO? OK+ Get:[Para] nothing
Set up :AT+ALLO[Para] OK+ Set:[Para] Para: 0 ~ 1
0: Off
1: Open
Default: 0
notes : Instructions available in slave mode
Added since V523 version
Determine whether the instruction settings are available , Set to 1: Open
5. Inquire about 、 Set master-slave mode
Instructions The reply Parameters
Inquire about :AT+ROLE? OK+ Get: [para1]
Set up :AT+ROLE[para1] OK+Set: [para1]
Para1: 0 ~ 1
1: Main equipment
0: Slave device
Default: 0
notes : After the command is executed , It will cause module delay 500ms restart .
Inquire about 、 Set the master-slave mode of two Bluetooth modules , One for the main , One is from
6. Inquire about / Set whitelist address
Instructions The reply Parameters
Inquire about : AT+AD[Para1]?? OK+ Get:[Para2] nothing
AT+AD[Para1][Para2] OK+CONN[Para2] Para1: 1~3
Para2: Bluetooth address
Such as : 0017EA0943AE
For example, check the address of the white list 1:
Send: AT+AD1??
Recv: OK+AD1001122334455 (001122334455 For Bluetooth address )
Set whitelist address 1:
Send: AT+AD1001122334455 (001122334455 For Bluetooth address )
Recv: OK+AD1001122334455
Para1: 1~3 For Bluetooth module 3 An address , We usually only use one , The setting address instructions of both Bluetooth modules are available Send: AT+AD1001122334455 (001122334455 For each other's Bluetooth address )
Record the two Bluetooth modules found MAC Write the Bluetooth address of the other party respectively
7. Inquire about 、 set baud rate
Instructions The reply Parameters
Inquire about :AT+BAUD? OK+Get: [para1]
Set up :AT+BAUD[para1] OK+Set: [para1]
Para1:0~8
0=9600;1=19200;
2=38400;3=57600;
4=115200;5=4800;
6=2400;7=1200;
8=230400;
Default:0(9600)
Examples are as follows :
send out :AT+BAUD2
return :OK+Set:2
0---------9600
1---------19200
2---------38400
3---------57600
4---------115200
5---------4800
6----------2400
7----------1200 ( Switch to 1200 Will not support AT Command to configure , And sending and receiving error code needs
You control , It is recommended that each delivery and receipt should not exceed 10 Bytes , Until you press... In standby mode PIO0,
The module will automatically return to the factory settings )
8----------230400
notes : After the command is executed , The newly set parameters can take effect only after power on again .
Inquire about 、 Set the baud rate of Bluetooth data transmission
- Clear device pairing information
Instructions The reply Parameters
AT+CLEAR OK+CLEAR nothing
Clear the address code information of the successfully connected device .
Clear the address code information of the last successfully connected device , Power off and restart , Lord 、 The indicator of the Bluetooth module is always on , That is, complete the pairing , otherwise : Execution instruction 9 After restoring the default settings , Re operate the first eight instructions .
9. Restore default settings (Renew)
Instructions The reply Parameters
AT+RENEW OK+RENEW nothing
Restore the default factory setting of the module , All settings of the module will be reset , Restore to the factory state ,
After restoring the factory settings , Module delay 500ms Restart after , If not necessary , Please use with caution .
Two Bluetooth modules are as above 8 The pairing can be completed by the corresponding operation of instructions .( Instructions come in no order )
That's it HM BLE4.0 Pairing of Bluetooth modules . What about? , Did you make it ……
5、 ... and 、 Other possible instructions
1. Inquire about / Set up ANCS switch
Instructions The reply Parameters
Inquire about :AT+ANCS? OK+ Get:[Para] nothing
Set up :AT+ANCS[Para] OK+ Set:[Para] Para: 0 ~ 1
0: Off
1: Open
Default: 0
After the device is successfully paired and bound with Bluetooth for the first time , ANCS Notify the device , It's not necessary
2. Connect the slave device that succeeded in the last connection
Instructions The reply Parameters
AT+CONNL OK+CONN[Para] Para: L, N, E,F
L: Connecting
N: Empty address
E: Connection error
F: The connection fails
If the remote equipment is abnormally powered off or has established a connection with other equipment , be OK+CONNF need 10
It will return in about seconds .
notes : This command is only valid when the master device ; This command is not accepted when slave device , Send this command without
Reply , And don't execute .
3. Connect the slave device with the specified Bluetooth address
Instructions The reply Parameters
AT+CON[para1] OK+CONN[Para2] Para1: Bluetooth address
Such as : 0017EA0943AE
Para2: A, E, F
A: Connecting
B: Connection error
F: The connection fails
If the remote equipment is abnormally powered off or has established a connection with other equipment , be OK+CONNF need 10
It will return in about seconds .
notes : This command is only valid when the master device ; This command is not accepted when slave device , Send this command without
Reply , And don't execute .
4. Connect the device returned by the search
Instructions The reply Parameters
AT+CONN[para1] OK+CONN[para2] Para1: 0~5, Depending on
AT+DISC? Number of searches ,
Subscript from 0 Start .
Para2: E, F, 0~5
E: Connection error
F: The connection fails
0~5: Trying to connect
This instruction is in the main mode 、 Manual operation mode command . Before use, it must meet AT+ROLE1,
AT+IMME1,AT+DISC? Conditions .
notes : After successfully connecting any Bluetooth device , All information searched will be cleared , If you want
Connect other devices , Please search again .
5. Set the working type of the module
Instructions The reply Parameters
Inquire about :AT+IMME? OK+ Get:[para] nothing
Set up :
AT+IMME[para]
OK+Set:[para] Para: 0 ~ 1
0: Work immediately after power on
1: On electric after temporary No work do , wait for
AT+START/AT+CON/AT+CONN
Such as instruction
Default: 0
notes : The setting value takes effect after power on again .
6. Set whether to notify the upper computer of the connection status
Instructions The reply Parameters
Inquire about :AT+NOTI? OK+ Get:[para] nothing
Set up :AT+NOTI[para] OK+Set:[para] Para: 0 ~ 1
0: Do not notify after connecting Upper computer
1: Notify the upper computer after connection
Default: 0
notes : Such as Para Value to 1, After the module is successfully connected to the remote module , Will send through serial port
send ”OK+CONN” Characters are given to the upper computer welded with the module , After disconnecting, it will send
send ”OK+LOST” character .
7. Module reset , restart (Reset)
Instructions The reply Parameters
AT+RESET OK+RESET nothing
8. Query the remote host address successfully connected
Instructions The reply Parameters
AT+RADD? OK+RADD:MAC Address nothing
9. Inquire about 、 Set pairing password
Instructions The reply Parameters
Inquire about :AT+PASS? OK+PASS:[para1]
Set up :AT+PASS[para1] OK+Set:[para1]
Para1: 000000~999999
Default:000000
边栏推荐
- R language ggplot2 visualization: use the ggballoonplot function of ggpubr package to visualize the balloon graph (visualize the contingency table composed of two classification variables), and config
- cs224w(图机器学习)2021冬季课程学习笔记5
- R language tests the significance of correlation coefficient: use Cor The test function calculates the value and confidence interval of the correlation coefficient and its statistical significance (if
- Huawei applications have called the checkappupdate interface. Why is there no prompt for version update in the application
- 如何查找国内各大学本科学位论文?
- If food manufacturing enterprises want to realize intelligent and collaborative supplier management, it is enough to choose SRM supplier system
- NLP之NER:商品标题属性识别探索与实践
- 李宏毅《机器学习》丨3. Gradient Descent(梯度下降)
- OSS deletes all files two days before the current time
- Deep Packet Inspection Using Quotient Filter论文总结
猜你喜欢

华为应用已经调用了checkAppUpdate接口,为什么应用内不提示版本更新

NLP之NER:商品标题属性识别探索与实践

最详细的专利申请教程,教你如何申请专利

Unity URP入门实战

cs224w(图机器学习)2021冬季课程学习笔记5

晋拓股份上交所上市:市值26亿 张东家族企业色彩浓厚

Next generation visual transformer: Unlocking the correct combination of CNN and transformer

数据挖掘之数据预处理

The most detailed patent application tutorial, teaching you how to apply for a patent

Prometheus adds email alarm and enterprise wechat robot alarm
随机推荐
VS添加作者信息和时间信息的设置
晶品特装递交注册:第一季营收降80% 陈波控制68.5%股权
How to get 5L water in a full 10L container, 7L or 4L empty container
jmeter分布式
Zhaoqi science and technology innovation high-end talent project was introduced and implemented, mass entrepreneurship and innovation competition was organized, and online live roadshow was broadcast
R language ggplot2 visualization: use the ggdotplot function of ggpubr package to visualize dot plot, set the add parameter to add the mean and standard deviation vertical lines, and set the error.plo
9. Learn MySQL delete statement
数商云:引领化工业态数字升级,看摩贝如何快速打通全场景互融互通
oss删除当前时间前两天的所有文件
php反序列化部分学习
Driver development environment
FOC learning notes - coordinate transformation and simulation verification
Li Hongyi, machine learning 3. Gradient descent
R language uses LM function to build a multiple regression model with interactive terms, and uses step function to build a stepwise regression model to screen the best subset of predictive variables (
Soft test (VII) performance test (1) brief introduction
小白哪个券商开户最好 开户最安全
Cve-2022-33891 vulnerability recurrence
CVE-2022-33891 Apache spark shell 命令注入漏洞复现
Character function and string function and memory function
If food manufacturing enterprises want to realize intelligent and collaborative supplier management, it is enough to choose SRM supplier system