FSC-BT3721V 应用说明

模块默认参数

Name

FSC-BT3721V

Service UUID

FFF0

Notify UUID

FFF1

Write UUID

FFF2

UART Baudrate

115200/8/N/1

硬件说明

引脚图

_images/bt3721v-pin.png

模块引脚分布示意图

引脚描述(一)

Pin

Pin Name

Type

Pin Descriptions

1

UART_CTS

I/O

UART_CTS
Alternative function 1: Programmable I/O

2

UART_RTS

I/O

UART_RTS
Alternative function 1: Programmable I/O

3

AOI0/PIO0

I/O

ADC
Alternative function 1: Programmable I/O

4

UART_TX

O

UART_TX

5

UART_RX

I

UART_RX

6

RESET

I

RESET
System rest input with pull high, low active with low to trigger system rest

7

GND

Vss

Power Ground

8

BT_STA

I/O

BT status: Bluetooth unconnected output low, Bluetooth connected output high

9

PIO1

I/O

Programmable I/O

10

PIO2

I/O

Programmable I/O

11

PIO3

I/O

Programmable I/O

12

SWDIO

I/O

DEBUG: SWDIO

13

SWDCLK

I

DEBUG: SWDCLK

14

GND

Vss

Power Ground

15

VDD

VDD

3V3 Power input

引脚描述(二)

Pin

Pin Name

Type

Pin Descriptions

16

PIO4/SPI_CLK

I/O

Programmable I/O
Alternative function 1:SPI_CLK

17

PIO5/SPI_CS

I/O

Programmable I/O
Alternative function 1:SPI_CS

18

BT_WAKE_HOST

O

BT_WAKE_HOST: Output high level to wake up
the HOST, output low level to put the HOST
to sleep

19

PIO6/SPI_MISO

I/O

Programmable I/O
Alternative function 1:SPI_MISO

20

HOST_WAKE_BT

I

HOST_WAKE_BT: Input high level to wake up
BT, input low level to put BT to sleep
high level control module wake up

21

GND

Vss

Power Ground

22

PIO7

I/O

Programmable I/O

23

PIO8

I/O

Programmable I/O

24

GND

Vss

Power Ground

25

ANT

RF

Bluetooth transmit/receive

26

GND

Vss

Power Ground

硬件设计说明

  • 模组连接VDD/GND/UART_RX/UART_TX即可使用

  • 如果MCU需要获取蓝牙模组的连接状态,需要接 PIN8 引脚

  • 如果有低功耗需求,请连接PIN18(BT_WAKE_HOST)和PIN20(HOST_WAKE_BT)

  • 画完原理图后请发给飞易通进行审核,避免蓝牙距离达不到最佳效果

应用场景

Profile初始化及修改参数

下图展示了Profile初始化以及修改名称

模组在蓝牙未连接时,串口数据按 AT 指令解析,主机可查询/修改默认参数,流程:

  1. 修改设备名为 ABC

  2. 查询设备名

  3. 查询蓝牙地址

@startuml
hide footbox
skinparam sequenceMessageAlign center


box "local" #LightBlue
participant Host as host
participant Module as mod
end box

rnote over host, mod: 修改设备名为ABC

host -> mod: AT+NAME=ABC\\r\\n
mod  -> host: \\r\\nOK\\r\\n

rnote over host, mod: 查询设备名

host -> mod: AT+NAME\\r\\n
mod  -> host: \\r\\n+NAME=ABC\\r\\n\\r\\nOK\\r\\n

rnote over host, mod: 查询蓝牙地址

host -> mod: AT+ADDR\\r\\n
mod -> host: \\r\\n+ADDR=DC0D30010203\\r\\n\\r\\nOK\\r\\n
@enduml

发送数据的流程

模组上电会持续向外发送广播数据,远端蓝牙(手机)可以通过搜索获取到广播包, 并向模组发起连接请求。 连接成功后模组会拉高连接状态脚通知主机蓝牙连接成功。 主机可以通过蓝牙模组将数据发送给远端蓝牙, 远端蓝牙也可以把数据发送给主机。

@startuml
hide footbox
skinparam sequenceMessageAlign center

box "local" #LightBlue
participant Host as host
participant Module as bt
end box

box "remote" #LightBlue
participant ”Remote BT“ as remote
end box

rnote over host, remote: 建立连接

        bt --> remote: 广播包
        bt <-  remote: 扫描
        bt --> remote: 广播包
        bt <-  remote: 请求建立连接

rnote over host, remote: 连接成功

host <- bt: 拉高连接状态脚

rnote over host, remote: 发送数据

host -> bt: 串口发送 ABC
        bt ->  remote: 蓝牙发送 ABC
        bt <-  remote: 蓝牙发送 DEF
host <- bt: 串口输出 DEF

        bt <-  remote: 断开蓝牙

host <- bt: 连接断开

host <- bt: 拉低连接状态脚
        bt --> remote: 广播包

@enduml

模组做主机连接远端设备

模组可以作为主设备去连接从设备,主机可以发送指令控制模组进行扫描连接和断开。下图展示了连接其他设备的过程:

@startuml

hide footbox
skinparam sequenceMessageAlign center

box "local" #LightBlue
participant Host as host
participant Module as bt
end box

box "remote" #LightBlue
participant ”Remote BT“ as remote
end box

host -> bt: AT+SCAN=1\\r\\n
host <- bt: \\r\\nOK\\r\\n
        bt ->  remote: 扫描
        bt <-- remote: 广播包
host <- bt: \\r\\n+SCAN=0,1,DC0D30001ED4,-65,10,FSC-BT946\\r\\n
host -> bt: AT+LECCONN=DC0D30001ED41\\r\\n
host <- bt: \\r\\nOK\\r\\n
        bt ->  remote: 请求建立连接

rnote over host, remote: 连接成功

host <- bt: 拉高连接状态脚

rnote over host, remote: 发送数据

host -> bt: 串口发送 ABC
        bt ->  remote: 蓝牙发送 ABC
        bt <-  remote: 蓝牙发送 DEF
host <- bt: 串口输出 DEF

host -> bt: AT+LEDISC\\r\\n
host <- bt: \\r\\nOK\\r\\n
        bt ->  remote: 断开蓝牙

rnote over host, remote: 连接断开

host <- bt: 拉低连接状态脚
        bt --> remote: 广播包

@enduml

附录

下载 PDF版本

下载PDF版本