FSC-BT6XX
BT5.0 Programming User Guide
Version 3.0
1
Copyright © 2013-2017 Feasycom Technology Co., Ltd. All Rights Reserved.
Revision History
Version Data Notes Author
1.0 2016/05/12 First Release Eric
2.0 2016/10/13 Add Commands Eric
3.0 2017/03/10 Add GPIO Indications Navy
深
圳
市
飞
易
通
科
技
有
限
公
司
Contact Us:
Shenzhen Feasycom Technology Co., Ltd
Web: [Link]
Email:support@[Link]
Tel: +86-755-27924639,+86-755-23062695
Address: Room 2004-2005,20th Floor, Huichao Technology Building,
Jinhai Road, Xixiang, Baoan District, Shenzhen,518100, China.
2
Contents
1. Introduction ......................................................................................................................................................... 4
1.1 Terms ............................................................................................................................................................... 4
1.2 Hardware Interface .................................................................................................................................. 4
1.3 Supported Bluetooth Profile ............................................................................................................... 4
1.4 Command Format ..................................................................................................................................... 4
1.5 Indication Format ..................................................................................................................................... 5
1.6 Module Default Settings ........................................................................................................................ 5
2. Command Table .................................................................................................................................................. 6
2.1 General Commands .................................................................................................................................. 6
2.1.1 UART Communication Test .................................................................................................... 6
深
2.1.2 Read Firmware Version ........................................................................................................... 6
2.1.3 Read MAC Address ..................................................................................................................... 6
圳
2.1.4 Read/Write Local Name .......................................................................................................... 7
市
2.1.5 Read/Write UART Baudrate .................................................................................................. 7
2.1.6 Turn On/Off Throughput Mode .......................................................................................... 7
飞
2.1.7 Turn On/Off Low Power Mode ............................................................................................ 8
2.1.8 Turn On/Off Hardware Flow Control ............................................................................... 8
易
2.1.9 Read/Write Master/Slave Mode ......................................................................................... 9
通
2.1.10 PIO Function Configuration ................................................................................................ 9
2.1.11 Scan Nearby Devices .............................................................................................................. 9
科
2.1.12 Release All Connections .................................................................................................... 10
技
2.1.13 Soft Reboot ............................................................................................................................... 10
2.1.14 Restore Factory Settings ................................................................................................... 10
有
2.1.15 Establish GATT Connection (GATT Client only) ................................................... 10
限
2.1.16 Send Data Via GATT ............................................................................................................. 11
3. Indication Table.................................................................................................................................................... 11
公
3.1 General Indications ............................................................................................................................... 11
司
3.1.1 Scan Result .................................................................................................................................. 11
3.1.2 GATT Received Data ............................................................................................................... 12
3.2 GPIO Indications ..................................................................................................................................... 12
3.2.1 LED Pin .......................................................................................................................................... 12
3.2.2 State Pin ........................................................................................................................................ 12
3
1. Introduction
This specification presents design guidelines for software engineers that use FSC-BT6XX
series modules for Bluetooth requirements.
1.1 Terms
Throughout this specification:
{ } :Content between {…} is optional
深
<< :Content behind << represents a COMMAND sent from Host to Module
>> :Content behind >> represents a RESPONSE sent from Module to Host
圳
市
1.2 Hardware Interface
飞
GPIO
易
PWM
通
UART
SPI Master/Slave
科
I2C Master/Slave
技
Analog Input/Output
有
1.3 Supported Bluetooth Profile
限
公
GATT Server (Generic Attribute Profile)
GATT Client (Generic Attribute Profile)
司
HID Keyboard (Human Interface Profile)
1.4 Command Format
AT+ Command {=Param1{, Param2{, Param3...}}} <CR><LF>
All commands start with “AT”, end with <CR><LF>
<CR> stands for "carriage return", corresponding hex is 0x0D
<LF> stands for "line feed", corresponding hex is 0x0A
If command has parameter, parameter keep behind “=”
If command has multiple parameters, parameter must be separated by “,”
If command has response, response start with <CR><LF>, end with <CR><LF>
Module will always report command’s execution result using “OK” for success or
“ERROR” for failure
4
e.g.
1. Read module’s BR/EDR local name
<< AT+NAME
>> +NAME=Feasycom
>> OK
2. Write a baudrate which is not supported
<< AT+BAUD=0
>> ERROR
1.5 Indication Format
深
圳
<CR><LF>+ Indication {=Param1{, Param2{, Param3...}}} <CR><LF>
市
All indications start with <CR><LF>, end with <CR><LF>
飞
If indication has parameter, parameter keep behind “=”
If indication has multiple parameters, parameter must be separated by “,”
易
通
e.g.
1. Received “1234567890” from mobile phone via GATT Server profile
科
>> +GATTDATA=10,1234567890
技
1.6 Module Default Settings
有
限
Local Name Feasycom
公
Service-UUID FFF0
Write-UUID FFF2
司
Notify-UUID FFF1
Physical UART Baudrate 115200bps/8/N/1
5
2. Command Table
2.1 General Commands
2.1.1 UART Communication Test
Format: AT
深
Response: OK
圳
Description: Test the UART communication between HOST and Module after power on,
市
baudrate changed, etc.
飞
Example: UART communication test
易
<< AT
>> OK
通
科
2.1.2 Read Firmware Version
技
有
Format: AT+VER
限
公
Response: +VER=Param
Param: Firmware version (15 Bytes ASCII)
司
Example: Read module’s firmware version
<< AT+VER
>> +VER=1.0.1,FSC-BT630
>> OK
2.1.3 Read MAC Address
Format: AT+ADDR
Response: +ADDR=Param
Param: Module's LE MAC address (12 Bytes ASCII)
6
2.1.4 Read/Write Local Name
Format: AT+NAME {=Param1{, Param2}}
Param1: BLE local name (1~29 Bytes ASCII, default: Feasycom)
Param2: MAC address suffix (0/1, default: 0)
(0) Disable suffix
(1) Enable suffix “-XXXX” (lower 4 bytes of MAC address) after local name
Response: +NAME=Param
深
Description: Write local name if parameter existence, otherwise read current local name
圳
市
Example: Read current local name
<< AT+NAME
飞
>> +NAME=Feasycom
易
>> OK
Example: Change module’s local name to “ABC”
通
<< AT+NAME=ABC
科
>> OK
Example: Change module’s local name to “ABC” and enable suffix
技
<< AT+NAME=ABC,1
有
>> OK
限
2.1.5 Read/Write UART Baudrate
公
司
Format: AT+BAUD{=Param}
Param: Baudrate (1200/2400/4800/9600/19200/38400/57600/115200/
230400, default:115200)
Response: +BAUD=Param
Description: Module’s baudrate will be changed immediately after received this command
2.1.6 Turn On/Off Throughput Mode
Format: AT+TPMODE{=Param}
7
Param: Throughput mode (0/1, default:0)
(0) Turn Off
(1) Turn On
Response: +TPMODE=Param
Description: When GATT profile connected and throughput mode is on, the AT command
will be de-active, every byte received via physical UART will be sent to air, vice visa
Example: Read current throughput mode
<< AT+TPMODE
深
>> +TPMODE=1
>> OK
圳
Example: Turn off throughput mode
市
<< AT+TPMODE=0
>> OK
飞
易
2.1.7 Turn On/Off Low Power Mode
通
科
Format: AT+LPM{=Param}
技
Param: Low Power Mode (0/1, default: 0)
(0) Turn Off
有
(1) Turn On
限
公
Response: +LPM=Param
司
2.1.8 Turn On/Off Hardware Flow Control
Format: AT+FLOWCTL{=Param}
Param: Hardware Flow Control (0/1, default: 0)
(0) Turn Off
(1) Turn On
Response: +FLOWCTL=Param
8
2.1.9 Read/Write Master/Slave Mode
Format: AT+ROLE{=Param}
Param: Master/Slave mode (0/1, default: 0)
(0) Slave Mode(GATT Server)
(1) Master Mode(GATT Client)
Response: +ROLE=Param
Description: After the command is executed, the BT6XX switches to the new Mode
深
Example: Read current Master/Slave mode
圳
<< AT+ROLE
市
>> +ROLE=0
>> OK
飞
易
2.1.10 PIO Function Configuration
通
科
Format: AT+PIOCFG{=Param1,Param2}
技
0: Disable Command/Transmission mode switch function
Param1
1: Enable Command/Transmission mode switch function
有
0: Disable Bluetooth disconnect function
Param2
限
1: Enable Bluetooth disconnect function
公
Response: +PIOCFG=Param1,Param2
司
2.1.11 Scan Nearby Devices
Format: AT+SCAN =Param1{, Param2{, Param3}}
Param1: (0~3)
(0) Stop scan
(1) Scan nearby BLE devices
Param2: (1~48) Scan period. unit:1.28s, default:12.8s
Param3: (1~25 Bytes ASCII) Name filter. Filter scan results with name if set
Description: Refer to Chapter 3 for format description of scan result
9
2.1.12 Release All Connections
Format: AT+DISC
Description: Module release all Bluetooth connections with remote device
2.1.13 Soft Reboot
Format: AT+REBOOT
深
圳
Description: Module release all Bluetooth connections with remote device then reboot
市
飞
2.1.14 Restore Factory Settings
易
通
Format: AT+RESTORE
科
Description: Module restore all factory settings then reboot
技
有
2.1.15 Establish GATT Connection (GATT Client only)
限
公
Format: AT+LECCONN=Param1{,Param2,Param3,Param4}
司
Param1: MAC address of target device & MAC address type (13 Bytes ASCII)
Param2: Service-UUID, Support 16 Bit and 128 Bit (4 Bytes/32 Bytes ASCII)
Param3: Write-UUID, Support 16 Bit and 128Bit (4 Bytes/32 Bytes ASCII)
Param4: Notify-UUID, Support 16 Bit and 128Bit (4 Bytes/32 Bytes ASCII)
Description: If parameter 2, parameter 3, parameter 4 do not exist, the module will
automatically search for the GATT service connected to the remote device
Example: Specified remote device service connections
<< AT+LECCONN=123456ABCDEF0,FFF0,FFF2,FFF1
>> OK
10
2.1.16 Send Data Via GATT
Format: AT+LESEND=Param1, Param2
Param1: Payload length (1~155)
Param2: Payload (1~155 Bytes UTF8)
Description: If throughput mode is on, this command is de-active
Example: Send data “1234567890” to remote device via GATT
<< AT+LESEND=10,1234567890
深
>> OK
圳
3. Indication Table
市
飞
易
3.1 General Indications
通
科
3.1.1 Scan Result
技
有
Format: +SCAN =Param1, Param2, Param3, Param4{, Param5, Param6}
Param1: Index (1~8)
限
Param2: Device address type (0~2)
公
(0)LE public address
(1)LE random address
司
Param3: MAC address (12 Bytes ASCII)
Param4: RSSI (-255 ~ 0)
Param5: Size of Param6 if exist
Param6: Remote Device Name
Description: Param5/Param6 may not exist if remote device out of distance
Example: Scan nearby BLE devices
<< AT+SCAN=1
>> OK
+SCAN=1,0, DC0D30000003, -32,8, Feasycom
+SCAN=2,1, DC0D30000044, -64,8, Feasycom_0044
+SCAN=3,0, DC0D30000097, -47,8, FSC_BT906
11
3.1.2 GATT Received Data
Format: +GATTDATA=Param1, Param2
Param1: Payload length
Param2: Payload
Example: Received data “1234567890” from remote device via GATT
<< +GATTDATA=10,1234567890
3.2 GPIO Indications
深
圳
3.2.1 LED Pin
市
飞
PIN32 (Output)
易
Low Level Initializing
Blink in 1Hz Ready to connecting
通
High Level Connected
科
技
3.2.2 State Pin
有
限
PIN33 (Output)
公
Low Level Disconnected
High Level Connected
司
12