FSC-BT1036 User Instructions

Introduction

Description

This design guide is suitable for engineers to develop FSC-BT1036 series Bluetooth modules, also suitable for BT955, BT936B, BT909C, BT906 series modules

Module Default Settings

Name

FSC-BT1036-XXXX

LE-Name

FSC-BT1036-LE-XXXX

Pin Code

0000

Secure Simple Pairing Mode

ON

UART Baudrate

115200/8/N/1

Hardware Description

Pin Diagram

FSC-BT1036C as an example:

_images/BT1036_pin_map.png

Pin Description

Pin

Pin Name

Type

Pin Descriptions

4

I2S_CLK

I/O

I2S BCLK

5

I2S_IN

I

I2S DATA IN

6

I2S_OUT

O

I2S DATA OUT

7

I2S_WS

I/O

I2S SYNC

8

RESET

I

External reset input: active Low

13

UART_TX

O

UART TX

14

UART_RX

I

UART RX

15

UART_CTS

I/O

UART CTS

16

UART_RTS

I/O

UART RTS(default: PA mute pin)

17

LED0

I/O

Output square wave in pairing mode,
output high level when bluetooth is connected

18

LED1

I/O

SPP/GATT is not connected to output low level,
connected to output high level

32

GND

GND

GND

33

VDD

VDD

Power supply for I/O ports, DC 3.3V

40

MIC_RP

Audio

MIC0/Line_IN differential R input, positive

41

MIC_RN

Audio

MIC0/Line_IN differential R input, negative

43

MIC_LP

Audio

MIC0/Line_IN differential L input, positive

44

MIC_LN

Audio

MIC0/Line_IN differential L input, negative

45

MIC_BASE

Audio

MIC Power Supplies

46

SPK_RN

Audio

Headphone/speaker differential R output, negative

47

SPK_RP

Audio

Headphone/speaker differential R output, positive

48

SPK_LN

Audio

Headphone/speaker differential L output, negative

49

SPK_LP

Audio

Headphone/speaker differential L output, positive

51

EXT_ANT

ANT

Change the 0 ohm resistance near the antenna,
you can connect an external Bluetooth antenna

Hardware Design Notes

  • The simple test of the module only needs to connect VDD/GND/UART_RX/UART_TX to use

  • After drawing the schematic diagram, please send it to Feasycom for review,so as to avoid the Bluetooth distance not reaching the best effect

Function Description

Profiles & Features

  • SPP (Serial Port Profile)

  • GATTS (Generic Attribute Profile LE-Peripheral role)

  • GATTC (Generic Attribute Profile LE-Central role)

  • HFP-HF (Hands-Free Profile)

  • HFP-AG (Hands-Free-AG Profile)

  • A2DP-Sink (Advanced Audio Distribution Profile)

  • A2DP-Source (Advanced Audio Distribution Profile)

  • AVRCP-Controller (Audio/Video remote controller Profile)

  • AVRCP-Target (Audio/Video remote controller Profile)

  • HID-DEVICE (Human Interface Profile)

  • PBAP (Phonebook Access Profile)

GATT Default service and characteristic

Type

UUID

Characteristic

Description

Service

0xFFF0

throughput services

Write

0xFFF2

Write,Write Without Response

app send to module

Notify

0xFFF1

Notify

module send to app

Application scenarios

profiles initializing and change parameter

The following figure shows Profile initialization and name modification

@startuml
hide footbox
skinparam sequenceMessageAlign center

box  #LightBlue
participant Host as host
participant Blueware as bt
end box

rnote over host, bt: Profile initialization

bt -> host: +DEVSTAT=0
bt -> host: +PWRSTAT=1
bt -> host: +VER=BT1036,V2.0.1,20210922
bt -> host: +PROFILE=1195
bt -> host: +SPPSTAT=1
bt -> host: +GATTSTAT=1
bt -> host: +A2DPSTAT=1
bt -> host: +AVRCPSTAT=1
bt -> host: +HFPSTAT=1
bt -> host: +PBSTAT=1
bt -> host: +DEVSTAT=1
bt -> host: +DEVSTAT=7 (auto discoverable,phone can find and connect to us)

rnote over host, bt: change name to "CARKIT",disable suffix. and verify readback
host -> bt: AT+NAME
bt -> host: AT+NAME=FSC-BT1036-1E49
host -> bt: AT+NAME=CARKIT,0
bt -> host: OK
host -> bt: AT+NAME
bt -> host: +NAME=CARKIT

@enduml

MCU change device name CARKIT reference code:

 1void change_name(void)
 2{
 3    uart_send("AT+NAME\r\n");
 4    if(uart_read("+NAME",name_buf))
 5    {
 6        if(memcmp(name_buf,"CARKIT",6))
 7        {
 8            uart_send("AT+NAME=CARKIT,0\r\n");      //defalut disable MAC address suffix
 9            uart_send("AT+NAME\r\n"); // read bt name
10            if(uart_read("+NAME",name_buf))
11            {
12                if(memcmp(name_buf,"CARKIT",6))
13                {
14                    //change name fail
15                }
16                else
17                {
18                    //change name success
19                }
20            }
21        }
22    }
23}

Note

modify any parameters, it is recommended to query first and then modify the final verification

Sink mode connection

Note

If the factory firmware is an integrated transceiver program, the program default profile=339, Need to send AT+PRFOILE=1195 to configure audio receiving(sink) mode (Enable SPP, GATT Server, HFP Sink, A2DP Sink, AVRCP-Controller, PBAP). Some module transceiver programs do not support PBAP, such as BT955 module

@startuml
hide footbox
skinparam sequenceMessageAlign center

box  #LightBlue
participant Host as host
participant Blueware as bt
end box

rnote over host, bt: Profile initialization

bt -> host: +PROFILE=1195
bt -> host: ...
bt -> host: +DEVSTAT=7

rnote over host, bt: Mobile phone search and connect to us
bt -> host: +A2DPSTAT=2
bt -> host: +A2DPSTAT=3 (A2DP connected)
bt -> host: +A2DPDEV=8C861E94A09E,Navy
bt -> host: +AVRCPSTAT=3 (AVRCP connected)
bt -> host: +HFPSTAT=3 (HFP connected)
bt -> host: +HFPDEV=8C861E94A09E,Navy
bt -> host: +HFPSIG=3
bt -> host: +HFPBATT=4
bt -> host: +HFPROAM=0
bt -> host: +HFPNUM=8618620277271
bt -> host: +HFPMANU=AppleInc.

host -> bt: +HFPDIAL=10086 (dial number "10086")
bt -> host: OK
bt -> host: +HFPSTAT=4,10086
bt -> host: +HFPAUDIO=1 (audio established)
bt -> host: +HFPSTAT=6,10086 (call active)
host -> bt: AT+HFPCHUP(hung up)
bt -> host: +HFPSTAT=3
bt -> host: +HFPAUDIO=0 (audio release)

host -> bt: AT+PLAY(start media player)
bt -> host: +A2DPSTAT=5 (media streaming)
bt -> host: +PLAYSTAT=1 (player playing)
bt -> host: +TRACKINFO=song,artist,album (track id3 info)
bt -> host: +TRACKSTAT=1,1,240 (progress,report every second)
bt -> host: +TRACKSTAT=1,2,240
host -> bt: AT+PAUSE(pause media player)
bt -> host: +PLAYSTAT=2
bt -> host: +A2DPSTAT=4

@enduml

Source mode connection

Note

The transmission(source) mode connection needs to configure the module to A2DP Source, HFP Source, The program will not automatically enter the audio transmission mode or the call (intercom) mode after connecting the headset and speaker by default, you need to send the command: Start audio transmission (AT+AUDROUTE=1) Start HFP (AT+AUDROUTE=2)

@startuml
hide footbox
skinparam sequenceMessageAlign center

box  #LightBlue
participant Host as host
participant Blueware as bt
end box

rnote over host, bt: Profile initialization

bt -> host: +PROFILE=339
bt -> host: ...
bt -> host: +DEVSTAT=7

rnote over host, bt: search nearby devices and connect to airpods
host -> bt: AT+SCAN=1
bt -> host: +SCAN=1,-87,0,DC0D30001E49,FSC-BT1036-1E49,5A020C
bt -> host: +SCAN=2,-78,0,7C9A1DA36B41,AirPods,240404
bt -> host: +SCAN=E

host -> bt: AT+A2DPCONN=7C9A1DA36B41
bt -> host: +A2DPSTAT=2
bt -> host: +A2DPSTAT=3 (A2DP connected)
bt -> host: +A2DPDEV=7C9A1DA36B41,AirPods
bt -> host: +HFPSTAT=2
bt -> host: +HFPSTAT=3 (HFP connected)
bt -> host: +HFPDEV=7C9A1DA36B41,AirPods
bt -> host: +AVRCPSTAT=3 (AVRCP connected)


rnote over host, bt: Established A2dp audio
host -> bt: AT+AUDROUTE=1
bt -> host: +PLAYSTAT=1
bt -> host: +A2DPSTAT=5
bt -> host: +AUDMODE=1

rnote over host, bt: Release A2dp audio
host -> bt: AT+AUDROUTE=0
bt -> host: +PLAYSTAT=2
bt -> host: +A2DPSTAT=4
bt -> host: +AUDMODE=0

rnote over host, bt: Established HFP audio
host -> bt: AT+AUDROUTE=2
bt -> host: +HFPAUDIO=1 (audio established)
bt -> host: +HFPSTAT=4
bt -> host: +AUDMODE=2
bt -> host: +HFPSTAT=6

rnote over host, bt: Release HFP audio
host -> bt: AT+AUDROUTE=0
bt -> host: +HFPAUDIO=0
bt -> host: +HFPSTAT=3
bt -> host: +AUDMODE=0

@enduml

MCU connects to AirPods and starts audio transmission Reference code:

 1#define PROFILE_HFP_HF              (uint16)(BIT3)
 2#define PROFILE_HFP_AG              (uint16)(BIT4)
 3#define PROFILE_A2DP_SINK           (uint16)(BIT5)
 4#define PROFILE_A2DP_SOURCE         (uint16)(BIT6)
 5
 6void bt_connect(void)
 7{
 8    //enable hfp source,a2dp source,avrcp tg,spp,gatt
 9    uart_send("AT+PROFILE=339\r\n"); //if profile changes,module will auto reboot,
10    wait_ms(500);
11    uart_send("AT+PROFILE\r\n");
12    uint32 profiles = uart_read("+PROFILE",profiles);
13    if(profiles & (PROFILE_A2DP_SOURCE|PROFILE_HFP_AG))
14    {
15        uint8 addr[6];
16        uint8 buf[30]={0};
17        uint8 a2dp_state=0
18        uart_send("AT+SCAN=1\r\n");
19        uart_read_scan_addr("+SCAN",addr);
20        sprintf(buf,"AT+A2DPCONN=%s\r\n",addr);
21        uart_send(buf); //send a2dp connect
22
23        uart_read("+A2DPSTAT",a2dp_state);
24        if(a2dp_state == 3) //a2dp connected
25        {
26            uart_send("AT+AUDROUTE=1"); // start a2dp audio
27        }
28        uart_read("+A2DPSTAT",a2dp_state);
29        if(a2dp_state == 5)
30        {
31            //a2dp streaming
32        }
33    }
34    else
35    {/*not support master*/}
36}

HFP three way calling operations

Note

BT1036, BT955 and other modules have not enabled the three way calling function. If you need to test this function, please contact Feasycom

@startuml
hide footbox
skinparam sequenceMessageAlign center

box  #LightBlue
participant Host as host
participant Blueware as bt
end box

rnote over host, bt: HFP connected

bt -> host: ...
bt -> host: +HFPSTAT=3

rnote over host, bt: dial number "10086"
host -> bt: AT+HFPDIAL=10086
bt -> host: OK
bt -> host: +HFPSTAT=4,10086 (phone dialing)
bt -> host: +HFPAUDIO=1
bt -> host: +HFPSTAT=6,10086 (call active)

rnote over host, bt: third call waiting
bt -> host: +HFPSTAT=8,10086,18620277271
host -> bt: AT+HFPMCAL=2 (Hold active call and accept another call)
bt -> host: +HFPSTAT=9,18620277271,10086 (18620277271 active,10086 hold)
host -> bt: AT+HFPMCAL=2 (Hold active call and accept another call)
bt -> host: +HFPSTAT=9,10086,18620277271 (10086 active,18620277271 hold)

host -> bt: AT+HFPMCAL=1 (Release active call and accept another call)
bt -> host: +HFPSTAT=6,18620277271 (one call active now)

rnote over host, bt: hung up
host -> bt: AT+HFPCHUP
bt -> host: +HFPAUDIO=0
bt -> host: +HFPSTAT=3

@enduml

AVRCP filesystem browsing

Note

BT1036, BT955 and other modules have not enabled the three way calling function. If you need to test this function, please contact Feasycom

@startuml
hide footbox
skinparam sequenceMessageAlign center

box  #LightBlue
participant Host as host
participant Blueware as bt
end box

rnote over host, bt: A2DP/AVRCP connected

bt -> host: ...
bt -> host: +AVRCPSTAT=3

rnote over host, bt: filesystem browsing
bt -> host: +BROWSTAT=3 (browsing channel connected)
host -> bt: AT+GETMP (retrieve media players)
bt -> host: +BROWSTAT=4
bt -> host: +BROWDATA=P,1,1,Music (found browsable media player)
bt -> host: +BROWDATA=E,0
bt -> host: +BROWSTAT=3

host -> bt: AT+SETMP=1 (select player)
bt -> host: +BROWSTAT=4
bt -> host: +BROWDATA=R,iPhone (filesystem root:iPhone)
bt -> host: +BROWDATA=E,0
bt -> host: +BROWSTAT=3

host -> bt: AT+GETFD=1,5 (list folders under root dir)
bt -> host: +BROWSTAT=4
bt -> host: +BROWDATA=F,0100000000000000,我的音乐 (/iPhone/我的音乐)
bt -> host: +BROWDATA=F,0200000000000000,播放列表 (/iPhone/播放列表)
bt -> host: +BROWDATA=E,0
bt -> host: +BROWSTAT=3

host -> bt: AT+SETFD=0200000000000000 (list folders under 播放列表)
bt -> host: +BROWSTAT=4
bt -> host: +BROWDATA=E,0
bt -> host: +BROWSTAT=3

host -> bt: AT+GETFD=1,5
bt -> host: +BROWSTAT=4
bt -> host: +BROWDATA=F,0100000000000000,最近添加
bt -> host: +BROWDATA=F,524A57F5E4594DE6,播放历史
bt -> host: +BROWDATA=E,0
bt -> host: +BROWSTAT=3

bt <--> host: (continue list sub dir until find audio tracks:AT+SETFD=folder id,AT+GETFD=x,y)
bt -> host: +BROWDATA=M,285E9813C3AB900E,New Soul
bt -> host: +BROWDATA=F,C15E9813C3AB900E,BLUE
bt -> host: +BROWDATA=E,0
bt -> host: +BROWSTAT=3

host -> bt: AT+ADDMP=C15E9813C3AB900E (select audio track and add to media player)
bt -> host: OK
bt --> host: media player playing BLUE now

@enduml

AVRCP Cover Art image retrieval

Note

Cover Art image download is only supported by the car protocol stack module, not supported by the SOC audio module

@startuml
hide footbox
skinparam sequenceMessageAlign center

box  #LightBlue
participant Host as host
participant Blueware as bt
end box

rnote over host, bt: A2DP/AVRCP connected

bt -> host: ...
bt -> host: +AVRCPSTAT=3

rnote over host, bt: download Cover Art image
bt -> host: +BIPSTAT=3 (basic image profile connected)
bt <--> host: music start streaming
bt -> host: +TRACKINFO=song,artist,album
bt -> host: +BIPSTAT=4 (blueware auto pulling coverart jpeg image background)
bt -> host: +COVERART=1000090 (download complete)
bt -> host: +BIPSTAT=3

@enduml

Phonebook/Contact photo downloading

Note

Contact photo download is only supported by the car protocol stack module, not supported by the SOC audio module When some firmware does not support downloading, it will automatically connect to PBAP, and you need to send AT+PBCONN to connect to PBAP before downloading

@startuml
hide footbox
skinparam sequenceMessageAlign center

box  #LightBlue
participant Host as host
participant Blueware as bt
end box

rnote over host, bt: HFP connected

bt -> host: ...
bt -> host: +HFPSTAT=3

rnote over host, bt: download all phonebook
host -> bt: AT+PBDOWN=1
bt -> host: +PBSTAT=2
bt -> host: +PBSTAT=3 (PBAP connected)
bt -> host: +PBSTAT=4 (PBAP downloading)
bt -> host: +PBDATA=1,本机号码,+8618620277272
bt -> host: +PBDATA=1,张三,0571-85592192
bt -> host: ...
bt -> host: +PBDATA=1,jerry,18909731215
bt -> host: +PBDATA=E (Download compete)
bt -> host: +PBSTAT=3

rnote over host, bt: download all phonebook with contact photo
host -> bt: AT+PBDOWN=1,,,1
bt <--> host: (if item's photo flag set,photo image number.jpg should be placed in spcecify folder)
bt -> host: +PBDATA=1,本机号码,+8618620277272,1
bt -> host: +PBDATA=1,张三,0571-85592192
bt -> host: +PBDATA=1,jerry,18909731215,1
bt -> host: +PBDATA=E
bt -> host: +PBSTAT=3

rnote over host, bt: download 50 contacts in recent call history
host -> bt: AT+PBWODN=5,50
bt -> host: +PBDATA=3,yidong,+10086,20200213T114247
bt -> host: ...
bt -> host: +PBDATA=2,andy,85592192,20200212T104202
bt -> host: +PBDATA=E
bt -> host: +PBSTAT=3

@enduml

Appendix

Download PDF

Download PDF