FSC-BT3721V AT Command Set

[中文]

Description

This guidance document is suitable for engineers developing FSC-BT3721V Bluetooth modules.

Instruction Description

Specification Description

This specification applies to the entire document.

  • {} : The content enclosed in {…} is optional.

  • << : COMMAND sent from the host to the module.

  • >> : RESPONSE/EVENT returned from the module to the host.

Command Format

AT+Command{=Param1{,Param2{,Param3...}}}<CR><LF>
  • All commands start with AT and end with <CR><LF>.

  • <CR> represents a carriage return character, corresponding to HEX value 0x0D.

  • <LF> represents a line feed character, corresponding to HEX value 0x0A.

  • If a command contains parameters, the parameters shall be separated by = .

  • If a command contains multiple parameters, the parameters shall be separated by ,.

  • If a command has a response to return, the response starts with <CR><LF> and ends with <CR><LF>.

  • The module shall always return the execution result of the command (returns OK for success, and ERROR for failure).

Example:Read the module’s Bluetooth name

Transmission: <<AT+NAME<CR><LF>
Response: >><CR><LF>+NAME=FSC-BT1026-XXXX<CR><LF>
Response:>><CR><LF>OK<CR><LF>

Event Format

<CR><LF>+Indication{=Param1{,Param2{,Param3...}}}<CR><LF>
  • All events start with <CR><LF> and end with <CR><LF>.

  • If an event contains parameters, the parameters shall follow “=”.

  • If an event contains multiple parameters, the parameters shall be separated by “,”.

Example: The mobile terminal sends “1234567890” via non-transparent transmission.

Response:>>><CR><LF>+DATA=0,010,1234567890<CR><LF>

Example: Bluetooth connection/disconnection

Response:>>><CR><LF>+GATTSTAT=0,3<CR><LF> //connection
Response:>>><CR><LF>+GATTSTAT=0,1<CR><LF> //disconnection

Commands Table

AT - UART Communication Test

Command

AT

Response

OK

Description

When powering on or changing the baud rate, test the UART communication between the host and the module.

Example:
<< AT
>> OK

AT+VER - Get Firmware Version

Command

AT+VER

Response

+VER=Param

Param

Firmware version

Description

Get Firmware Version

Example:
<< AT+VER
>> +VER=1.1.1,FSC-BT3721V
>> OK

AT+ADDR - Get MAC Address

Command

AT+ADDR

Response

+ADDR=Param

Param

Module’s MAC address (12 Bytes ASCII)

Description

Get MAC Address

Example:
<< AT+ADDR
>> +ADDR=DC0D30010203
>> OK

AT+NAME - Get/Set Local Name

Command

AT+NAME{=Param1{,Param2}}

Param1

local name(1~29 Bytes ASCII)

Param2

MAC address suffix(0/1,default:0)
0: Disable suffix
1: 开Enable suffix “-XXXX”(lower 4 bytes of MAC address)

Response

+NAME=Param

Param

local name

Description

Write local name if parameter exist, otherwise read current local name

Read current local name
<< AT+NAME
>> +NAME=FSC-BT3721V
>> OK

Change module’s local name to “ABC”
<< AT+NAME=ABC
>> OK

Change module’s local name to “ABC” and enable suffix
<< AT+NAME=ABC,1
>> OK

AT+BAUD - Get/Set UART Baudrate

Command

AT+BAUD{=Param}

Param

baudrate(2400/4800/9600/19200/38400/57600/115200/
230400/460800/921600, default:115200)

Response

+BAUD=Param

Param

baudrate

Description

Module will change baudrate to target value immediately

Example:
Query baudrate
<< AT+BAUD
>> +BAUD=115200
>> OK

Change baudrate
<< AT+BAUD=9600
>> OK

AT+TXPOWER - Get/Set TX Power

Command

AT+TXPOWER{=Param}

Param

tx power(-20,-12,-8,-4,-2,-0,2,3,4,6,8 default:6)

Response

+TXPOWER=Param

Param

tx power

Description

Get/Set TX Power
BT3721V supports a maximum of 8dBm

Example:

Example:
Get tx power
<< AT+TXPOWER
>> +TXPOWER=3
>> OK

Set tx power to 0dBm
<< AT+TXPOWER=0
>> OK

AT+LPM - Enable/Disable Low Power Mode

Command

AT+LPM{=Param}

Param

low power mode (0/1/2, default: 0)
0: disable
1: enable low power and wake up by UART
2: enable low power and wake up by IO

Response

+LPM=Param

Param

low power mode

Description

Get/Set low power config

Example:
Get/Set low power config
<< AT+LPM
>> +LPM=0
>> OK

Set low power config
<< AT+LPM=1
>> OK

AT+ADVIN - Get/Set Advertising Interval

Command

AT+ADVIN{=Param}

Param

advertising interval (20~10000 ms, default: 152ms)

Response

+ADVIN=Param

Param

advertising interval

Description

Get/Set advertising interval

Example:

Example:
Get advertising interval
<< AT+ADVIN
>> +ADVIN=152
>> OK

Set advertising interval to 100ms
<< AT+ADVIN=100
>> OK

AT+LECHCNT - Get/Set the MAX Number of Connections

Command

AT+LECHCNT{=Param}

Param

Maximum number of connections allowed (1~2, default:1)

Response

+LECHCNT=Param

Param

Maximum number of connections allowed

Description

Update the maximum number of connections, it takes effect after restart.

Example:
Read the maximum number of connections
<< AT+LECHCNT
+LECHCNT=1
>> OK

Set a maximum of 2 connections
AT+LECHCNT=2
>> OK

AT+IDCFG - Get/Set 8 bytes ID

Command

AT+IDCFG{=Param}

Param

8 bytes ID

Response

+IDCFG=Param

Param

8 bytes ID

Description

Get/Set 8 bytes ID. Help users save 8 bytes IDs.

Example:
Get ID
<< AT+IDCFG
>> +IDCFG=12345678
>> OK

Set ID
<< AT+IDCFG=12345678
>> OK

AT+LEDISC - Disconnect Specified Connection

Command

AT+LEDISC{=Param}

Param

index

Response

OK

Description

Disconnect the bluetooth connection of the specified index

Example:
Disconnect device with index 1
<< AT+LEDISC=1
>> OK

Disconnect all connections
<< AT+LEDISC
>> OK

AT+LECCONN - Initiate a connection to the specified address

Command

AT+LECCONN{=Param1{,Param2{,Param3{,Param4}}}}

Param1

12-byte device address + 1-byte address type

Param2

Communication Service UUID

Param3

Communication UUID with write/write without rsp permission

Param4

Communication UUID with notification permission

Response

OK

Description

Initiate a connection to the specified device, the parameter consists of 12 bytes (device address) and 1 byte
(address type), generally the address type is “0” or “1”. address
How to get the address type:
Send AT+SCAN=1 command, get parameter2. example:
+SCAN=0,0,DC0D30001ED4,-65,10,FSC-BT946
Connection command:
AT+LECCONN=DC0D30001ED40
Example:
Connect to the specified device, 0 is the address type
<< AT+LECCONN=DC0D3000039E0
>> OK

Initiate a connection to the specified address, using FFF0, FFF2, FFF1 for communication
<< AT+LECCONN=DC0D3000039E0,FFF0,FFF2,FFF1
>> OK

AT+FILTER - Get/Set Scan Filter

Command

AT+FILTER{=Param1{,Param2}}

Param1

scan filter (0~3)
0: delete all conditions
1: address filtering
2: advertising data filtering
3: RSSI filtering

Param2

The filter type is 1, and the parameter2 is the address
The filter type is 2, and the parameter2 is advertising data
The filter type is 3, and the parameter2 is RSSI

Response

+FILTER=1,Param1
+FILTER=2,Param2
+FILTER=3,Param3

Description

Filter commands will only affect AT+SCAN=2
When filtering advertising data, the parameter2 fields are: tag, offset, len, data
After the configuration is complete, start AT+SCAN=2 to filter the scanned devices according to the set parameters
AT+FILTER=0, delete all filter conditions.
Filter parameters will not be saved to flash. Do not save when power off.
Example:
address filtering
<< AT+FILTER=1,DC0D30010203
>> OK

Filter advertising data \x is hexadecimal
<< AT+FILTER=2,xFF,x04,x02,xDCx0D
>> OK

delete all filter conditions
<< AT+FILTER=0
>> OK

AT+SCAN - SCAN for Nearby Devices

Command

AT+SCAN{=Param}

Param

scanning method (0~2)
0: stop scanning
1: Scan nearby devices, filter duplicate addresses, up to 8 devices can be found
2: Scan BLE advertising packets and output original advertising packets, which can be filtered by AT+FILTER command

Response

+SCAN=Param1,Param2,Param3,Param4,Param5,Param6 (AT+SCAN=1 event format)
+SCAN=Param21,Param22,Param23,Param24,Param25,Param26 (AT+SCAN=2 event format)

Param1

list number

Param2

MAC Address type (1 byte)

Param3

MAC address (12 bytes)

Param4

RSSI

Param5

Device name length

Param6

Device name

Param21

MAC Address type (1 byte)

Param22

MAC address (12 bytes)

Param23

RSSI

Param24

advertising packet type

Param25

advertising packet length

Param26

advertising packet

Description

AT+SCAN=1 Commonly used for searching before connecting
AT+SCAN=2 Often used as a Bluetooth gateway to SCAN for nearby Beacon devices
Example:
SCAN device(AT+SCAN=1)
<< AT+SCAN=1
>> +SCAN={
>> +SCAN=0,1,70CFC9A98840,-43,24,LE-Bose QuietControl 30
>> +SCAN=1,1,DC0D30001ED4,-65,10,FSC-BT946
>> +SCAN=}

Sniff the BLE advertising and return the raw data (the garbled part is the raw data, using hex format)
<< AT+SCAN=2
>> +SCAN={
>> +SCAN=0,DC0D24CFB6D0,-70,1,10,FSC-BP104D
>> +SCAN=}

AT+TPMODE - Get/Set Throughput Mode

Command

AT+TPMODE{=Param}

Param

Throughput mode (0~1, default 1)
0: Command Mode
1: Throughput Mode

Response

+TPMODE=Param

Param

Throughput mode

Description

When bluetooth connected and in throughput mode,
the AT command will be de-active,
every byte received via physical UART will be sent to remote.
Example:
Throughput Mode
<< AT+TPMODE=1
>> OK

Command Mode
<< AT+TPMODE=0
>> OK

AT+ADVEN - Get/Set advertising enable config

Command

AT+ADVEN{=Param}

Param

enable (0~1, default 1)
0: disable advertising
1: enable advertising

Response

+ADVEN=Param

Param

enable

Description

Trun on/off advertising

Example:
Turn on advertising
<< AT+ADVEN=1
>> OK

Turn off advertising
<< AT+ADVEN=0
>> OK

AT+ADVDATA - Get/Set BLE Advertising 0xFF Data

Command

AT+ADVDATA{=Param}

Param

manufacturer specific data, tag 0xff

Response

+ADVDATA=Param

Param

manufacturer specific data, tag 0xff

Description

Get/Set advertising manufacturer specific data

Example:
Get advertising manufacturer specific data, \x is hexadecimal data
<< AT+ADVDATA
>> +ADVDATA=x03x01x02
>> OK

Set advertising manufacturer specific data, \x is hexadecimal data
<< AT+ADVDATA=x03x01x02
>> OK

AT+LESEND - Send Data to Remote Device

Command

AT+LESEND{=Param1{,Param2{,Param3}}}

Param1

Connection index

Param2

data len

Param3

data

Response

OK

Description

send data to remote device

Example:
Send 4-byte data to the remote device with connection index 1
<< AT+LESEND=1,4,2022
>> OK

AT+CHINFO - Get Connection List Infomation

Command

AT+CHINFO

Response

+CHINFO=Param1,Param2,Param3,Param4

Param1

Connection index

Param2

Connection state (1:not connected, 2: connecting, 3: connected)

Param3

Connection role (0: peripheral, 1: central)

Param4

peer mac address

Description

Get connection list infomation

Example:
Get connection list infomation
<< AT+CHINFO
>> +CHINFO=0,3,0,4F85B3319170
>> +CHINFO=1,3,0,6A8E79C29A99
>> +CHINFO=2,1,0,000000000000
>> +CHINFO=3,1,0,000000000000
>> +CHINFO=4,1,0,000000000000
>> OK

AT+REFLOWCTL - UART Flow Control

Command

AT+FLOWCTL[=Param]

Param

Mode (0~1, Default 0)
0: Disable Flow Control
1: Enable Flow Control

Response

+FLOWCTL=Param

Param

Mode

Description

Control the Enablement of Serial Port Flow Control

Example:
Query Flow Control Status
<< AT+FLOWCTL
>> +FLOWCTL=0

Enable Flow Control
<< AT+FLOWCTL=1
>> OK

Disable Flow Control
<< AT+FLOWCTL=0
>> OK

AT+REBOOT - Soft Reboot

Command

AT+REBOOT

Response

OK

Description

Module release all Bluetooth connections then reboot

Example:
<< AT+REBOOT
>> OK

AT+RESTORE - Restore Factory Settings

Command

AT+RESTORE

Response

OK

Description

Module restore all factory settings then reboot

Example:
<< AT+RESTORE
>> OK

Events Table

+SCAN - AT+SCAN=1 Scan Result

Indication

+SCAN=Param1,Param2,Param3,Param4,Param5,Param6

Param1

Index

Param2

MAC address type (1 byte)

Param3

MAC address (12 Bytes ASCII)

Param4

RSSI

Param5

remote device name len

Param6

remote device name

Description

After the module receives AT+SCAN=1, it will continue to scan, and report through +SCAN after finding the device

Example:
SCAN device(AT+SCAN=1)
<< AT+SCAN=1
>> +SCAN={
>> +SCAN=0,1,70CFC9A98840,-43,24,LE-Bose QuietControl 30
>> +SCAN=1,1,DC0D30001ED4,-65,10,FSC-BT946
>> +SCAN=}

+SCAN - AT+SCAN=2 Scan Result

Indication

+SCAN=Param1,Param2,Param3,Param4,Param5,Param6

Param1

MAC address type (1 byte)

Param2

MAC address (12 Bytes ASCII)

Param3

RSSI

Param4

advertising packet type

Param5

advertising packet size

Param6

advertising packet(For ease of MCU reading, the data is in hexadecimal format. Please set the serial port display to hexadecimal mode to avoid displaying garbled text.)

Description

After the module receives AT+SCAN=2, it will continue to scan and report through +SCAN after finding the device

Example:
Sniff the BLE advertising and return the original data (the garbled part is the original data, using hex format)
<< AT+SCAN=2
>> +SCAN{
>> +SCAN=0,DC0D24CFB6D0,-70,1,10,FSC-BP104D
>> +SCAN}

+GATTSTAT - GATT State

Indication

+GATTSTAT=Param1,Param2

Param1

Connection Index

Param2

GATT State (1~3)
1: Standby
2: Connecting
3: Connected

Description

In the command mode, if the connection status of the module changes, it will be actively reported through +GATTSTAT

Example:
Connected
>> +GATTSTAT=0,3

+DATA - GATT Received Incoming Data

Indication

+DATA=Param1,Param2,Param3

Param1

Index

Param2

Payload length

Param2

Payload

Description

In the throughput mode: report data without +DATA header
In the command mode: report data with +DATA header +DATA=1,5,12345
Example:
received data 1234567890
>> +DATA=1,10,1234567890

Application and Development

Please refer to:

This guide is intended to provide technical support and resource references for the product development and mass production based on Feasycom FSC-BT3721V Bluetooth BLE Module. It includes hardware design references, functional description, quick development kits, quick start, obtain firmware version, typical application development examples, and firmware upgrade methods, etc.

Contact Information

Shenzhen Feasycom Co.,Ltd.

Address : Rm 508, Building, Fenghuang Zhigu, NO.50, Tiezai Road, Xixiang, Baoan Dist, Shenzhen, 518100, China.

Telphone : 86-755-23062695

Sales Service : sales@feasycom.com

Support : support@feasycom.com

Home Page : www.feasycom.com

Support Forum : forum.feasycom.com

Appendix

PDF Download

PDF Download