The article directories
-
- About hC-05 Bluetooth module
- Working mode
- Obtain the Bluetooth module address
- The two Bluetooth modules are bound to each other
-
- Setting of module A:
- Setting of module B:
- HC Bluetooth Module Reference
- SPP Bluetooth Module Reference
About hC-05 Bluetooth module
- Bluetooth module BT-HC05 module is a high-performance Bluetooth serial port module.
- Can be used for all kinds of bluetooth function computer, Bluetooth host, mobile phone, PDA, PSP and other intelligent terminal pairing.
- Wide baud rate range 4800~1382400, and modules
- Compatible with SCM system.
- When the two bluetooth modules in master/slave mode are paired successfully, you can simply change to wireless Bluetooth, making your device or product more advanced and fashionable.
- It is easy to use the bluetooth phone software provided
Working mode
Hc-05 embedded Bluetooth serial communication module has two working modes: command response working mode and automatic connection working mode. In automatic connection working mode, the module can be divided into Master, Slave and Loopback working mode. When the module is in automatic connection mode, it will automatically connect data transmission according to the preset mode. When the module is in command response mode, it can execute all the following AT commands. Users can send various AT commands to the module, set control parameters for the module or issue control commands. By controlling the input level of the external pin of the module (PIO11), the dynamic conversion of the working state of the module can be realized.
Obtain the Bluetooth module address
-
Hc-05 Bluetooth serial port module Connects to usB-TTL module, RX/TX cross connection
-
Long press the small button on the Bluetooth module
-
If the device is powered on and the red light blinks slowly, it indicates that the device enters the AT mode and you can configure Bluetooth parameters
-
Open “Bluetooth Test Software”, click the upper left corner to search the port, and click “Get module information” after finding the serial port number.
-
The following information is displayed in the message window on the left:
AT OK AT+VERSION? + VERSION: 2.0-20100601 OK AT + ADDR? +ADDR:98d3:32:7105fd OKCopy the code
Where 98D3:32:7 105fd after ADDR is the address of the current Bluetooth module, and the address of another module can be obtained in the same way.
A Module address: 98D3:32:10F0EA
B Module address: 98D3:32:7105FD
The two Bluetooth modules are bound to each other
We need to set module A as the host and module B as the slave, and bind the address of B to module A. When module A finds module B, it initiates active connection, thus forming A wireless serial port module.
Setting of module A:
- Restore default Settings
AT+ORGL
- Setting a Pair Password
AT+PSWD=1234
- A Set the host mode
AT+ROLE=1
- A binding B address:
The AT + BIND = 98 d3, 32710 5 fd
(Replace the colon with a, in the Bluetooth address)
Setting of module B:
- Restore default Settings
AT+ORGL
- Setting a Pair Password
AT+PSWD=1234
- B Set it to slave mode
AT+ROLE=0
Power on the two modules according to the above Settings. The two modules blink quickly and then blink slowly, indicating that the two modules are connected. You can use the two serial debugging assistants to test whether they are connected.
If you need to change the baud rate for communication, refer to the “HC05 Instruction Set “manual and use the commands AT+UART=,
Param1: baud rate (bits/s) The value is in decimal notation.
4800 9600 19200 38400 57600 115200 23400 460800 921600 1382400 Param2: Stops the 0-1-1-2 Param3 bits: Check bit 0 -- None 1 -- Odd 2 -- Even default: 9600,0,0Copy the code
The default baud rate is 9600. To change the baud rate to 115200, run AT+UART=115200,0,0
HC Bluetooth Module Reference
Hc-05 Bluetooth module test software
HC05 instruction set
HC Bluetooth module schematic diagram
Bluetooth WiFi debug phone APP_Android
SPP Bluetooth Module Reference
Spp-ca Bluetooth module technical manual
Selected historical articles:
- Jlink uses techniques to read STM32 internal programs
- Jlink uses the technique to download the HEX file to the microcontroller separately
- Jlink using skills j-Scope virtual oscilloscope function
- Baidu smart bracelet solution open source (including source code, schematic diagram, APP, communication protocol, etc.)
- How to generate Bin files in keil-MDK development environment
- Two ways to convert elf format files to HEX format files
- Two HC-05 Bluetooth modules are bound together to form a wireless serial port module
- Personal blog add netease cloud music Flash plug-in
- Two lines of code to count blog visits
Welcome to my personal blog
Or scan the code on wechat to follow my public number