Difference between revisions of "Bluetooth 4.0 HM-10 Master Slave Module"
(Created page with "Bluetooth 4.0 HM-10 Master Slave Module Introduction Bluetooth 4.0 HM-10 Master Slave Module use TI CC2541, Master and slave roles in one, transmission version and remote cont...") |
|||
Line 1: | Line 1: | ||
− | + | =='''Introduction'''== | |
− | Introduction | + | |
Bluetooth 4.0 HM-10 Master Slave Module use TI CC2541, Master and slave | Bluetooth 4.0 HM-10 Master Slave Module use TI CC2541, Master and slave | ||
− | roles in one, transmission version and remote control version and PIO state acquisition functions in one, Support the AT command modify module parameters, Convenient and flexible. | + | roles in one, transmission version and remote control version and PIO state acquisition functions in one, Support the AT command modify module parameters, Convenient and flexible.<br> |
− | Transmission version can be used to transmit data between two Bluetooth devices. | + | '''Transmission version''' can be used to transmit data between two Bluetooth devices.<br> |
− | Remote Control version can be used to Control PIO ports output high or low level without any other MCU. | + | '''Remote Control version''' can be used to Control PIO ports output high or low level without any other MCU.<br> |
− | + | '''PIO state acquisition version''' can be used to acquisition PIO ports state without any other MUC. (Only support Bluetooth V2.1) | |
− | state without any other MUC. (Only support Bluetooth V2.1) | + | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Pin Description: | + | =='''Parameter'''== |
− | STATE: state test pins, connected to internal LED, generally keep it unconnected. | + | '''Bluetooth Protocol''': Bluetooth Specification V4.0 BLE <br> |
− | BRK: break connect, it means breaking Bluetooth connection, generally keep it unconnected. | + | '''USB Protocol''': USB V2.0 <br> |
− | VCC: positive pole of the power source. | + | '''Operating Frequency''': 2.4GHz ISM band <br> |
− | GND: Ground. | + | '''Modulation Mode''': GFSK (Gaussian Frequency Shift Keying) <br> |
− | TXD: serial interface, transmitting terminal. | + | '''Transmitting Power''': ≤4dBm <br> |
− | RXD: serial interface, receiving terminal. | + | '''Sensitivity''': ≤-84dBm at 0.1% BER <br> |
− | Test method | + | '''Transmission Rate''': Asynchronous: 6 kbps <br> |
− | Using SunFounder Uno | + | '''Synchronous''': 6 kbps <br> |
− | Step 1: You should compile and upload the code before building the circuit | + | '''Security Feature''': Authentication and encryption <br> |
+ | '''Support Service''': Central & Peripheral UUID FFE0, FFE1 <br> | ||
+ | '''Power Supply''': +5VDC 50mA <br> | ||
+ | '''Operating Temperature''': -5 ~ +65 Centigrade <br> | ||
+ | '''Physical Dimension''': 27mm x 13mm x 2.2 mm. <br> | ||
+ | |||
+ | =='''Pin Description:'''== | ||
+ | '''STATE''': state test pins, connected to internal LED, generally keep it unconnected.<br> | ||
+ | '''BRK''': break connect, it means breaking Bluetooth connection, generally keep it unconnected.<br> | ||
+ | '''VCC''': positive pole of the power source.<br> | ||
+ | '''GND''': Ground.<br> | ||
+ | '''TXD''': serial interface, transmitting terminal.<br> | ||
+ | '''RXD''': serial interface, receiving terminal.<br> | ||
+ | =='''Test method'''== | ||
+ | ===Using SunFounder Uno=== | ||
+ | '''Step 1''': You should compile and upload the code before building the circuit<br> | ||
+ | <pre> | ||
/****************************************/ | /****************************************/ | ||
#define ledPin 13 // //pin 13 built-in LED light | #define ledPin 13 // //pin 13 built-in LED light | ||
Line 58: | Line 57: | ||
} | } | ||
/****************************************/ | /****************************************/ | ||
− | Step2: Connecting circuit | + | </pre> |
− | Bluetooth 4.0 SunFounder Uno Board | + | '''Step2''': Connecting circuit |
− | VCC 5V | + | <center> |
− | GND GND | + | {| border="1" class="wikitable" |
− | TXD RX0(pin0) | + | !scope="col" |Bluetooth 4.0 |
− | RXD TX0(pin1) | + | !scope="col" |SunFounder Uno Board |
+ | |- | ||
+ | |VCC | ||
+ | |5V | ||
+ | |- | ||
+ | |GND | ||
+ | |GND | ||
+ | |- | ||
+ | |TXD | ||
+ | |RX0(pin0) | ||
+ | |- | ||
+ | |RXD | ||
+ | |TX0(pin1) | ||
+ | |} | ||
+ | |||
Figure 1 | Figure 1 | ||
− | Step 3: You need to download a Bluetooth 4.0 debugging assistant for mobile phone to connect your phone with the Bluetooth4.0 module. We've provided the tool in Android. Just download BleSerialPort.zip on your smart phone and decompress. Then you can see a file BleSerialPort. Enable Bluetooth on your phone and install the BleSerialPort. | + | </center> |
+ | |||
+ | '''Step 3''': You need to download a Bluetooth 4.0 debugging assistant for mobile phone to connect your phone with the Bluetooth4.0 module. We've provided the tool in Android. Just download BleSerialPort.zip on your smart phone and decompress. Then you can see a file BleSerialPort. Enable Bluetooth on your phone and install the BleSerialPort.<br> | ||
− | Open the installed app, as shown in Fig 1. Click icon at the top right corner. Then click the connect (Fig 2). Find HMSoft and click. | + | Open the installed app, as shown in Fig 1. Click icon at the top right corner. Then click the connect (Fig 2). Find HMSoft and click.<br> |
− | + | ||
− | After connecting mobile phone or other Bluetooth device and Bluetooth-4.0 module successfully (Fig 4), the LED indicator on the Bluetooth module will be steady on (stop blinking). Otherwise, the LED indicator will keep blinking. | + | After connecting mobile phone or other Bluetooth device and Bluetooth-4.0 module successfully (Fig 4), the LED indicator on the Bluetooth module will be steady on (stop blinking). Otherwise, the LED indicator will keep blinking. <br> |
− | Now you can send commands. Send a character A to the Bluetooth-4.0 module. If the communication works normally, on the surface you can see A sent out and Rebecca returned. Then the LED on the SunFounder UNO board will blink once. | + | Now you can send commands. Send a character A to the Bluetooth-4.0 module. If the communication works normally, on the surface you can see A sent out and Rebecca returned. Then the LED on the SunFounder UNO board will blink once.<br> |
− | |||
− | |||
− | |||
− | |||
− | Bluetooth 4.0 PL2303 | + | ===Using AT Commands=== |
− | VCC VCC | + | '''Step 1''': wire.<br> |
− | GND GND | + | Connect TXD of Bluetooth 4.0 Module to RXD of PL2303, RXD to TXD, GND to GND, and VCC to VCC. PL2303 is a USB to Serial Bridge Controller. You can also use other components, such as FTDI.<br> |
− | TXD RX0(pin0) | + | {| border="1" class="wikitable" |
− | RXD TX0(pin1) | + | |Bluetooth 4.0 |
+ | |PL2303 | ||
+ | |- | ||
+ | |VCC | ||
+ | |VCC | ||
+ | |- | ||
+ | |GND | ||
+ | |GND | ||
+ | |- | ||
+ | |TXD | ||
+ | |RX0(pin0) | ||
+ | |- | ||
+ | |RXD | ||
+ | |TX0(pin1) | ||
+ | |} | ||
− | |||
− | |||
− | Step | + | ''Step 2''':set parameters<br> |
− | After wiring, open the serial port debug tool sscom32. Set parameters at first. | + | After wiring, open the serial port debug tool sscom32. Set parameters at first.<br> |
− | 1) Open the serial port, click Open Com. Select the correct port, as shown below. | + | 1) Open the serial port, click Open Com. Select the correct port, as shown below.<br> |
− | 2) Select the correct baud rate. Here select 9600 bps.Default: 9600, as shown below. | + | 2) Select the correct baud rate. Here select 9600 bps.Default: 9600, as shown below.<br> |
− | + | '''Step3''': Now, you can start to send instructions. Enter”AT” in the text box. If Bluetooth 4.0 Module goes well, OK will be sent, as shown below:<br> | |
− | Also you can send AT+NAME?. OK+NAME:HMSoft will be returned . | + | Also you can send AT+NAME?. OK+NAME:HMSoft will be returned .<br> |
− | Send AT+BAUD? OK+Get:0 will be returned. Default: 0(9600) | + | Send AT+BAUD? OK+Get:0 will be returned. Default: 0(9600)<br> |
For more information about Bluetooth 4.0 AT Instructions. please refer to Bluetooth 4.0 BLE module datasheet.pdf | For more information about Bluetooth 4.0 AT Instructions. please refer to Bluetooth 4.0 BLE module datasheet.pdf |
Revision as of 09:46, 21 March 2016
Contents
Introduction
Bluetooth 4.0 HM-10 Master Slave Module use TI CC2541, Master and slave
roles in one, transmission version and remote control version and PIO state acquisition functions in one, Support the AT command modify module parameters, Convenient and flexible.
Transmission version can be used to transmit data between two Bluetooth devices.
Remote Control version can be used to Control PIO ports output high or low level without any other MCU.
PIO state acquisition version can be used to acquisition PIO ports state without any other MUC. (Only support Bluetooth V2.1)
Parameter
Bluetooth Protocol: Bluetooth Specification V4.0 BLE
USB Protocol: USB V2.0
Operating Frequency: 2.4GHz ISM band
Modulation Mode: GFSK (Gaussian Frequency Shift Keying)
Transmitting Power: ≤4dBm
Sensitivity: ≤-84dBm at 0.1% BER
Transmission Rate: Asynchronous: 6 kbps
Synchronous: 6 kbps
Security Feature: Authentication and encryption
Support Service: Central & Peripheral UUID FFE0, FFE1
Power Supply: +5VDC 50mA
Operating Temperature: -5 ~ +65 Centigrade
Physical Dimension: 27mm x 13mm x 2.2 mm.
Pin Description:
STATE: state test pins, connected to internal LED, generally keep it unconnected.
BRK: break connect, it means breaking Bluetooth connection, generally keep it unconnected.
VCC: positive pole of the power source.
GND: Ground.
TXD: serial interface, transmitting terminal.
RXD: serial interface, receiving terminal.
Test method
Using SunFounder Uno
Step 1: You should compile and upload the code before building the circuit
/****************************************/ #define ledPin 13 // //pin 13 built-in LED light int val; void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); } void loop() { if(Serial.available()) // { val = Serial.read(); if(val =='A') //if comes a 'A',LED on control board will blink { digitalWrite(ledPin, HIGH); delay(500); digitalWrite(ledPin, LOW); delay(500); Serial.println("Rebecca"); //print on Serial debugging assistant on computer } } } /****************************************/
Step2: Connecting circuit
Bluetooth 4.0 | SunFounder Uno Board |
---|---|
VCC | 5V |
GND | GND |
TXD | RX0(pin0) |
RXD | TX0(pin1) |
Figure 1
Step 3: You need to download a Bluetooth 4.0 debugging assistant for mobile phone to connect your phone with the Bluetooth4.0 module. We've provided the tool in Android. Just download BleSerialPort.zip on your smart phone and decompress. Then you can see a file BleSerialPort. Enable Bluetooth on your phone and install the BleSerialPort.
Open the installed app, as shown in Fig 1. Click icon at the top right corner. Then click the connect (Fig 2). Find HMSoft and click.
After connecting mobile phone or other Bluetooth device and Bluetooth-4.0 module successfully (Fig 4), the LED indicator on the Bluetooth module will be steady on (stop blinking). Otherwise, the LED indicator will keep blinking.
Now you can send commands. Send a character A to the Bluetooth-4.0 module. If the communication works normally, on the surface you can see A sent out and Rebecca returned. Then the LED on the SunFounder UNO board will blink once.
Using AT Commands
Step 1: wire.
Connect TXD of Bluetooth 4.0 Module to RXD of PL2303, RXD to TXD, GND to GND, and VCC to VCC. PL2303 is a USB to Serial Bridge Controller. You can also use other components, such as FTDI.
Bluetooth 4.0 | PL2303 |
VCC | VCC |
GND | GND |
TXD | RX0(pin0) |
RXD | TX0(pin1) |
Step 2':set parameters
After wiring, open the serial port debug tool sscom32. Set parameters at first.
1) Open the serial port, click Open Com. Select the correct port, as shown below.
2) Select the correct baud rate. Here select 9600 bps.Default: 9600, as shown below.
Step3: Now, you can start to send instructions. Enter”AT” in the text box. If Bluetooth 4.0 Module goes well, OK will be sent, as shown below:
Also you can send AT+NAME?. OK+NAME:HMSoft will be returned .
Send AT+BAUD? OK+Get:0 will be returned. Default: 0(9600)
For more information about Bluetooth 4.0 AT Instructions. please refer to Bluetooth 4.0 BLE module datasheet.pdf