KS0355 keyestudio HC-08 Bluetooth Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 208: Line 208:
| align="center" | OKsetADDR
| align="center" | OKsetADDR
| align="Light" | Modify the module's MAC address<br>
| align="Light" | Modify the module's MAC address<br>
(do not recommend to modify the module's MAC address to avoid conflicts)<br>
(do not recommend to modify the module's MAC address to avoid conflicts)<br>
Note: The address must be a 12-bit 0~F number or uppercase Character, that is a hexadecimal character. Query to fill in the "?”
Note: The address must be a 12-bit 0~F number or uppercase Character, that is a hexadecimal character. Query to fill in the "?”
|-
|-

Revision as of 16:02, 7 August 2018

Keyestudio UNO R3 Board


Overview

Keyestudio HC-08 Bluetooth module is a new digital transmission module, based on the Bluetooth Specification V4.0 BLE Bluetooth protocol. Its wireless working frequency band is 2.4GHz ISM, and the modulation method is GFSK. The module's default transmit power is 4dBm. Receive sensitivity -93dBm. The module is compatible with both Android and Apple systems. In an open environment, it can communicate with iphone4s, to achieve ultra-long-distance communication of 80 meters. It also comes with an LED status indicator. When using, you can directly see the connection state of Bluetooth. The module uses the CC2540F256 chip from TI, configured with 256K bytes of space, supporting the AT command. For need, the users can change the role (master or slave mode), baud rate of serial port, device name and other parameters, very flexible use.


Technical Details

  • Working voltage: DC 5V
  • Working frequency band: 2.4G
  • Air speed: 1Mbps
  • Communication interface: UART3.3VTTL level
  • Antenna interface: built-in PCB antenna
  • Sleep current: 0.4μA
  • RSSI support: not supported
  • Receive sensitivity: -93dBm@1Mbps
  • Communication level: 3.3V
  • Bluetooth version: V4.0
  • Modulation method: GFSK
  • Transmit power: 4dBm (default)
  • Reference distance: 80m
  • Working temperature: -25℃ to +75℃
  • Working humidity: 10% to 90%
  • Storage temperature: -40℃ to +85℃
  • Working current (excluding LED)
  • Host not connected / connected: 21mA / 9mA
  • Slave MODE0, not connected / connected: 8.5mA/9mA
  • Slave MODE1, not connected / connected: 6μA ~ 2.6mA / 1.6mA
  • Slave MODE2, not connected / connected: 0.4μA/1.6mA


AT Command Settings

Before setting the AT command, for hardware, you need a USB to serial module (such as FT232 module) and several DuPont lines. For software, need a serial port assistant software, and install well the driver for the USB to serial module. First, connect the Bluetooth module to FT232 module using DuPont line. The connection method is as follows.

HC-08 Bluetooth Module FT232 module
5V VCC(5V)
GND GND
TX RX
RX TX

Connected well, then connect the FT232 module (drive installation completed) to the computer using a USB cable. First right-click the computer, for properties ->Device Manager to find the corresponding COM port. Then open the serial port assistant software, set the COM port, and the baud rate (initial default 9600). After the connection is successful, you can start to set the AT command according to the instructions.


AT Command Instructions

1)Testing Instruction

Command Response Instruction
AT OK Test

2)Check the basic parameters

Command Response Instruction
AT+RX Name:HC-08-- >>>> user-defined name for Bluetooth

Role:Slave-->>>> module’s role(master/slave)
Baud:9600,NONE-->>>> serial baud rate, check bit.
Addr:xx,xx,xx,xx,xx,xx-->>>> Bluetooth Address
PIN :000000-->>>> Bluetooth password(invalid)

Inquire the basic parameters of module

3)Factory Data Reset Instruction

Command Response Instruction
AT+DEFAULT OK Factory Data Reset

Note: The slave address that the host has recorded will not be cleared! To clear, use the AT+CLEAR instruction to clear in the unconnected state.
The module will restart automatically, and a new operation can be performed after restarting for 200ms!

4)Module Restart Instruction

Command Response Instruction
AT+RESET OK restart the module

Note: The module will restart automatically, and a new operation can be performed after restarting for 200ms!

5)Check the software version

Command Response Instruction
AT+VERSION HC-08V3.1, 2017-07-07 view the software version and release date


6)Modify the module’s role

Command Response Instruction
AT+ROLE=x Master/Slave Set the Master/ Slave

Note: By Slave default, the module will automatically restart after setting.
A new operation can be performed after restarting for 200ms.

Send: AT+ROLE=M Return: Master ( to restart)
Send: AT+ROLE=? Return: Master (without restart)

7)Inquire and Modify the Bluetooth Name

Command Response Instruction
AT+NAME=xxx OKsetNAME Set the Bluetooth name

Note: Query to fill in the“?”, and set the Bluetooth name.
(Limited to 12 characters, support visual ASCII code and partial escape characters. The module supports Chinese character input, and Android device must be converted to "UTF8 encoding" to display properly. Send more than 12 characters, only recognize the first 12 characters. )
This command does not filter any characters. If you need Chinese characters, you can transcode them according to your own device format.

Send: AT+NAME=? Return: OK+NAME=HC-08
Send: AT+NAME=keyestudioReturn: OKsetNAME
Send: AT+NAME=? Return: OK+NAME=keyestudio


8)Inquire and Modify the Bluetooth Address

Command Response Instruction
AT+ADDR=xxxxxxxxxxxx OKsetADDR Modify the module's MAC address

(do not recommend to modify the module's MAC address to avoid conflicts)
Note: The address must be a 12-bit 0~F number or uppercase Character, that is a hexadecimal character. Query to fill in the "?”

Send: AT+ADDR=? Return: xxxxxxxxxxxx(current Bluetooth address of module)
Send: AT+ADDR=AABBCCDDEEFF Return: OKsetADDR
Send: AT+ADDR=? Return: AA,BB,CC,DD,EE,F