Feasycom FCS-BT671 User manual

1
Copyright © 2013-2017 Feasycom Technology Co., Ltd. All Rights Reserved.
BT5.0 Mesh Programming User Guide
Version 1.7
深 圳 市 飞 易 通 科 技 有 限 公 司

2
Revision History
Version
Data
Notes
Author
1.1
2018/03/19
First Release
Eric
1.2
2018/05/19
Add AT+NDSEND Command
Eric
1.5
2019/01/29
Support Provisioned by self
Eric
1.6
2019/03/02
Update Quick Start chapter
Jerry
1.7
2019/05/13
Add AT+NDSUBS Command
Eric
Contact Us:
Shenzhen Feasycom Technology Co., Ltd
Web: www.feasycom.com
Email:support@feasycom.com
Tel: +86-755-27924639,+86-755-23062695
Address: Room 2004-2005,20th Floor, Huichao Technology Building,
Jinhai Road, Xixiang, Baoan District, Shenzhen,518100, China.
深 圳 市 飞 易 通 科 技 有 限 公 司

3
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..................................................................................................................................................5
2.1 General Commands..................................................................................................................................5
2.1.1 UART Communication Test....................................................................................................5
2.1.2 Read Firmware Version...........................................................................................................6
2.1.3 Read Bluetooth Address..........................................................................................................6
2.1.4 Read/Write Transmit Power ................................................................................................6
2.1.5 Read/Write UART Baudrate..................................................................................................7
2.1.6 Read/Write Work Mode ..........................................................................................................7
2.1.7 Soft Reboot .....................................................................................................................................7
2.1.8 Restore Factory Settings .........................................................................................................7
2.1.9 Send Data to Publication Address......................................................................................8
2.1.10 Read / Write GATT Proxy Config .....................................................................................8
2.1.11 Read / Write Mesh Message Relay Config ..................................................................8
2.1.12 Reset Mesh Network Setting..............................................................................................9
2.1.13 Read / Write Tian Mao Jing Ling Keys..........................................................................9
2.1.14 Read / Write Node Publication Address .................................................................. 10
2.1.15 Read / Write Node Subscription Address................................................................ 10
2.1.16 Read Node Address..............................................................................................................11
3. Indication Table............................................................................................................................................... 11
3.1 General Indications ............................................................................................................................... 11
3.1.1 Received data Indications ................................................................................................... 11
3.1.2 Received generic on off client Message ....................................................................... 11
3.1.3 Received generic power on off setup client message........................................... 12
3.1.4 Received generic transition time client message ...................................................12
3.1.5 Received generic lighting lightness client message ..............................................12
3.1.6 Received generic level client message..........................................................................12
3.1.7 Received generic lighting ctl client message............................................................. 12
3.1.8 Received generic lighting ctl temperature client message................................ 13
4. Quick Start.......................................................................................................................................................... 13
4.1.1 Introduction .......................................................................................................................................... 13
4.1.2 How to use FSC-BT671 in lighting solution?.......................................................................14
4.1.3 How to use FSC-BT671 access Tian mao jing ling (only available in China)?... 14
4.1.4 How to transfer data through Fsc-BT671 in Bluetooth mesh network?..............15
深 圳 市 飞 易 通 科 技 有 限 公 司

4
1.Introduction
This specification presents design guidelines for software engineers that use FSC-BT630
Mesh 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
⚫I2C Master/Slave
⚫Analog Input / Output
1.3 Supported Bluetooth Profile
⚫GATT Server (Generic Attribute Profile)
⚫Mesh (Mesh 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
e.g.
深 圳 市 飞 易 通 科 技 有 限 公 司

5
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 node 4315
>> +DATA=4315,CA00,10,1231231231
1.6 Module Default Settings
Physical UART Setting
115200/8/N/1
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
深 圳 市 飞 易 通 科 技 有 限 公 司

6
<<
AT
>>
OK
2.1.2 Read Firmware Version
Format: AT+VER
Response: +VER=Param1
Param1: Firmware version
Example: Read module’s firmware version
<<
AT+VER
>>
+VER=1.1.3,FSC-BT671,Mesh
>>
OK
2.1.3 Read Bluetooth Address
Format: AT+ADDR
Response: +ADDR=Param1
Param1: Local Bluetooth address
Example: Read module’s Bluetooth address
<<
AT+ADDR
>>
+ADDR=DC0D308B42FA
>>
OK
2.1.4 Read/Write Transmit Power
Format: AT+TXPOWER{=Param1}
Param1: TX power (0.1dBm steps, for example the value of 10 is 1dBm and 55 is 5.5dBm,
default:200)
Response: + TXPOWER =Param1
Param1: TX power (0.1dBm steps, for example the value of 10 is 1dBm and 55 is 5.5dBm)
深 圳 市 飞 易 通 科 技 有 限 公 司

7
Example: Read module’s tx power
<<
AT+TXPOWER
>>
+TXPOWER=200
>>
OK
2.1.5 Read/Write UART Baudrate
Format: AT+BAUD{=Param1}
Param1: Baudrate (2400/4800/9600/19200/38400/57600/115200/230400/256000/
460800/512000/921600, default:115200)
Response: +BAUD=Param1
Description: Need Reset Module.
2.1.6 Read/Write Work Mode
Format: AT+MODE{=Param1}
Param1: mode (0, app mode, provisioned by mobile app. 1, tian mao jing ling mode,
provisioned by tian mao jing ling. 2, Self-organizing network, provisioned by self. default:0)
Response: +MODE=Param1
Description: Config module work mode.
2.1.7 Soft Reboot
Format: AT+REBOOT
Description: Module software reboot.
2.1.8 Restore Factory Settings
Format: AT+RESTORE
深 圳 市 飞 易 通 科 技 有 限 公 司

8
Description: Module restore all factory settings then reboot
2.1.9 Send Data to Publication Address
Format: AT+NDSEND=Param1, Param2
Param1: Data size
Param2: Data
Response: OK
Description: Send Data to publication address, default address is 0xCA00.
Example: Send Data 12345 to publication address without ack
<<
AT+NDSEND=5,12345
>>
OK
2.1.10 Read / Write GATT Proxy Config
Format: AT+NDPROXY<=Param1>
Param1: enable proxy (0, disable GATT proxy 1, enable GATT proxy)
Response: OK
Description: Enable GATT proxy allow mobile phone connect and control mesh network.
Need reboot
Example: Enable GATT Proxy
<<
AT+NDPROXY=1
>>
OK
2.1.11 Read / Write Mesh Message Relay Config
Format: AT+NDRELAY<=Param1, Param2, Param3>
Param1: enable message relay (0, disable; 1, enable)
Param2: relay count
Param3: relay interval
深 圳 市 飞 易 通 科 技 有 限 公 司

9
Response: OK
Description: Enable and setting relay feature. Need reboot
Example: Enable relay feature
<<
AT+NDRELAY=1,1,1
>>
OK
2.1.12 Reset Mesh Network Setting
Format: AT+NDRESET
Response: OK
Description: Removes all keys and other settings that have been configured for this node.
Example: Reset Mesh Network Setting
<<
AT+NDRESET
>>
OK
2.1.13 Read / Write Tian Mao Jing Ling Keys
Format: AT+TMCFG<=Param1, Param2, Param3>
Param1: production id (Alibaba distribution)
Param2: production secret (Alibaba distribution)
Param3: address (Alibaba distribution)
Response: OK
Description: Config production id, production secret and address to module. Need reboot
Example:
<<
AT+TMCFG=00000112, 60e989e27937b208cacf1c029442ec81,78da076bcf6c
>>
OK
深 圳 市 飞 易 通 科 技 有 限 公 司

10
2.1.14 Read / Write Node Publication Address
Format: AT+NDPUBL<=Param1 >
Param1: publication Address
Response: OK
Description: Config node publication Address. AT+NDSEND will send data to publication
address. Default Publication address is 0xCA00.
Example:
<<
AT+NDPUBL=CA00
>>
OK
<<
AT+NDPUBL
>>
+NDPUBL=CA00
OK
2.1.15 Read / Write Node Subscription Address
Format: AT+NDSUBS<=Param1, Param2>
Param1: 0, delete subscription address. 1, add new subscription address.
Param2: subscription address.
Response: OK
Description: Add address to subscription list, delete address form subscription list or
inquiry subscription list.
Example:
<<
AT+NDSUBS=0,CA00
>>
OK
<<
AT+NDSUBS=1,CA00
>>
OK
<<
AT+NDSUBS
>>
+UARTSUBS={
+UARTSUBS=CA00
+UARTSUBS=}
OK
深 圳 市 飞 易 通 科 技 有 限 公 司

11
2.1.16 Read Node Address
Format: AT+NDID
Response: OK
Description: Get Current Node Address, if not provisioned, 0xFFFF will return.
Example:
<<
AT+NDID
>>
+NDID=0013
OK
3.Indication Table
3.1 General Indications
3.1.1 Received data Indications
Format: +DATA=Param1, Param2, Param3, Param4
Param1: Source address
Param1: Destination address
Param2: Data Size
Param3: Data
Example: Received data from 4315 (vendor model)
<<
+DATA=4315,CA00,10,1231231231
3.1.2 Received generic on off client Message
Format: +ONOFF=Param1
Param1: 0, off. 1, on. 2, not support
Example: Received generic on off client message.
<<
+ONOFF=0
深 圳 市 飞 易 通 科 技 有 限 公 司

12
3.1.3 Received generic power on off setup client message
Format: +ONPOWERUP=Param1
Example: Received generic power on off setup client message.
<<
+ ONPOWERUP=0
3.1.4 Received generic transition time client message
Format: +TRANSTIME =Param1
Example: Received generic transition time client message.
<<
+TRANSTIME=2
3.1.5 Received generic lighting lightness client message
Format: +LIGHTNESS=Param1
Example: Received generic lighting lightness client message.
<<
+LIGHTNESS=FFFF
3.1.6 Received generic level client message
Format: +LEVEL=Param1
Example: Received generic level client message.
<<
+LEVEL=FFFF
3.1.7 Received generic lighting ctl client message
Format: +CTL=Param1,Param2,Param3
Param1: lightness
Param2: temperature
Param3: deltauv
深 圳 市 飞 易 通 科 技 有 限 公 司

13
Example: Received generic lighting ctl client message.
<<
+CTL=FFFF,5555,4444
3.1.8 Received generic lighting ctl temperature client message
Format: +CTLTEMP=Param1,Param2
Param1: temperature
Param2: deltauv
Example: Received generic lighting ctl temperature client message.
<<
+CTL=5555,4444
4.Quick Start
4.1.1 Introduction
FSC-BT671 provides Bluetooth networking solution, compatible with Bluetooth mesh,
and supports Bluetooth 5.0.
FSC-BT671 support flow sig models and one vendor model use for data throughput:
MESH_GENERIC_ON_OFF_SERVER_MODEL,
MESH_GENERIC_POWER_ON_OFF_SETUP_SERVER_MODEL,
MESH_GENERIC_TRANSITION_TIME_SERVER_MODEL,
MESH_LIGHTING_LIGHTNESS_SERVER_MODEL,
MESH_GENERIC_LEVEL_SERVER_MODEL,
MESH_LIGHTING_CTL_SERVER_MODEL,
MESH_LIGHTING_CTL_SETUP_SERVER_MODEL,
MESH_LIGHTING_CTL_TEMPERATURE_SERVER_MODEL,
深 圳 市 飞 易 通 科 技 有 限 公 司

14
4.1.2 How to use FSC-BT671 in lighting solution?
In this solution, FSC-BT671 can be provisioned by mobile app, receive control signal from app and
output PWM signal to drive LED. 2 PWM channels supported by default.
1) Connect VDD, GND, PIO2, PIO9, PIO10.
PIO2 used for restoring module network settings to defaults
PIO9, PIO10 used for PWM output
2) Set PIO2 to high level, reboot module, wait 1 second, so that module could restore network settings,
then set PIO2 to low level
3) Download Bluetooth Mesh app, provision module in mesh network
4) Control Lightness in app
5) Module will output different PWM signals due to different control instructions
4.1.3 How to use FSC-BT671 access Tian mao jing ling
(only available in China)?
In this solution, FSC-BT671 can be provisioned by tian mao jing ling, receive control signal from tian
mao jing ling and output PWM signal to drive LED, 2 PWM channels supported by default.
1) Connect TX, RX, VDD, GND, PIO2, PIO9, PIO10
PIO2 used for restoring module network settings to defaults
PIO9, PIO10 used for PWM output
UART_TX and UART_RX used for interacting with module by AT commands
深 圳 市 飞 易 通 科 技 有 限 公 司

15
2) Set PIO2 to high level, reboot module, wait 1 second, so that module could restore network settings,
then set PIO2 to low level
3) Send AT+MODE=1 to change module work mode. UART default settings are 115200/8/N/1
4) Send AT+TMCFG=<pid>,<p_sec>,<addr> to configure module
5) Let tian mao jing ling provision module
6) Give audio intruction to tian mao jing ling, such as “亮一点”, “暗一点”, etc.
7) Module will output different PWM signals due to different control instructions
4.1.4 How to transfer data through Fsc-BT671 in
Bluetooth mesh network?
In this solution, FSC-BT671 can be provisioned by itself, receive message from network and send
message to network.
1) Connect TX, RX, VDD, GND, PIO2
PIO2 used for restoring module network settings to defaults
UART_TX and UART_RX used for interacting with module by AT commands
2) Send AT+MODE=2 to change module work model. UART default settings are 115200/8/N/1
3) Send AT+REBOOT to reset module
4) when module received data packet, module will send +DATA=<source address>,<destines
address>,<len>,<data> to host
5) If host need to send data through module to other devices in mesh network, host shall send
AT+NDSEND=<len>,<data> to module, then all the other devices in mesh network will receive the
data
深 圳 市 飞 易 通 科 技 有 限 公 司
Table of contents
Other Feasycom Computer Hardware manuals