High Flying Electronics Technology HF BL100 CU User Manual

HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
HF-BL100-CU
Bluetooth Low EnergyBLE 4.0 Module
User Manual
V 1.2
Support IEEE 802.15.1 BT4.0 Wireless Standard
Support wireless upgrade OTA
UART Transparent Transmit Module
Supper low sleep mode power 1.3uAexcellence power save scheme
Unique stop mode, 60nA power
Support internal antenna
Single 1.9V~5.5V power supply
Smallest size : 22.8mm x 15.4mm x 2mm
ROHS compliance
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 1 -
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Table of Contents
LIST OF FIGURES ..................................................................................3
LIST OF TABLES ...................................................................................6
1. PRODUCT OVERVIEW .........................................................................9
1.1. General Description ........................................................................9
1.2. Device Feature .............................................................................8
1.3. Key Application ............................................................................9
1.4. Device Parameter ........................................................................ 10
1.5. Order Information .........................................................................9
2. HARDWARE INTRODUCTION .............................................................. 12
2.1. Pin Definition ............................................................................. 12
2.2. Electrical Specification .................................................................. 14
2.3. Mechanical Size .......................................................................... 17
2.4. Antenna Layout .......................................................................... 17
3. UART TRANSAPARENT TRANSMIT MODE ............................................... 18
3.1. Transparent Transmit Mode ............................................................ 19
3.2. Transparent Transmit Pin Definition ................................................... 21
3.3. Factory Default Parametet ............................................................. 21
3.3.1. Device Name ............................................................................ 22
3.3.2. Broadcast Parameter ................................................................... 21
3.3.3. Transmit Power ......................................................................... 21
3.3.4. Connect Parameter ..................................................................... 23
3.3.5. Baudrate ............................................................................... 23
3.3.6. Send Latency parameter .............................................................. 22
4. UART AT COMMAND DEFINITION ...................................................... 23
4.1. Module Operation Mode Configure ..................................................... 23
4.2. ATCommand Overview ................................................................. 23
4.2.1. Command Format ....................................................................................................................... 25
4.2.2. Command List ............................................................................................................................. 26
4.3. AT Command ............................................................................. 27
4.3.1. Help Command........................................................................................................................... 28
4.3.2. Set Module NAME .................................................................................................................. 27
4.3.3. Query Module NAME ............................................................................................................. 28
4.3.4. Set Connect Parameter ......................................................................................................... 28
4.3.5. Query Connect Parameter .................................................................................................... 29
4.3.6. Set Baudrate ............................................................................................................................ 31
4.3.7. Query Baudrate ......................................................................................................................... 30
4.3.8. Reserved ..................................................................................................................................... 31
4.3.9. Get MAC Address .................................................................................................................... 31
4.3.10. Query Software Version ....................................................................................................... 31
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 2 -
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
4.3.11. Set Transmit Power ............................................................................................................ 31
4.3.12. Query Transmit Power ....................................................................................................... 32
4.3.13. Set Broadcast Parameter ................................................................................................. 33
4.3.14. Query Broadcast Parameter ............................................................................................ 34
4.3.15. Set User-define Broadcast Data ................................................................................... 34
4.3.16. Query User-define Broadcast Data ............................................................................. 35
4.3.17. Set Auto-Broadcast Switch ............................................................................................. 35
4.3.18. Query Auto-broadcast Switch ........................................................................................ 35
4.3.19. Start Broadcast .................................................................................................................... 37
4.3.20. Stop Broadcast ...................................................................................................................... 36
4.3.21. Query Current BLE Subsystem Status ....................................................................... 37
4.3.22. Disconnect .............................................................................................................................. 39
4.3.23. Set Device Verify Code ..................................................................................................... 38
4.3.24. Query Device Verify Code .................................................................................................. 39
4.3.25. Set UART Output Data Latency ................................................................................... 39
4.3.26. Save Parameter ..................................................................................................................... 41
4.3.27. Module Restore ...................................................................................................................... 41
4.3.28. Set Module Operate Mode ............................................................................................... 41
4.3.29. Reserved.................................................................................................................................. 42
4.3.30. Reserved.................................................................................................................................. 42
4.3.31. Reserved.................................................................................................................................. 42
4.3.32. Reserved.................................................................................................................................. 42
4.3.33. Module BLE Subsystem Status Notification .............................................................. 42
4.3.34. Module CPU Status Notification .................................................................................... 42
4.3.35. Restore Factory Setting via AT Command ..................................................................... 43
4.3.36. Enable Module Deep Sleep .................................................................................................. 43
4.3.37. Restore Facotry Setting via Hardware Method ......................................................... 44
4.3.38. Reserved.................................................................................................................................. 44
5. Read Electricity ............................................................................. 45
5.1. Read Eectricity Channel configuration (temporarily unavailable.) .................... 45
5.2. Electricity Data Description ............................................................ 45
6. APPLICATION OTA ......................................................................... 46
6.1. OTA Channel Configure .................................................................. 46
6.2. OTA Data Description ................................................................... 46
7. APP COMMAND .............................................................................. 47
7.1. Channel and Data Description ........................................................... 47
7.2. Data Format .............................................................................. 48
7.3. Command Content ........................................................................ 49
7.3.1. Command Type0x0E .............................................................................................................. 48
7.3.2. Command Type:0x0F ............................................................................................................ 48
8. Basic Communication Mechanism............................................................ 50
8.1. Application Service Data ChannelUser-define application service UUID0x2B00 ....... 50
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 3 -
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
8.1.1. Module->APP, UART Data ChannelFeature UUID:0x2B10 ....................................... 50
8.1.2. APP->ModuleUART Data ChannelFeature UUID:0x2B11 ...................................... 51
8.1.3. APP->ModuleOTA Mode SwitchFeature UUID:0x2B12 ....................................... 51
8.1.4. APP->ModuleAPP Command ChannelFeature UUID:0x2B13 ................................. 51
8.2. Battery Service Data Channel .......................................................... 52
8.2.1. APP->ModuleBattery Data ChannelFeature UUID:0x2A19 ................................. 52
8.3. OTA Service Data Channel .............................................................. 52
8.3.1. APP->ModuleOTA Data Channel ......................................................................................... 52
9. TEST .......................................................................................... 54
9.1. Test Transparent Transmit Function .................................................. 53
9.2. Test Battery Electricity Read .......................................................... 55
9.2.1. Electricity Read Command ............................................................ 55
9.2.2. Electricity Display .................................................................... 54
9.3. OTA Function Test ...................................................................... 55
9.3.1. Get Module firmware Version ......................................................... 55
9.3.2. Switch to OTA mode .................................................................. 55
9.3.3. OTA .................................................................................... 55
10. PACKAGE INFORMATION ................................................................ 56
10.1. Reflow Soldering Profile .............................................................. 56
10.2. Handling Instruction ................................................................... 56
10.3. Shipping Information ................................................................... 57
APPENDIX A: UART TRANSPARENT TRANSMIT TYPICAL APPICATION ........... 58
APPENDIX B: MODULE SCHEMATIC ........................................................ 60
APPENDIX C: EVK SCHEMATIC .............................................................. 62
APPENDIX D: CONTACT INFORMATION .................................................. 64
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 4 -
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
LIST OF FIGURES
Figure 1. HF-BL100-CU Order Information ............................................................................................. 10
Figure 2. HF-BL100-CU Pin Definition ....................................................................................................... 11
Figure 3. HF-BL100-CU Mechanical Size ................................................................................................. 16
Figure 4. HF-BL100-CU PCB Antenna Position ......................................................................................... 17
Figure 5. HF-BL100-CU Module Reference Placement ......................................................................... 17
Figure 6. Basic HF-BL100-CU Wireless Network Structure ............................................................... 18
Figure 7. HF-BL100-CU Default UART Parameter ................................................................................. 23
Figure 8. ”AT:HELP” List All Command ...................................................................................................... 24
Figure 9. Module UART Output Data Latency set Map .................................................................... 40
Figure 10. Module UART Receive Enable Data Map .............................................................................. 44
Figure 11. APP Scan & Connect Interface .............................................................................................. 53
Figure 12. APP Receive notify Interface ................................................................................................ 54
Figure 13. MCU Receive write Data Interface ...................................................................................... 54
Figure 14. Reflow Soldering Profile ....................................................................................................... 56
Figure 15. Package Information ................................................................................................................ 58
Figure 16. UART Transparent Transmit Typical Application ......................................................... 58
Figure 17. HF-BL100-CU Module Schematic(一) .............................................................................. 60
Figure 18. HF-BL100-CU EVK TOP VIEW(二) ................................................................................... 60
Figure 19. HF-BL100-CU EVK BOTTOM VIEW(三) ......................................................................... 61
Figure 20. EVK power and USB to UART Circuit(一) .................................................................... 62
Figure 21. EVK Interface Circuit (二) ............................................................................................... 62
Figure 22. EVK Interface Circuit(三) ................................................................................................ 63
LIST OF TABLES
Table 1 HF-BL100-CU Module Technique Specification ........................................................................... 9
Table 2 HF-BL100-CU Pin Function Definition ........................................................................................... 11
Table 3 Limited Specification ...................................................................................................................... 13
Table 4 Electrical Specification .................................................................................................................. 13
Table 5 RF Specification ............................................................................................................................... 14
Table 6 Work Mode and System Status .................................................................................................... 14
Table 7 AD Convertor Function Module DC Parameter Map .................................................................. 15
Table 8 Module Connect Interval 20ms Communication Mode Example ........................................... 20
Table 9 Error Code List ................................................................................................................................ 25
Table 10 AT Command List ........................................................................................................................... 25
Table 11 Command Data from APP to Module ........................................................................................... 47
Table 12 Feedback Data from Module to APP........................................................................................... 47
Table 13 Command Type 0x0F Command List ............................................................................................ 48
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 5 -
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Table 14 Command Type 0x0F Feedback List ............................................................................................ 49
Table 15 Description of User-define Service of All Channnel .......................................................... 50
Table 16 0x2B10 Feature UART module->APP Channel Description ................................................ 50
Table 17 0x2B11 Feature UART APP->module Channel Dexcription ............................................... 51
Table 18 0x2B12 Feature OTA Mode Switch Channel Description ................................................. 51
Table 19 0x2B13 Feature APP Command Channel Descritpion ........................................................... 51
Table 20 Description of Battery Service of All Channel ..................................................................... 52
Table 21 0x2A19 Feature Battery Channel Description ...................................................................... 52
Table 22 Description of OTA Service of All Channel ......................................................................... 52
Table 23 00060001-F8CE-11E4-ABF4-0002A5D5C51B Feature OTA Data Channel Description52
Table 24 Reflow Soldering Specification .................................................................................................. 56
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 6 -
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
History
V1.0 08-25-2015. First Version
V1.1 09-01-2015. Update OTA and Add Battery service
V1.2 10-30-2015. Update APP AT Command format.
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 7 -
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
1. PRODUCT OVERVIEW
1.1. General Description
HF-BL100-CU Bluetooth Low Energy module is a high performance IOT module designed by High Flying. It is based on Cypress chip, and provide a solution for connecting things to Bluetooth wireless network and data transmit ting via UART interface. With the feature of low power, small size, high anti-interference performance, the module integrates PCB antenna and use open stamp type interface which enable customer have more flexibility on software and product structure , and solve the RF hardware design and debug issue.
1.2. Device Feature
Smallest size 22.8mm x 15.4mm x 2mm With 32 bit high performance RISC 48MHz ARM M0 MCUMCU build-in 16KB SRAM
and 128KB Flash
1.9V~5.5V Single power supply Support low power & multiple level power management mode Full peripheral
GPIO interface Serial CommunicationUART application
ADC interface FCC/CE/BQB ROHS compliance
1.3. Key Application
Smart LED lighting Smart toy Electronic Scale Smart Cup Smart Home Appliance OBD IOT, Smart Home Automation Sports, fitness, consumer electronics products Smart instrument, data acquisition ,sensor PCTablet peripheral
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 8 -
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Class
Item
Condition
Parameter
Wireless paramete r
Certificate
Wireless standard
802.15.1
Frequency range
2.402GHz-2.480GHz
Data rate
1Mbps@2.4GHz
Tx power
Max=+3 dBmMin=-18dBm
Rx sensitivity
-89 dBm
Hardwar e paramete r
Data interface
UART GPIO ADC
Operating voltage
1.9~5.5V
BLE Subsystem current Tx power=0 dBmTx peak current
15.6mA Rx peak current
16.4mA
Tx power=0 dBm broadcast interval=1s
18.9uA
Tx power=0 dBm connect interval=1s
18.9uA
CPU Subsystem current Run
850uA+260uA*per MHz
Sleep @3MHz
1.1mA
Deep sleep
1.3uA
hibernate
150nA
Stop
60nA
Work temperature
-40- 85
Storage temperature
-45- 125 Size
22.8mm x 15.4mm x 2mm
1.4. Device Parameter
Table 1 HF-BL100-CU Module Technique Specification
Power details refer to Table 6
1.5. Order information
As per customer demand, HF-BL100-C can provide variant physical version, detail part
number as below:
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 9 -
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
HF-BL100-CU
Part number
CU->UART
Module Version
BL100->Bluetooth BLE Single mode
Company name
HF->Hi-Flying
Figure 1. HF-BL100-CU order information
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 10
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Pin
Net name
Description
1
GND
Ground
2
NC
NC
3
XRES
Module reset
4
SWCLK
SWD clock interface, firmware burn
5
SWDATA
SWD data interface, firmware burn
6
NC
NC
7
NC
NC
8
NC
NC
9
NC
NC
10
NC
NC
2. HARDWARE INTRODUCTION
2.1. Pin Definition
TOPVIEW
Figure 2. HF-BL100-CU Pin Definition
Table 2 HF-BL100-CU Pin Function Definition
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 11
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
11
NC
NC
12
NC
NC
13
NC
NC
14
NC
NC
15
NC
NC
16
NC
NC
17
NC
NC
18
NC
NC
19
VBAT
+1.9V~+5.5V module power input
20
NC
NC
21
NC
NC
22
NC
NC
23
NC
NC
24
NC
NC
25
NC
NC
26
ADC0
Analog input
27
NC
NC
28
BCTS
BCTSmodule send advanced signal data, wake external MCU
29
MANUFACTURE
Restore factory setting
30
UART_TX
UART send data
31
UART_RX
UART receive data
32
WAKEUP
Enable system deep sleep & wake up STOP mode
33
GND
Module ground
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 12
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Parameter
Description
Min Value
Typ. Value
Max value
Unit
VDDD_ABS
Analog, digital, or radio supply relative to VSS (VSSD = VSSA)
-0.5
- 6 V
VCCD_ABS
Direct digital core voltage input relative to VSSD
-0.6
-
1.95
V VGPIO_ABS
Maximum current per GPIO
-25 - 25
mA
IGPIO_injection
GPIO injection current, Max for VIH > VDDD, and Min for VIL < VSS
-0.5
0.5
mA ESD_HBM
Electrostatic discharge human body model
2200
V LU
Pin current for latch up
-200
200
mA
Storage temperature
-45
125
°C
Max solder temperature
IPC/JEDEC J-STD-020
260
°C
Parameter
Condition
Min Value
Typ. Value
Max Value
Uni t
Work voltage
1.9
3.3
5.5 V BLE Subsystem
Tx peak current
Tx power =0DB
15.6
mA
Rx peak current
16.4
mA
Broadcast mode average
current
Tx power =0DBbroadcast interval=1s
18.9
uA
Connect mode current
Connect power=0DBconnect interval=1s
18.9
uA
CPU application subsystem
Operate mode
System clock=48Mhz algorithm0.85+0.26*48
13.4
mA System clock =24Mhz
7.1 mA System clock=12Mhz
4
mA System clock=6Mhz
2.5 mA System clock=3Mhz
1.7 mA
Sleep mode
Run at 3Mhz
1.1 mA
Deep sleep mode
ECO stopWCO work
1.3 uA
Stop mode
ECO stop , WCO work
60 nA
2.2. Electrical Specification
Table 3 Limited Specification
Table 4 Electrical Specification
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 13
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Parameter
Condition
Min value
Typ. Value
Max value
Unit
Rx sensitivity
-89 dBm
Frequency offset tolerance
225
250
275
KHz
Frequency drift
-50 50
KHz
In-Band blocking rejection
2 MHz offset
-20
dB
>=3 MHz offset
-30
dB Output power
0 3 dBm
Standard frequency
2400
2482
MHz
Frequency tolerance
±50
Ppm
Signal strength
accuracy
±5 dBm Signal accuracy
1 dBm
Signal sampling
interval
6 uS Channel band
2 MHz
Effective data
rate
1 Mbps
Work mode
Current
Code run
External digital module
Extern al analog module
Clock sour ce
Wakeup source
Wake up time
Active
850uA+260u A per MHz
Yes
All
All
All - -
sleep
1.1mA at 3MHz
No
all
All
All
Any interrupt source
0
Deep sleep
1.3uA
No
WDT, LCD, I2C/SPI, Link-Layer
POR, BOD
WCO , ILO
GPIO, WDT, I2C/SPI Link Layer
25uS
hibernate
150nA
No
No
POR, BOD
No
GPIO
2mS
stop
60nA
No
No
No
No
WAKEUP ,XRES
2mS
Table 5 RF specification
Table 6 Work Mode and System Status
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 14
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Parameter
Description
Min. value
Typ. value
Max value
Unit
Remark
A_RES
Resolution
- - 12
bits
-
A_CHNIS_S
Number of channels – single-ended
- - 1 - 1 full speed A-MONO
Monotonicity
- - - - YES
A_ISAR
Current consumption
- - 1
mA
A_VINS
Input voltage range – single-ended
VSS
-
VDDA
V A_INRES
Input resistance
- - 2.2
kΩ
A_INCAP
Input capacitance
- - 10
pF
VREFSAR
Trimmed internal reference to SAR
-1 - 1 % Percentage of Vbg (1.024 V)
Table 7 AD Convertor Module DC Parameter Map
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 15
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
2.3. Mechanical size
HF-BL100-CU physical size unit: mmas below:
Module padsize 22.8mm X 15.4mm pad space 1mm
Figure 3. HF-BL100-CU Mechanical size
2.4. Antenna Layout
HF-BL100-CU support internal antenna. Antenna layout refer to Figure 4. Customer need to
obey following antenna design rules and module location suggestions:
For user PCB, place module on the edge area of the PCB as possible, or suspend the
antenna area.
Module antenna22.8mmx7mmcorrespondent area cant put components or paste
GND, the surrounding components or GND should be as far as possible from antenna place.
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 16
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Antenna must away from high components at least 10mm
Antenna cant be shielded by any metal enclosure.
Figure 4. HF-BL100-CU PCB antenna position
High Flying suggest to locate HF-BL100-CU as Figure 5 shown to reduce the influence to antenna and wireless signal as much as possible, or contact High Flying technique people for support
Figure 5. HF-BL100-CU Module Reference Placement
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 17
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
3. UART TRANSPARENT TRANSMIT
MODE
3.1. Transparent Transmit Mode
Transparent Transmit means the two way communication between device and mobile terminal
via the connecting with serial interface and device MCU. Device can set HF-BL100-CU baud rate and connect interval via AT command through serial interface (refer to Serial AT command Description for details). Target different baud rate and BLE connect interval or different packet sending interval, module would have different data handling capacity. The default baud rate of HF-BL100-CU is 115200bps, it is recommended to set baud rate at 115200bps when transmitting big data or in highly real-time application. Baud rate support save after power off.
Figure 6. Basic HF-BL100-CU wireless network structure
Module BLE connect interval is 20ms, and able to send utmost 200 byte data one time via serial interface. Theoretically module able to send data up to 4KB/S. Below is the detail description about transparent transmit.
Module can receive utmost 200 byte data from serial interface one time. Module will automatically send sub-packet according to data size, each packet limit is 20 bytes. The data packet sending from mobile device to module must separated to sub-packet(1-20 byte each). After receive the sub-packets, module will send to MCU in proper order.
Serial hardware protocol:115200 bps , 8, non-parity1 stop bit
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 18
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
After receive data from MCU serial, module will judge if it is AT command, if it is, module will execute the command, if not, module will transmit the data to APP under BLE connection and notify mode enabled status.
After module receive APP data, output the data to MCU via serial interface.
If module system status changed, module will send status notification character to MCU,
such as disconnect, connect, broadcast.
Bluetooth protocol require that the minimum connect interval is 7.5ms. Default connect interval is 20ms (comply with IOS regulation), if need to save power and apply low speed transmit mode, user can adjust connect interval through AT command ( the maximum connect interval is 2000ms, comply with IOS regulation)
The calculation of transmit speed : the data packet of each connect interval from APP to module is 1 packet, max 4 packet can be transmit from module to APP in each interval (the packet qty is related to module CPU capacity) . There is max 20 bytes in each packet, if connect interval is T (unit :ms), then max transmit speed V (unit is byte/s) is :
Vmodule = 20*4*1000/T (V only related T )
Vapp=20*1000/T (V only related T )
Vapp if module connect interval is 20ms, then each interval can transmit max 20 bytes, so
theoretically the max speed is 20x50 =1k byte/s. Test shows the transmit from APP to module is stable and reliable.
Vmodule if module connect interval is 20ms, then each interval can transmit max 80 bytes,
so theoretically the max speed is 80x 50=4k byte/s. Test shows that if transmit speed under 2kbyte/s, there is few chances of leaking packet. For safety consideration, it is recommended to do verification and re-transmit at up level whatever it is low speed or high speed application. In Android application, it is recommended to lower connect interval to increase speed.
Below is the example of 20ms connect interval communication mode, user can self-configure.
The lower the Speed, the lower the packet lost ratio.
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 19
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Table 8 Module connect interval 20ms communication mode example
Remark user can set particular communication mode according to actual application, packet
length can be set between 80byte < L < 200byte the relationship as below as per BLE protocol:
If L<80 TS >= T
If 80<L<160 TS >= T*2
If 160<L<200 TS >= T*3
All transmit mode is safe as long as meet above conditions, TS=T is recommended, TS=T*2TS=T*3 is ok but the packet lost ratio is high, must add verification and re-transmit mechanism. In another words, if apply 80byte < L < 200byte ,serial data can transmit to module in one time, but need to reserve time for sending data from module to Bluetooth, or there will occur rear-end. E.g. Set connect interval T=20ms, if data length is L=200, TS must over T*3 = 60ms , TS=70ms is a reasonable choice.
Serial data length can be any value under 200 byte. In order to achieve the best efficiency and avoid full load operation , it is recommended to use 20,40,60 byte serial data packet, set packet interval over 20ms.
Remarkin IOS, the function used to call Characteristic is:
BCharacteristicWriteWithRespons
e parameter, write with response mode would lower transmit efficiency to ensure the accuracy of each packet, use CBCharacteristicWriteWithoutResponse ; write without response mode would promote transmit efficiency , but the accuracy of packet need to be verified by APP up level.
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 20
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
3.2. Transparent Transmit Mode Pin Description
All pins of Transparent Transmit UART_TXUART_RXWAKEUPBCTSXRES MANUFACTURE
Min. pins of Transparent TransmitUART_TXUART_RXWAKEUP
Details refer to Appendix A
WEAKEUP: inside high impedance, pin must be connected, pull up to stop UART receive function. UART unable to receive data (UART able to send data), pull down to enable UART to receive data.
MANUFACTURE: pull down inside ,can be no connection, pull up outside and power on or reset, keep high level MANUFACTURE at least 5 second, module restore factory setting
XRES: pull up inside, can be no connection
BCTS: in normal time, output low level; BCTS output high level before sending data from module, after sending , BCTS output low level.
3.3. Factory Default Parameter
3.3.1. Device Name
Device NAME”HF-BL100-CU”
3.3.2. Broadcast Parameter
Broadcast Min. interval“0800”, means 500ms
Broadcast Max. interval:“0800”, means 500ms
Broadcast type“0” means public
Broadcast channel “7”means apply channel index 37 38 39
3.3.3. Transmit Power
Broadcast transmit power ”8” means 0dbm
Connect transmit power”8” means 0dbm
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 21
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
3.3.4. Connect Parameter
Min interval ”0016”, means 20ms
Max interval”0032”, means 40ms
Slave Latency”0”, means 0
Connect timeout”0200”, means 2000ms
3.3.5. Baud rate
Baud rate“115200”
3.3.6. Send Latency Parameter
Serial sending Latency “01” means 1ms
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 22
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
4. UART AT COMMAND DEFINITION
4.1. Module Operation Mode Configure
After HF-BL100-CU power on, module enter transparent transmit mode, default UART configuration parameter as below:
Figure 7. HF-BL100-CU Default UART Parameter
User can configure the module via AT command through UART or use Evaluation Kit to test.
Evaluation kit refer to Appendix B. <Description> AT command debug tool recommend use “ friend serial debug assistant and SecureCRT tool ,which can be download from company website.
4.2. ATCommand Overview
AT: command can be inputted via serial debug tool or compile as below photo shows,
AT:HELP is a help command, list all commands and description.
Remark: the end of each command need add return or line feed character.
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 23
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Figure 8. ”AT:HELP” list All command
4.2.1. Command Format
AT: command based on ASCII code, format as below:
Format description
< >: mean the part must include [ ]: mean optional part
Command message
AT<CMD>[op][para-1,para-2,para-3,para-4…]<CR><LF>
AT::command message prefix CMDcommand character string [op] command operate character, can be parameter setting or query
“-” : means parameter setting
means query [para-n] parameter setting code, if query, it is not required. <CR>end ASCII code 0x0d <LF>: returnASCII code 0x0a
<descritpion>
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 24
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Error code
Descritpion
ERP
Invalid command
WRONG
Invalid parameter
DENY
Operation denied
Command Type
Data transmit direction
Save or
not
Function description
Comman d detail
"AT:HELP"
MCU->Module
No
Helo command
4.3.1
" AT:REN-" + Name MCU->Module
Yes
Set module NAME
4.3.2
" AT:REN"
MCU->Module
Query
Query module NAME
4.3.3
"AT+CIT-" +IntervalMin+IntervalM ax+Slave Latency+connSupervisio n Timeout
MCU->Module
Yes
Set connect parameter
4.3.4
"AT+CIT"
MCU->Module
Query
Query connect parameter
4.3.5
"AT:BPS-"+baudrate
MCU->Module
Yes
Set baud rate
4.3.6
When input command“AT<CMD>” character is capital word, parameter parts is the same.
Feedback message
AT<RSP>[op] [para-1,para-2,para-3,para-4…]<CR><LF><CR><LF>
AT: feedback message prefix RSP feedback character string, include:
“OK” success
“ERPfailed
DENY operation denied
<CMD>: original command [op] - [para-n] the feedback parameter when query or error code when error
happened
<CR>ASCII code 0x0d <LF>ASCII code 0x0a
Error code
4.2.2. Command List
Table 9 Error Code list
Table 10 AT Command List
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 25
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
"AT:BPS"
MCU->Module
Query
Query baud rate
4.3.7
"AT:MAC"
(APP)MCU->Module
Query
Query MAC
4.3.9
"AT:VER"
(APP)MCU->Module
Query
Query software version
4.3.10
"AT:TPL-" +Data0+Data1
MCU->Module
Yes
Set transmit power
4.3.11
"AT:TPL"
MCU->Module
Query
Query transmit power
4.3.12
"AT:ADP-" +parameters
MCU->Module
Yes
Set broadcast parameter
4.3.13
"AT:ADP"
MCU->Module
Query
Query broadcast parameter
4.3.14
"AT:ADV-"+ Data
MCU->Module
Yes
Set user-define broadcast
data
4.3.15
"AT:ADV"
MCU->Module
Query
Query user-define broadcast data
4.3.16 "AT:ADVAL"+data
MCU->Module
Yes
Set auto-broadcast switch
4.3.17
"AT:ADVAL"
MCU->Module
Query
Query auto-broadcast switch
4.3.18 "AT:ADVSTART"
MCU->Module
No
Start broadcast
4.3.19
"AT:ADVSTOP"
MCU->Module
No
Stop broadcast
4.3.20
"AT:CNN"
MCU->Module
Query
Query current BLE subsystem status
4.3.21
"AT:CNN-D"
MCU->Module
No
Disconnect
4.3.22
"AT:PID-"+ Data
(APP)MCU->Module
Yes
Ser device verify code
4.3.23
"AT:PID"
(APP)MCU->Module
Query
Query device verify code
4.3.24
"AT:CDL-"+X
MCU->Module
Yes
Set UART output data latency
4.3.25
"AT:SAVE"
APP MCU­>Module
No
Save parameter
4.3.26 "AT:RST"
MCU->Module
No
Restore module
4.3.27
"AT:SLEEP-"+command
MCU->Module
No
Set module enter sleep mode
4.3.28
"AT:CNN-"+status Module->MCU
Notifi cation
Module BLE subsystem status Notification
4.3.33
"AT:CPU-"+status Module->MCU
Notifi cation
Module CPU status Notification
4.3.34
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 26
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
"AT:RELD"
MCU->Module
no
Restore factory setting via AT command
4.3.35
PIN32->WAKEUP high
level outside
MCU->module
Notifi cation
Enable module CPU subsystem deep sleepBLE subsystem isolated operation
4.3.36
PIN29­>MANUFACTURE keep high level at least 5s when power on
MCU->Module
-
Restore factory parameter
via hardware
4.3.37
* remarkUART serial interface command must end with <CR><LF>feedback must end
with<CR><LF>
*remark:(APPmeans the command is also applicable to APP commandAPP command no
need <CR><LF>
4.3. AT Command
4.3.1. Help command
Functiondisplay all command description
Effective timeeffective immediately
Command
"AT:HELP"+<CR><LF>
feedback
"AT:OK" +<CR><LF>+data mean command success, feedback description data
Data list all command description data
"AT:ERP\r\n" means invalid command, query failed
4.3.2. Set Module NAME
Functionset module name, max length is 11 character
Effective time effective after re-broadcast
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 27
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Command
" AT:REN-" + Name+<CR><LF>
Name display the name, max 11 character
Feedback
"AT:OK\r\n" means success
"AT:WRONG\r\n" means invalid parameter, set failed
"AT:ERP\r\n" means invalid command, set failed
4.3.3. Query module Name
Function query module current Name
Command
"AT:REN"+<CR><LF>
„?‟: means query
Feedback
"AT:REN-"+devicename+<CR><LF> means success
Devicename: device name can be displayed, max 11 character, default factory name is “HF-
BL100-CU”
"AT:ERP\r\n\0" means invalid command, failed
4.3.4. Set Connect Parameter
Functionset BLE connect parameter
Effective timeeffect immediately at connection status or effective after connection
Command
"AT:CIT-"+IntervalMin+IntervalMax+Slave Latency+connSupervision Timeout+<CR><LF>
IntervalMin4 character meansHighByte |...| LowByte;‟0‟~‟9‟ means 0~9”0200”->
decimal 200*1.25ms
IntervalMax4 byte means HighByte |...| LowByte;‟0‟~‟9‟ means 0~9”1000”-> decimal
1000*1.25ms
Slave Latency:1 character‟0‟~‟9‟ means 0~9
connSupervision Timeout4 character means HighCharacter|...|LowCharacter‟0‟~‟9‟
means 0~9”2000”-> decimal 2000*10ms
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 28
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
when connect to IOS APP Apple has their own regulation, for parameter must comply
1. IntervalMax*Slave Latency+1)《=2 seconds
2. IntervalMin>=20ms
3. IntervalMin +20ms<=IntervalMax
4. Slave Latency<=4
5. connSupervision Timeout<=6 seconds
6. IntervalMax*(Slave Latency+1)*3<connSupervisionTimeout
Feedback
"AT:WRONG\r\n" means invalid parameter, modify failed
"AT:OK\r\n" means success, run with new connect interval
"AT:ERP\r\n" means invalid command, modify failed
4.3.5. Query Connect Parameter
FunctionQuery module connect parameter
Effective timeimmediately
Command
"AT:CIT?"+<CR><LF>
Feedback
"AT+CIT-"+IntervalMin+IntervalMax+Slave Latency+connSupervision Timeout+<CR><LF>
IntervalMin4 character means HighByte |...| LowByte;‟0‟~‟9‟ means 0~9”0200”->
decimal 200*1.25ms
IntervalMax4 character meansHighByte |...| LowByte;‟0‟~‟9‟ means 0~9”1000”->
decimal1000*1.25ms
Slave Latency:1 character‟0‟~‟9‟ means 0~9
connSupervision Timeout4 character means HighByte|...|LowByte‟0‟~‟9‟ means
0~9”2000”-> decimal 2000*10ms
when connect to IOS APP Apple has their own regulation, four parameter must comply:
7. IntervalMax*Slave Latency+1)《=2 seconds
8. IntervalMin>=20ms
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 29
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
9. IntervalMin +20ms<=IntervalMax
10. Slave Latency<=4
11. connSupervision Timeout<=6 seconds
12. IntervalMax*(Slave Latency+1)*3<connSupervisionTimeout
"AT:ERP\r\n" means invalid command, query failed
4.3.6. Set Baud rate
Functionmodify UART Baud rate
Effective timeeffective after receiving the success feedback data
Command
"AT:BPS-"+baud rate+<CR><LF>
Baudrate:6 character‟0‟~‟9‟ means 0~9,”115200”-> decimal 115200
Feedback
"AT:OK\r\n" means success
"AT:WRONG\r\n" means invalid parameter, modify failed
"AT:ERP\r\n" means invalid command, modify failed.
Remark only apply regular baud rate 4800,9600,19200,38400,57600,115200, other
parameter would be consider invalid.
4.3.7. Query Baud rate
Functionquery current baud rate
Effective timeimmediately
Command
"AT:BPS"+<CR><LF>
Feedback
"AT:BPS-"+baud rate+<CR><LF> means success
Baudrate:6 character ‟0‟~‟9‟ means 0~9,”115200”-> decimal 115200,”038400”-> decimal
38400
"AT:ERP\r\n" means invalid command, query failed
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 30
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
4.3.8. Reserved
4.3.9. Get MAC Address
FunctionGet Bluetooth MAC
Command
"AT:MAC?"+<CR><LF>
APP Command do not need <CR><LF>
Feedback:
" AT:MAC-"+MAC+<CR><LF>
MAC: 12 character can represent 6 byte data, each 2 character represent the four bit in
high order and the four bit in low order of one byte.
e.g. “123456789012”->0x12,0x34,0x56,0x78,0x90,0x12, character can only
be ‟0‟~‟9‟,‟A‟~‟F‟
APP Command do not need <CR><LF>
4.3.10. Query Software Version
functionQuery device current software version
Effective timeimmediately
Command
"AT:VER"+<CR><LF>
APP Command do not need <CR><LF>
Feedback
"AT:VER-"+version+<CR><LF> means query success
APP Command do not need <CR><LF>
Version: character string, e.g. "100-CU-V*.*"
"AT:ERP\r\n" means invalid command, query failed
APP Command do not need "\r\n"
4.3.11. Set Transmit Power
Function modify device transmit power, broadcast power and connect power
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 31
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Effective timeimmediately
Command
"AT:TPL-"+Data0+Data1+<CR><LF>
Data0: broadcast power, one character, ‟1‟~‟8‟ means 1~8
Data1: connect power, one character, ‟1‟~‟8‟ means 1~8
1-> -18dbm
2-> -12dbm
3-> -6dbm
4-> -3dbm
5-> -2dbm
6-> -1dbm
7-> +3dbm
8-> 0dbm
Feedback
"AT:OK\r\n" means command successfully received
"AT:WRONG\r\n" means invalid parameter, modify failed, if not ‟1‟~‟8‟, then it is invalid
parameter
"AT:ERP\r\n" means invalid command, modify failed
4.3.12. Query Transmit Power
Functionquery device current transmit power , broadcast power, connect power
Effective timeimmediately
Command
"AT:TPL"+<CR><LF>
„?‟: means query command
Feedback
"AT:TPL-"+Data0+Data1+<CR><LF>
Data0: broadcast power ,one character, ‟1‟~‟8‟ means 1~8
Data1: connect power, one character, ‟1‟~‟8‟ means 1~8
1-> -18dbm
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 32
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
2-> -12dbm
3-> -6dbm
4-> -3dbm
5-> -2dbm
6-> -1dbm
7-> +3dbm
8-> 0dbm
"AT:ERP\r\n" means invalid command, query failed
4.3.13. Set Broadcast Parameter
Functionset broadcast parameter, min. interval/max interval/broadcast type/broadcast
channel
Effective timeeffect in next broadcast
Command
"AT:ADP-"+parameters+<CR><LF>
Parameters: includes 13 character, min interval ->4 character, max interval ->4 character
broadcast type->1 character, broadcast channel ->1 character
Min intervalHighByte|...|LowByte‟0‟~‟9‟ means 0~9(“100”-> decimal 100), unit 0.625ms
Max intervalHighByte|...|LowByte‟0‟~‟9‟ means 0~9(“1200”-> decimal 1200) ,unit
0.625ms
Broadcast type‟0‟~‟1‟ means 0~10->public,1->randomonly public type available
temporarily
Broadcast channel ‟1‟~‟7‟ means 1~7the three bit in low order correspond each channel
index. bit0->channel37bit1->channel->38,bit2->channel39 , the setting can be combined
Feedback
"AT:OK\r\n" means command successful received
"AT:WRONG\r\n" means invalid parameter, change failed
"AT:ERP\r\n" means invalid command, change failed
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 33
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
4.3.14. Query Broadcast Parameter
Function query broadcast parameter, min interval/ max interval/ broadcast
type/broadcast channel
Effective timeimmediately
Command
"AT:ADP?"+<CR><LF>
Feedback
"AT:ADP-"+parameters+<CR><LF>
Parameters: include 13 character, min interval ->4 character, max interval->4 character,
broadcast type->1 character, broadcast channel ->1 character
Min intervalHighByte|...|LowByte‟0‟~‟9‟ means 0~9(“100”-> decimal 100) , unit0.625ms
Max intervalHighByte|...|LowByte‟0‟~‟9‟ means 0~9(“1200”-> decimal 1200) , unit
0.625ms
Broadcast‟0‟~‟1‟ means 0~10->public,1->random
Broadcast channel‟1‟~‟7‟ means 1~7the three bit in low order correspond each channel
index , bit0->channel37bit1->channel->38,bit2->channel39, the setting can be combined.
"AT:ERP\r\n" means invalid command, query failed
4.3.15. Set User-define Broadcast Data
Functionset the user-define data in broadcast, the max data length is 11 bytes
Effective timeeffective in next broadcast
Command
"AT:ADV-"+ Data+<CR><LF>
Data: max length is 11 bytes, data format must follow Bluetooth regulation
Feedback
"AT:OK\r\n" means command successful received
"AT:WRONG\r\n" means invalid parameter, change failed
"AT:ERP\r\n" means invalid command, change failed
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 34
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
4.3.16. Query User-define Broadcast Data
Functionquery the data in user-define broadcast, max data length is 11 bytes
Effective timeimmediately
Command
"AT:ADV"+<CR><LF>
Feedback
"AT:ADV-"+data+<CR><LF> means command successful received and feedback data
Data: max length is 11 bytes, data format must follow Bluetooth regulation
"AT:ERP\r\n" means invalid command, change failed
4.3.17. Set Auto-broadcast Switch
Function auto start broadcast when module power on and disconnection
Effective timeeffective when disconnect
Command
"AT:ADVAL-"+data+<CR><LF>
Data‟0‟->disable‟1‟-> means enable
Feedback:
"AT:OK\r
\n" means command successfully received
"AT:WRONG\r\n" means invalid parameter, command failed
"AT:ERP\r\n" means invalid command, command failed
4.3.18. Query Auto-broadcast Switch
Function query the functions status of auto-broadcast
Effective timeimmediately
Command:
"AT:ADVAL"+<CR><LF>
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 35
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Feedback
"AT:ADVAL-"+status+<CR><LF> feedback current auto-broadcast switch function parameter
Status: each character indicate a status
„0‟-> disable
„1‟-> enable
"AT:WRONG\r\n" means invalid parameter, query failed
"AT:ERP\r\n" means invalid command, query failed
4.3.19. Start Broadcast
Functiondevice start broadcast
Effective time do not execute if under broadcast status and connect status, execute
immediately under other status
Command:
"AT:ADVSTART"+ <CR><LF>
Feedback
"AT:OK\r\n" means command successfully received and start broadcast
"AT:ADVSTART-"+status+<CR><LF> means command successfully received, but status
incorrect
Status: each character indicate a status
„0‟-> CYBLE_CNN_INITIALIZING
„1‟-> CYBLE_CNN_ADVERTISING
„2‟-> CYBLE_CNN_CONNECTED
„3‟-> CYBLE_CNN_DISCONNECTED
„4‟-> CYBLE_CNN_STOPPED
„5‟-> CYBLE_CNN_CONNECTING
"AT:ERP\r\n" means invalid command, command failed
4.3.20. Stop Broadcast
Functionstop broadcast
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 36
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Effective time execute immediately at broadcast status; do not execute if at other
status
Command
"AT:ADVSTOP"+ <CR><LF>
Feedback
"AT:OK\r\n" means command successfully received and stop broadcast
"AT:ADVSTOP-"+status+<CR><LF> means command successfully received, but status
incorrect
Status: each character indicate a status
„0‟-> CYBLE_CNN_INITIALIZING
„1‟-> CYBLE_CNN_ADVERTISING
„2‟-> CYBLE_CNN_CONNECTED
„3‟-> CYBLE_CNN_DISCONNECTED
„4‟-> CYBLE_CNN_STOPPED
„5‟-> CYBLE_CNN_CONNECTING
"AT:ERP\r\n" means invalid command, command failed
4.3.21. Query Current BLE Subsystem Status
Functionquery current device status
Effective timeimmediately
Command
"AT:CNN"+<CR><LF>
Feedback
"AT:CNN-"+status+<CR><LF> means query success
Status: each character indicate a status
„0‟-> CYBLE_CNN_INITIALIZING
„1‟-> CYBLE_CNN_ADVERTISING
„2‟-> CYBLE_CNN_CONNECTED
„3‟-> CYBLE_CNN_DISCONNECTED
„4‟-> CYBLE_CNN_STOPPED
„5‟-> CYBLE_CNN_CONNECTING
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 37
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
"AT:ERP\r\n" means invalid command, query failed
4.3.22. Disconnect
Function device disconnect
Effective timeeffective immediately if device at connect status; if at other status, do not
execute command
Command
"AT:CNN-D"+<CR><LF>
Feedback
"AT:OK\r\n" means command received and executed
"AT:CNN-"+status+<CR><LF> means command received, but not executed because status
incorrect
Status: each character indicate a status
„0‟-> CYBLE_CNN_INITIALIZING
„1‟-> CYBLE_CNN_ADVERTISING
„2‟-> CYBLE_CNN_CONNECTED
„3‟-> CYBLE_CNN_DISCONNECTED
„4‟-> CYBLE_CNN_STOPPED
„5‟-> CYBLE_CNN_CONNECTING
"AT:ERP\r\n" means invalid command, change failed
4.3.23. Set Device Verify Code
Functionchange device verify code, all “0 means no verify code
Effective timeeffective in next Bluetooth connection
Command
"AT:PID-"+ Data+<CR><LF>
APP command no need <CR><LF>
Data:4 character means 1 hexadecimal data‟0‟~‟9‟,‟A‟~‟F‟ means 0~9A~F“12AD”->
hexadecimal 0x12AD
Feedback
"AT:OK\r\n" means command successfully received.
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 38
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
"AT:WRONG\r\n" means invalid parameter, change failed
"AT:ERP\r\n" means invalid command, change failed
APP command no need "\r\n"
4.3.24. Query Device Verify Code
Functionquery device verify code parameter all ‟0‟ means no verify code
Effective timeimmediately
Command
"AT:PID"+<CR><LF>
„?‟: means query command
APP command no need<CR><LF>
Feedback
"AT:PID-"+ Data+<CR><LF>
APP Command no need<CR><LF>
Data:4 Character means 1 hexadecimal data, ‟0‟~‟9‟,‟A‟~‟F‟ means 0~9A~F“12AD”->
hexadecimal 0x12AD
"AT:ERP\r\n" means invalid command, query failed
APP Command no need "\r\n"
4.3.25. Set UART Output Data Latency
Function receive data from APP, then output low level in BCTS inform outside MCU, send data
after the set latency time; during sending, BCTS keep low level until sending finished, set BCTS high level; AT command feedback data from UART is not effected by this
Effective timeimmediately
"AT:CDL-"+X+<CR><LF>
X: 2 character means 1 byte, “10”-> decimal 10unit msmax 10ms
Feedback
"AT:OK\r\n" means command successfully received
"AT:WRONG\r\n" means invalid parameter, change failed
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 39
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
"AT:ERP\r\n" means invalid command, change failed
In order to enable user CPU have enough time wake up from sleep and ready to receive, module provide a Latency (X) setting, set BCTS low level before sending data from UART, and the data latency between BCTS to module TX is set by the parameter. Module can assure min latency over X , the actual latency is T = ( X+Y ) ms ,and 500us<Y<1ms. The parameter can be save after power off.
Figure 9. Module UART Output Data Latency Set Map
4.3.26. Save Parameter
Functionsave the changed parameter( the save will stop BLE function and other interrupt,
after save, system will restore)
Effective time immediately, save will stop BLE function and other interrupt, after save,
system will restore
Command
"AT:SAVE"+<CR><LF>
APP command no need <CR><LF>
Feedback
"AT:OK\r\n" means command correct
"AT:ERP\r\n" means invalid command, command failed
APP Command no need "\r\n"
4.3.27. Module Restore
Functionmodule restore, system software restore
Effective time stop BLE function ,execute immediately
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 40
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Command
"AT:RST"+<CR><LF>
Feedback
"AT:OK\r\n" means command successfully received
"AT:ERP\r\n" means invalid command, change failed
4.3.28. Set Module Operate Mode
functionstop BLE subsystemforce system enter Deepsleephibernatestop mode
Effective timestop BLE functionimmediately
Command
"AT:SLEEP-"+command+<CR><LF>
Command1-> allow CPU system enter deep sleep, process via UART
2->force CPU enter HibernateBLE subsystem must stop, wake up through
wake-up pin only
3->force CPU stop, BLE subsystem must stop , restore via wake-up pin and
xres only
Feedback
"AT:OK\r\n\0" means command success
"AT:WRONG\r\n" means invalid parameter, command failed
"AT:ERP\r\n" means invalid command, command failed
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 41
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
4.3.29. Reserved
4.3.30. Reserved
4.3.31. Reserved
4.3.32. Reserved
4.3.33. Module BLE subsystem Status Notification
Function module provide MCU the current BLE subsystem status variation
Notify timenotify when status changed
Command
"AT:CNN-"+status+<CR><LF>
Status: each character indicate one status
„0‟-> CYBLE_CNN_INITIALIZING
„1‟-> CYBLE_CNN_ADVERTISING
„2‟-> CYBLE_CNN_CONNECTED
„3‟-> CYBLE_CNN_DISCONNECTED
„4‟-> CYBLE_CNN_STOPPED
„5‟-> CYBLE_CNN_CONNECTING
4.3.34. Module CPU Status Notification
Functionmodule provide current CPU status to MCU
Notify time: notify when status changed
Command
"AT:CPU-"+status+<CR><LF>
Status: each character indicate one status
„0‟-> CPU power on
„1‟-> CPU deep sleep
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 42
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
„2‟-> CPU operate or sleep
„3‟-> CPU Hibernate
„4‟-> CPU stop
4.3.35. Restore Factory Setting via At Command
functionall changeable parameter restore to factory setting, include baud rate, device name, transmit power, user-define broadcast data, UART data latency data, verify code ,broadcast parameter, connect parameter
Effective timeimmediatelysystem compulsory restore
Command
"AT:RELD"+<CR><LF>
Feedback
"AT:OK\r\n" means command success, system restore
"AT:ERP\r\n" means invalid command, restore failed
4.3.36. Enable Module Deep Sleep
Functionenable module CPU subsystem deep sleep, (BLE subsystem isolate operation), non deep sleep mode module can receive data via UART, under deep sleep module UART function is disabled
Effective timeimmediately
Command
PIN32->WAKEUPhigh level ->CPU subsystem enter deep sleep , module UART don‟t receive data
PIN32->WAKEUPlow level-> CPU is not allowed to enter deep sleep, module UART able to 不允
receive data
Need to pay attention to actual level and data sending sequence, sending data must wait 50 us after set high level to low level, after sending finished, and must waiting another 50 us to set low level to high level
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 43
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Figure 10. Module UART Receive Enable Signal Map
Feedback
null
4.3.37. Restore Factory Setting via Hardware Method
Functionall changeable parameter restore to factory setting, include baud rate, device name, transmit power, user-define broadcast data, UART data latency data, verify code ,broadcast parameter, connect parameter
Effective timeimmediately
Command
PIN29->MANUFACTURE: pin pull up to power on or restore system, keep pin high level over 5
seconds after system started
Feedback
"AT:RELOAD\r\n" means accept command to restore factory setting
4.3.38. Reserved
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 44
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
5. READ ELECTRICITY
5.1. Read Electricity Channel Configuration (temporarily unavailable)
HF-BL100-CU connect to APP, and verified with PID, then module can read electricity:
Service UUID0x180F
Characteristic UUID0x2A19
Prop: read
APP send data from read to HF-BL100-CUand receive the feedback data from HF-
BL100-CU immediately.
5.2. Electricity Data Description
Feedback electricity data is 1 byte, unit is 20mV; the data is the actual signal value , processed
by APP
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 45
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
6. APPLICATION OTA
6.1. OTA Channel Configure
HF-BL100-CU connect to APP under “bootloader” mode
Service UUID00060000-F8CE-11E4-ABF4-0002A5D5C51B
Characteristic UUID00060001-F8CE-11E4-ABF4-0002A5D5C51B
Prop: writewithresponse
6.2. OTA Data Description
Refer to the APP source code provided by Cyress
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 46
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Byte length
Data[0]
1 byte
Include all byte of command type and command content
Command type
Data[1]
1 byte
0x0E utmost 18 bytes in one group AT command
0x0F: send verify code
Command content
Data[2]~ data[19]
18 bytes
Details refer to command list (command type)
Byte length
Data[0]
1 byte
Including all bytes from command type and command content
Feedback type
Data[1]
1 byte
0x0Emax 18 bytes in one group AT command
0x0F: feedback verify result
Command content
Data[2]~ data[19]
18 bytes
Details refer to feedback listfeedback type
7. APP COMMAND
7.1. Channel and Data Description
APP command dont send in groups
Max data of one group command is 20 bytes
Data Channel0x2B13 send WriteWithResponse and receive notify
7.2. Data Format
Bye length 1 byte+ command type1 byte+ command contentmax 18 bytes
APP-->MODULE
Table 11 Command Data from APP to Module
APP<--MODULE
Table 12 Feedback Data from Module to APP
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 47
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Byte length
Data[0]
1 byte
1~19
Include all bytes from
command type and command content
Command
type
Data[1]
1 byte
0x0F
Verify code command
Comman d
Data[2]~data[19]
18 bytes
Data[2]~data[19]
Command content
7.3. Command Content
7.3.1. Command Type0x0E
Command
Functiondata write in the form of 0x2B13 writewithresponse , verify code command refer to AT command 4.3.23 &4.3.24, query version command refer to AT command 4.3.10
Feedback
Channelfeedback data from 0x2B13 notify
Data content
verify code command refer to AT command 4.3.23 &4.3.24, query version command refer to AT command 4.3.10
7.3.2. Command Type0x0F
Command
Functionsend verify code from APP to module, if no verification after connection,
module will not execute any other command from APP, if module self verification is null or 0000, then verify code is no needed.
Verify code have time limit, if no verification within 10 seconds, module will disconnect with
APP
Command Content
Table 13 Command Type 0x0F command list
Feedback
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 48
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Byte length
Data[0]
1 byte
2
Include all bytes from command type and command content
command
type
Data[1]
1 byte
0x0F
Verified and feedback
Command content
Data[2]
1 byte
Data[2]
Verification feedback
0x00: success
0x01:failed
0x02: no verify code
Channelfeedback data from 0x2B13 notify
Data Content
Table 14 Command Type 0x0F Feedback List
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 49
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
UUID
Channel attribute
function
0x2B10
Notify/WriteWithResponse
APP send enable command to module via this notify channel
Under notify enable status, module send
data to APP via notify channel
0x2B11
Read/WriteWithoutRespons e
APP send data to module 0x2B12
WriteWithResponse
APP send OTA mode switch command
0x2B13
Notify/WriteWithResponse
APP command
UUID
Executable operation
Bytes
Default value
Remark
0x2B10
Notify/WriteWithResp onse
20
Null
Module receive data
from UART RX and notify APP via notify channel
8. BASIC COMMUNICATION
MECHANISIM
8.1. Application Service Data Channeluser-define application service
UUID0x2B00
Table 15 Description of User-define Service of All Channnel
8.1.1. Module->APP, UART Data Channelfeature UUID:0x2B10
Table 16 0x2B10 feature UART Module->APP Channel Description
Remark data input from UART and output to Bluetooth. If turn on notify enable switch, outside MCU will send data to module RX via UART, and create a notify event in the channel, APP can directly process in the callback function.
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 50
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Feature value
UUID
Executable
operation
Byte
Default value
remark
0x2B11
Read/WriteWitho utResponse
20
null
APP write data to module via write channel, module output data via UART
Feature value
UUID
Executable
operation
Byte
Default value
remark
0x2B12
WriteWit houtRespo nse
20
Null
Mode switch: switch from application mode to OTA status, command data is “bootloader”
Feature value
UUID
Executable operation
Byte
Default value
remark
0x2B13
Notify/W riteWithR esponse
20
null
APP command, details refer to AT command :4.3.94.3.104.3.23
4.3.24
NoteAPP do not need to add the "AT:" prefix for AT comamnd
8.1.2. APP->ModuleUART Data Channelfeature UUID:0x2B11
Table 17 0x2B11 Feature UART APP->Module Channel Description
Description input from Bluetooth and output via UART. APP write data via Write channel, the data will output via UART TX.
8.1.3. APP->ModuleOTA Mode SwitchFeature UUID:0x2B12
Table 18 0x2B12 Feature OTA Mode Switch Channel Description
8.1.4. APP->ModuleAPP Command ChannelFeature UUID:0x2B13
Table 19 0x2B13 Feature APP Command Channel Description
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 51
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
UUID
Channel attribute
function
0x2A19
read
Read electricity
Feature value
UUID
Executable operation
byte
Default value
remark
0x2A19
Read
1
null
Unit is 20mV
UUID
Channel arritbute
function
00060001-F8CE-11E4-ABF4­0002A5D5C51B
WriteWithResponse
OTA data transmit
Feature value UUID
Executable operation
byte
Default value
remark
00060001-F8CE­11E4-ABF4­0002A5D5C51B
WriteWith Response
20
null
OTA data under ”bootloader” mode, OTA mode receive program data and cover FLASH relative area
8.2. Battery Service Data Channel
Battery service UUID 0x180F
Table 20 Description of Battery Service of All Channel
8.2.1. APP->ModuleBattery Data Channel Feature UUID:0x2A19
Table 21 0x2A19 Feature Battery Power Channel Feature Description
8.3. OTA Service Data Channel
OTA service UUID00060000-F8CE-11E4-ABF4-0002A5D5C51B
Table 22 Description of OTA Service of All Channel
8.3.1. APP->ModuleOTA Data Channel
Table 23 Feature OTA Data Channel Feature Description
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 52
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
9. TEST
9.1. Test Transparent Transmit Function
After open “lightblue”, it will auto scan and list the devices around (if phone disabled the Bluetooth, there will be indication of open Bluetooth), click the device name and connect. Then switch to control main interface after connection. Click the channel with notify feature, and press “Listen for notification to receive data from module .
Figure 11. APP Scan & Connect Interface
Next is data packet sending test. For example, send data 123456789 via UART, phone will receive the sending data ,as below photo shows:
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 53
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Figure 12. APP Receive Notify Interface
Next is data packet receive test. For examples, App sending data 123456789 , UART port
receive the sending data, as below photo shows:
Figure 13. MCU Receive write Data Interface
9.2. Test Battery Electricity Read
9.2.1. Electricity Read Command
Send read command
9.2.2. Electricity Display
Receive the feedback data and displayed in read display area, the data is 1 bytes ,
Hexadecimal unit is 20mv
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 54
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
9.3. OTA Function Test
9.3.1. Get Module firmware Version
Send app command from 0x2B13 to query firmware version. Type is 0x0E, refer to AT
command 4.3.10. Now Cysmart AOO do not check if module have new update
9.3.2. Switch to OTA Mode
Send “bootloader” from 0x2B12,module enter into OTA mode. Restart the module before launch OTA, module will enter application mode; if already launched OTA , but offline or power off without finish the OTA, module will stay at OTA mode
9.3.3. OTA
Choose the firmware file for OTA, start update until finished; if offline in halfway, module 选择
will stay in “bootloader” mode, user can restart OTA
Use cysmart to test OTA function
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 55
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Number
Item
Temp ()
Time(s)
1
Reflow time
220 ℃ above
35~55 s
2
Peak temp
Max 260
10. PACKAGE INFORMATION
10.1. Reflow Soldering Profile
Figure 14. Reflow Soldering Profile
Table 24 Reflow Soldering Specification
Remark: 1. Recommend to supply N2 for reflow oven
2. O2 content lower than 300ppm
10.2. Handling Instruction
1. Shelf life in sealed bag: 12 months at <30, <60% humidity
2. After bag opened, device need to be re-baked if window time over 168 hours
3. Recommended to over bake with N2 supplied
4. Recommended to reflow oven with N2 supplied
5. Bake required with 24 hours at 125+-5,
6. Recommended to store at 10% RH with vacuum packing
7. If SMT process needs twice reflow
(1) TOP side side
Case 1: BLE module mounted on PCB TOP, need to bake TOP side after BOT side processed
168 hours (window time)
Case 2: BLE module mounted on PCB BOT side ,follow normal bake rule.
Remark: window time means it is been 168 hours since last bake to next flow.
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 56
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
10.3. Shipping Information
Tape& reel Carton Size :TBD mm size: TBD mminside
Figure 15. Package Information
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 57
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
APPENDIX A: UART TRANSPARENT
TRANSMIT TYPICAL APPLICATION
Figure 16. UART Transparent Transmit Typical Application
XRES------module reset signal, input, low level valid
There is a pull-up resistor to VBAT, no need external pull up resistor. When module power on or
failure, MCU will reset the module, pull down at least 10 ms then pull-up.
BCTS------ Module UART output notify signal, output wakeup external MCU, remind
MCU there is data output
Module will pull down BCTS, and delay Xms before output data; X set by external MCU via At
command, in default there is no latency. After sending data, BCTS pull-up, if there is new data sending BCTS will pull-up after sending all the new data. .
WAKEUP------ UART wakeup enable, Stop Mode Wakeup,(recommend to add external
Pull-up resistor)
Pin Mode: WAKEUP pin is high resistor input. Cant be suspended, can be controller by pull­up or pull down or external MCU UART Wakeup Enable: when WAKEUP is pull-up, all system enter into DEEPSLEEP ; when WAKEUP is pull-down, system enter into SLEEP mode. When sending data from external MCU to
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 58
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
module, need to pull-down WAKEUP pin, after sending finished, pull-up WAKEUP to lower the power.
There must be a latency from WAKEUP pull-down to MCU sending data, the time is no less 拉低
than 2ms Stop Mode WakeupWAKEUP pull-down, AT command send out Stop command, when system enter into STOP mode, can be wakeup through pull-up WAKEUP.
UART_TX/RX------UART data send/receive signal ManufactureRELD------restore factory setting via hardware method: keep high level at
least 5 second when power on or restore
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 59
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
APPENDIX B: MODULE SCHEMATIC
Figure 17. HF-BL100-CU Module Schematic(一)
Figure 18. HF-BL100-CU EVK TOP VIEW(二)
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 60
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Figure 19. HF-BL100-CU EVK BOTTOM VIEW(三)
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 61
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
APPENDIX C: EVK SCHEMATIC
Figure 20. EVK Power and USB to UART Circuit(一)
Figure 21. EVK Interface Circuit(二)
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 62
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Figure 22. EVK Interface Circuit(三)
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 63
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
APPENDIX D: CONTACT INFORMATION
-------------------------------------------------------------------
-----------------------------------------
Address: Room 1002 ,#1Building,No.3000 Longdong Avenue, Pudong District, Shanghai, China
Post Code201203
Web: www.hi-flying.com
Online consult 400-189-3108
Email: sales@hi-flying.com
-------------------------------------------------------------------
----------------------------------------
For more information ,please visit http://www.hi-flying.com/
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 64
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Federal Communication Commission Statement (FCC, U.S.) This equipment has been tested and found to comply with the limits for a Class B digital
device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one of the following measures:
- Reorient or relocate the receiving antenna.
- Increase the separation between the equipment and receiver.
- Connect the equipment into an outlet on a circuit different from that to which the receiver is connected.
- Consult the dealer or an experienced radio/TV technician for help. This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation.
FCC Caution: Any changes or modifications not expressly approved by the party responsible for compliance
could void the user's authority to operate this equipment. IMPORTANT NOTES Co-location warning:
This transmitter must not be co-located or operating in conjunction with any other antenna or transmitter.
OEM integration instructions: This device is intended only for OEM integrators under the following conditions:
The transmitter module may not be co-located with any other transmitter or antenna. The module shall be only used with the external antenna(s) that has been originally tested and certified with this module.
As long as the conditions above are met, further transmitter test will not be required. However, the OEM integrator is still responsible for testing their end-product for any additional compliance requirements required with this module installed (for example, digital device emissions, PC peripheral requirements, etc.).
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 65
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
Validity of using the module certification: In the event that these conditions cannot be met (for example certain laptop configurations or co-location with another transmitter), then the FCC authorization for this module in combination with the host equipment is no longer considered valid and the FCC ID of the module cannot be used on the final product. In these circumstances, the OEM integrator will be responsible for re-evaluating the end product (including the transmitter) and obtaining a separate FCC authorization.
End product labeling: The final end product must be labeled in a visible area with the following: “Contains Transmitter Module FCC ID: 2ACSVHF-BL100-CU”.
Information that must be placed in the end user manual: The OEM integrator has to be aware not to provide information to the end user regarding how to install or remove this RF module in the user's manual of the end product which integrates this
module. The end user manual shall include all required regulatory information/warning as show in this manual.
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 66
-
HF-BL100-CU Low Energy BluetoohBLE 4.0Module User Manual
© Copyright High-Flying, May, 2011 The information disclosed herein is proprietary to High-Flying and is not to be used by or disclosed to unauthorized persons without the written consent of High-Flying. The recipient of this document shall respect the security status of the information. The master of this document is stored on an electronic database and is “write-protected” and may be altered only by authorized persons at High-Flying. Viewing of the master document electronically on electronic database ensures access to the current issue. Any other copies must be regarded as uncontrolled copies.
Shanghai High Flying Electronics Technology Co., Ltd www.hi-flying.com - 67
-
Loading...