FSC-BT6038A programming user guide
Introduction
Release note
Index |
Version |
Date |
Description |
1
|
V1.0.0
|
2024/05/23
|
First edition
|
2
|
V1.0.1
|
2024/07/09
|
Add le audio description
Add GATT description
Fix known issues
|
3
|
V1.0.2
|
2025/01/07
|
Fix known issues
Add some command and event descriptions
|
Description
This design guide is suitable for engineers to develop FSC-BT6038A series bluetooth modules
Module default settings
BR/EDR Name |
FSC-BT6038A |
BLE Name |
FSC-BT6038A-LE |
UART configuration |
115200/8/N/1 |
Hardware description
Pin diagram
FSC-BT6038A as an example:
Pin description
Pin |
Name |
Type |
Descriptions |
|---|---|---|---|
1
|
SYS_CTRL
|
I
|
Typically connected to an ON/OFF push button
Also usable as a digital input in normal operation
|
2
|
MIC_LP
|
A
|
Microphone differential 1 input, positive
Differential audio line input 1, positive
|
3
|
MIC_LN
|
A
|
Microphone differential 1 input, negative
Differential audio line input 1, negative
|
4
|
MIC_RN
|
A
|
Microphone differential 2 input, negative
Differential audio line input 2, negative
|
5
|
MIC_RP
|
A
|
Microphone differential 2 input, positive
Differential audio line input 2, positive
|
6
|
MIC_BIAS
|
A
|
Mic bias output
|
7
|
NC
|
N
|
Not connect
|
8
|
NC
|
N
|
Not connect
|
9
|
VDD_IO
|
P
|
I/O port supply
|
10
|
PIN34
I2C_SDA
|
I/O
|
Programmable I/O
Alternative funciton I2C_SDA
|
11
|
PIN35
I2S_SCL
|
I/O
|
Programmable I/O
Alternative funciton I2C_SCL
|
12
|
NC
|
N
|
Not connect
|
13
|
NC
|
N
|
Not connect
|
14
|
PIO18
I2S_DOUT
|
I/O
|
Programmable I/O
Alternative funciton I2S_DOUT
|
15
|
PIO16
I2S_BCLK
|
I/O
|
Programmable I/O
Alternative funciton I2S_BCLK
|
16
|
PIO19
I2S_DIN
|
I/O
|
Programmable I/O
Alternative funciton I2S_DIN
|
17
|
PIO17
I2S_WS
|
I/O
|
Programmable I/O
Alternative funciton I2S_WS
|
18
|
PIO15
I2S_MCLK
|
I/O
|
Programmable I/O
Alternative funciton I2S_MCLK
|
19
|
VDD
|
P
|
Power supply
|
20
|
GND
|
P
|
Power ground
|
21
|
AIO0
|
I/O
|
General-purpose analog/digital input or OD LED output
|
22
|
AIO1
|
I/O
|
General-purpose analog/digital input or OD LED output
|
23
|
RESET
|
I
|
External reset input
|
24
|
VBUS
|
P
|
USB power
|
25
|
GND
|
P
|
Power ground
|
26
|
USB_DP
|
I/O
|
USB data positive
|
27
|
USB_DN
|
I/O
|
USB data negative
|
28
|
PIN7
TRBI_MISO
|
I/O
|
Programmable I/O
TRBI_MISO
|
29
|
PIN6
TRBI_MOSI
|
I/O
|
Programmable I/O
TRBI_MOSI
|
30
|
PIN8
TRBI_CLK
|
I/O
|
Programmable I/O
TRBI_CLK
|
31
|
PIO5
UART_TX
|
I/O
|
Programmable I/O
Alternative funciton UART_TX
|
32
|
PIO4
UART_RX
|
I/O
|
Programmable I/O
Alternative funciton UART_RX
|
33
|
PIO3
UART_CTS
SPDIF_IN
|
I/O
|
Programmable I/O
Alternative funciton UART_CTS
SPDIF_IN
|
34
|
GND
|
P
|
Power ground
|
35
|
EXT_ANT
|
A
|
Antenna
|
36
|
GND
|
P
|
Power ground
|
Hardware design notes
The simple test of the module only needs to connect VDD/VDD_IO/VBUS/GND/UART_RX/UART_TX to use
After drawing, please send it to feasy.com for review so as not to have the best bluetooth distance
Function description
Profiles
SPP (Serial Port Profile)
GATTS (Generic Attribute Profile LE-Peripheral)
GATTC (Generic Attribute Profile LE-Central)
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)
LEA (Le Audio 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 |
Command description
Terms
Throughout this specification:
Content between { } is optional
Content behind << represents a command from host
Content behind >> represents a response/event to host
Command format
All commands start with “AT”, end with <CR><LF>
<CR> means “carriage return”, corresponds to hex value 0x0D
<LF> means “line feed”, corresponds to hex value 0x0A
If command has parameter, parameter follows behind ‘=’
If command has multiple parameters, parameter must be separated by ‘,’
If command has response, response starts with <CR><LF>, ends with <CR><LF>
Module will always report command’s execution result by using “OK” for success or “ERROR” for failure
Event format
All events start with <CR><LF>, end with <CR><LF>
If event has parameter, parameter follow behind ‘=’
If event has multiple parameters, parameter must be separated by ‘,’
Commands table
General commands
AT+HELP - List firmware information and all support command
Command |
AT+HELP |
Response
|
<FIRMWARE FUNCTION: appropriate working scenario>
<OTA PATH: latest suitable firmware path on server for upgrade On-The-Air>
<ENABLED PROFILES: LINKS: ON/OFF>
…
…
<COMMAND SUMMARY: DESCRIPTION: PROFILE CATEGORY>
|
AT+VER - Get firmware version information
Command |
AT+VER |
Response |
+VER=Param1,Param2,Param3 |
Description |
AT+BAUD - Get/Set uart baudrate
Command |
AT+BAUD{=Param} |
Param |
9600/ 19200/ 38400/ 57600/ 115200/ 230400/ 460800
500000/ 921600/ 1000000/ 1382400/ 1500000/ 2000000
|
Response |
+BAUD=Param |
|
Current baudrate |
Description |
It takes effect immediately and does not need to be restarted |
AT+I2SCFG - Get/Set I2S configuration
Command |
AT+I2SCFG{=Param} |
|
A base-10 representation of a bit field, for each bit |
BIT[0] |
0: disable
1: enable
|
BIT[1] |
0: master
1: slave
|
BIT[2] |
0: 48000Hz
1: 44100Hz
|
BIT[3] |
0: left justified
1: right justified
|
BIT[4] |
0: data 1 bit delay
1: data no delay
|
BIT[5:6] |
00: bit depth=16bits
01: bit depth=24bits
10: bit depth=32bits
|
Response |
+I2SCFG=Param |
|
Current I2S configuration |
Description |
It takes effect after the restart |
AT+MICGAIN - Get/Set input gain
Command |
AT+MICGAIN{=Param} |
Param |
0 ~ 10: Set target value
+: Increase
-: Decrease
|
Response |
+MICGAIN=Param |
|
Current input gain |
Description
|
In usb input mode, the parameter only be +/-, and get the parameter is invalid
In I2S/SPDIF input mode, the command is invalid
|
AT+REBOOT - Soft reboot
Command |
AT+REBOOT |
Description |
Module will disconnect all profiles then reboot |
AT+RESTORE - Restore factory settings
Command |
AT+RESTORE |
Description |
Module restore all factory settings then reboot |
AT+BTEN - Get/Set bluetooth state
Command |
AT+BTEN{=Param} |
Param |
0: Disable
1: Enable
|
Response |
+BTEN=Param |
|
Current bluetooth state |
AT+LECFG - Get/Set random BLE address state
Command |
AT+LECFG{=Param} |
Param |
0: Disable
1: Enable
|
Response |
+LECFG=Param |
|
Current state |
AT+PROFILE - Get/Set bluetooth profile
Command |
AT+PROFILE{=Param} |
|
A base-10 representation of a bit field, for each bit: |
|
SPP (Serial Port Profile) |
|
GATT Server (Generic Attribute Profile) |
|
GATT Client (Generic Attribute Profile) |
|
HFP-HF (Hands-Free Profile Handsfree) |
|
HFP-AG (Hands-Free Profile Audio Gateway) |
|
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 Keyboard (Human Interface Profile) |
|
PBAP Server (Phonebook Access Profile) |
|
LE Audio (LE Audio Profile) |
Response |
+PROFILE=Param |
|
Current profile selection |
Description
|
If modify profile, the module will reboot
BT6038A only support SPP, HFP-AG, A2DP Source, AVRCP Target, LEA, GATT Server
LEA, GATT Server cannot be uesd together
|
AT+AUTOCONN - Get/Set poweron auto reconnect
Command |
AT+AUTOCONN{=Param} |
Param |
0: Disable
1 ~ 15: Reconnect times
|
Response |
+AUTOCONN=Param |
|
Current auto reconnect configuration |
Description |
In Le Audio, the setting will be invalidated |
AT+STAT - Get all state
Command |
AT+STAT |
Response |
+STAT=Param1,Param2,Param3,Param4,Param5,Param6,Param7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
AT+DEVSTAT - Get device state
Command |
AT+DEVSTAT |
Response |
+DEVSTAT=Param |
|
AT+ADDR - Get BR/EDR MAC address
Command |
AT+ADDR |
Response |
+ADDR=Param |
|
Module’s BR/EDR MAC address(12 bytes ASCII) |
AT+LEADDR - Get BLE MAC address
Command |
AT+LEADDR |
Response |
+LEADDR=Param |
|
Module’s LE MAC address(12 bytes ASCII) |
AT+NAME - Get/Set BR/EDR name
Command |
AT+NAME{=Param1{,Param2}} |
|
BR/EDR name |
Param2 |
0: Disable suffix
1: Enable suffix“XXXX”(lower 4 bytes of MAC address) after name
|
Response |
+NAME=Param |
|
BR/EDR name |
Description |
The name contains a maximum of 31 bytes |
AT+LENAME - Get/Set BLE name
Command |
AT+LENAME{=Param1{,Param2}} |
|
BLE name |
Param2 |
0: Disable suffix
1: Enable suffix“XXXX”(lower 4 bytes of MAC address) after name
|
Response |
+LENAME=Param |
|
BLE name |
Description |
The name contains a maximum of 31 bytes |
AT+ADVDATA - Get/Set BLE advertising data
Command |
AT+ADVDATA{=Param} |
|
advertising data |
Response |
+ADVDATA=Param |
|
advertising data |
Description
|
This parameter must be a hexadecimal string
Must br an even length and a maximum of 62 bytes hexadecimal string
|
AT+COD - Get/Set class of device
Command |
AT+COD=Param |
|
Class of device(6 bytes ASCII) |
Response |
+COD=Param |
|
Current class of device |
Description |
Class of device reference COD |
AT+PAIR - Get/Set BR/EDR visibility
Command |
AT+PAIR=Param |
Param |
0: Exit BR/EDR discoverable mode
1: Enter BR/EDR discoverable mode
|
Response |
+PAIR=Param |
|
Current BR/EDR visibility |
AT+SCAN - Scan nearby devices
Command |
AT+SCAN=Param1{,Param2}{,Param3} |
Param1 |
0: Stop scan
1: Scan nearby BR/EDR devices
2: Scan nearby BLE devices
|
|
Scan time less than 255 (Unit: s) |
Param3 |
0: BLE report like BR/EDR
1: BLE report advertising data
2: Only report support le audio device
|
Description |
AT+PLIST - Get/Delete paired list
Command |
AT+PLIST{=Param} |
Param |
0: Clear all paired record
1 ~ 8: Clear specific paired record with index
MAC(12 bytes ASCII): Clear specific paired record with MAC address
|
Response1 |
+PLIST=Param1, Param2{,Param3} |
|
Paired device’s index |
|
Paired device’s MAC address |
|
Paired device’s name(UTF8) |
Response2 |
+PLIST=E |
Description |
If parameter not exist then list all paired devices |
AT+DSCA - Release all connections
Command |
AT+DSCA |
Description
|
This command only initiates a disconnect request
The actual status depends on the query
|
AT+TPMODE - Get/Set throughput mode
Command |
AT+TPMODE{=Param} |
Param |
0: Disable
1: Enable
|
Response |
+TPMODE=Param |
|
Current throughput mode |
Description
|
When SPP/GATT profile connected and throughput mode is on
The command will be de-active, every byte received via physical UART will be sent to air
|
AT+AUXCFG - Get/Set audio input mode
Command |
AT+AUXCFG{=Param} |
Param |
0: USB
1: Analog
2: SPDIF
3: I2S
|
Response |
+AUXCFG=Param |
|
Current audio input mode |
Description
|
It takes effect after the restart
In le audio only support usb and analog
|
AT+LINKKEY - Get remote device link key
Command |
AT+LINKKEY=Param |
|
MAC address of target device(12 bytes ASCII) |
Response |
+LINKKEY=Param1,Param2 |
|
MAC address of target device(12 bytes ASCII) |
|
Target device’s link key(32 bytes ASCII) |
AT+RSSI - Get remote device rssi
Command |
AT+RSSI=Param |
|
MAC address of target device(12 bytes ASCII) |
Response |
+RSSI=Param1,Param2 |
|
MAC address of target device(12 bytes ASCII) |
|
Target device’s RSSI |
Description |
If 0 is returned, the acquisition failed |
AT+LINKCFG - Get/Set auto scan and connect
Command |
AT+LINKCFG{=Param1{,Param2}} |
Param1 |
0: Disable
1: Enable
|
Param2 |
0: Scan all devices
1: Only scan major service class is rendering or audio
|
AT+AUDMODE - Get/Set audio mode
Command |
AT+AUDMODE{=Param1} |
Param1 |
0: BR/EDR mode
1: LE audio broadcast mode
2: LE audio unicast mode
|
Description |
Change this setting module will reboot |
AT+PRINT - Get/Set report mode
Command |
AT+PRINT{=Param1} |
Param1 |
0: Disable
1: Enable
|
Description |
On/Off module actively report a message |
HFP commands
AT+HFPSTAT - Get HFP state
Command |
AT+HFPSTAT |
Response |
+HFPSTAT=Param |
Param |
AT+HFPCONN - Establish HFP connection
Command |
AT+HFPCONN{=Param} |
|
MAC address of target device(12 bytes ASCII) |
Description |
Reconnect to last HFP device if parameter not exist |
AT+HFPDISC - Release HFP connection
Command |
AT+HFPDISC |
Description
|
This command only initiates a disconnect request
The actual status depends on the query
|
AT+HFPRING - Simulate incoming call
Command |
AT+HFPRING{=Param} |
|
Phone number(ASCII) |
Description
|
The phone number contains a maximum of 15 bytes
Dial specific number if parameter exist, otherwise redial
|
AT+HFPANSW - Pick up incoming call
Command |
AT+HFPANSW |
AT+HFPCHUP - Reject/Hung up call
Command |
AT+HFPCHUP |
AT+HFPAUDIO - Establish/Release voice audio
Command |
AT+HFPAUDIO=Param |
Param |
0: Release voice audio connection with remote hfp sink device
1: Establish voice audio connection with remote hfp sink device
|
AT+HFPWBS - Get/Set hfp codec negotiation
Command |
AT+HFPWBS{=Param} |
Param |
0: Disable hfp codec negotiation
1: Enable hfp codec negotiation
|
Response |
+HFPWBS=Param |
Param |
Current state |
AT+HFPNREC - Get/Set hfp cvc
Command |
AT+HFPNREC{=Param} |
Param |
0: Disable hfp cvc
1: Enable hfp cvc
|
Response |
+HFPNREC=Param |
Param |
Current state |
A2DP/AVRCP commands
AT+A2DPSTAT - Get A2DP state
Command |
AT+A2DPSTAT |
Response |
+A2DPSTAT=Param |
Param |
AT+A2DPCONN - Establish A2DP connection
Command |
AT+A2DPCONN{=Param} |
|
MAC address of target device(12 bytes ASCII) |
Description |
Reconnect to last A2DP device if parameter not exist |
AT+A2DPDISC - Release A2DP connection
Command |
AT+A2DPDISC |
Description
|
This command only initiates a disconnect request
The actual status depends on the query
|
AT+A2DPCFG - Get/Set A2DP configuration
Command |
AT+A2DPCFG{=Param} |
|
A base-10 representation of a bit field, for each bit |
BIT[0] |
0: Disable AAC
1: Enable AAC
|
BIT[1] |
0: Disable APTX
1: Enable APTX
|
BIT[2] |
0: Disable APTX-LL
1: Enable APTX-LL
|
BIT[3] |
0: Disable APTX-HD
1: Enable APTX-HD
|
BIT[4] |
0: Disable APTX-AD
1: Enable APTX-AD
|
BIT[5] |
0: Disable LDAC
1: Enable LDAC
|
Response |
Current A2DP configuration |
Description |
BT6038A only support APTX, APTX-AD, APTX-HD |
AT+A2DPENC - Get A2DP encoder
Command |
AT+A2DPENC |
Response |
+A2DPENC=Param |
|
AT+A2DPAUDIO - Establish/Release A2DP audio connection
Command |
AT+A2DPAUDIO=Param |
Param |
0: Release A2DP audio connection with remote a2dp sink device
1: Establish A2DP audio connection with remote a2dp sink device
|
AT+AVRCPSTAT - Get AVRCP state
Command |
AT+AVRCPSTAT |
Response |
+AVRCPSTAT=Param |
|
AT+AVRCPCONN - Establish AVRCP connection
Command |
AT+AVRCPCONN{=Param} |
|
MAC address of target device(12 bytes ASCII) |
Description |
Reconnect to last device if parameter not exist |
AT+AVRCPDISC - Release AVRCP connection
Command |
AT+AVRCPDISC |
Description
|
This command only initiates a disconnect request
The actual status depends on the query
|
AT+AVRCPSPKVOL - Get/Set remote volume
Command |
AT+AVRCPSPKVOL{=Param} |
|
Volume value(0 - 15) |
Description
|
Set remote volume
The command must be sent after AVRCP connection is established
And the remote device must support volume control
|
GATT commands
AT+GATTSTAT - Get GATT state
Command |
AT+GATTSTAT |
Response |
+GATTSTAT=Param |
|
AT+GATTSEND - Send data via GATT
Command |
AT+GATTSEND=Param1,Param2 |
|
Payload length(1 ~ 236) |
|
Payload(1~236 bytes) |
Description |
If throughput mode is on, this command is de-active |
SPP commands
AT+SPPSTAT - Get SPP state
Command |
AT+SPPSTAT |
Response |
+SPPSTAT=Param |
|
AT+SPPDISC - Release SPP connection
Command |
AT+SPPDISC |
Description
|
This command only initiates a disconnect request
The actual status depends on the query
|
AT+SPPSEND - Send data via SPP
Command |
AT+SPPSEND=Param1,Param2 |
|
Payload length(1 ~ 236) |
|
Payload(1~236 bytes) |
Description |
If throughput mode is on, this command is de-active |
LE Audio commands
AT+LEASTAT - Get Le Audio state
Command |
AT+LEASTAT |
Response |
+LEASTAT=Param |
|
AT+LEADISC - Release Le Audio connection
Command |
AT+LEADISC |
Description
|
This command only initiates a disconnect request
The actual status depends on the query
Only In le audio unicast mode support
|
AT+LEACONN - Establish le audio connection
Command |
AT+LEACONN=Param1 |
|
MAC address of target device(12 bytes ASCII) |
Description |
Only In le audio unicast mode support |
Events table
General events
+VER - Frmware version information
Event |
+VER=Param1,Param2,Param3 |
|
Module type |
|
Firmware version |
|
Firmware compile time |
+DEVSTAT - Device state
Event |
+DEVSTAT=Param |
|
A base-10 representation of a bit field, for each bit: |
BIT[0] |
0: Power off
1: Power on
|
BIT[1] |
0: BR/EDR not discoverable
1: BR/EDR discoverable
|
BIT[2] |
0: BLE not advertising
1: BLE advertising
|
BIT[3] |
0: BR/EDR not scanning
1: BR/EDR scanning
|
BIT[4] |
0: BLE not scanning
1: BLE scanning
|
+SCAN - Scan result
Event1 |
+SCAN =Param1,Param2,Param3, Param4,Param5{,Param6{,Param7}} |
|
Index |
Param2 |
0: LE public address
1: LE random address
2: BR/EDR address
|
|
MAC address(12 bytes ASCII) |
|
RSSI(-127 ~ -1) |
|
Size of Param6 if exist |
|
Device name for BR/EDR devices or advertising data for LE devices |
|
Class of device |
Event2 |
+SCAN=E |
Description |
Scan finsh |
+PAIRED - Pair result
Event |
+PAIRED=Param |
|
MAC address(12 bytes ASCII) of current pairing device |
+I2SSR - I2S sample rate
Event |
+I2SSR=Param |
|
I2S sample rate |
HFP events
+HFPSTAT - HFP state
Event |
+HFPSTAT=Param |
Param1 |
0: Unsupported
1: Standby
2: Connecting
3: Connected
4: Outgoing call
5: Incoming call
6: Active call
|
+HFPDEV - HFP remote device information
Event |
+HFPDEV=Param1{,Param2} |
|
Remote MAC address(12 bytes ASCII) of current HFP connection |
|
Remote device name(UTF8) of current HFP connection |
+HFPCONN - HFP connecting
Event |
+HFCONN=Param |
|
Remote MAC address(12 bytes ASCII) of current HFP connecting |
+HFPAUDIO - HFP voice audio State
Event |
+HFPAUDIO=Param |
Param |
0: HFP voice audio disconnected, audio input/output routed to remote device
1: HFP voice audio connected, audio input/output routed to module
|
+HFPCID - HFP call phone number
Event |
+HFPCID=Param |
|
Phone number(ASCII) |
+HFPSR - HFP sample rate
Event |
+HFPSR=Param |
|
Sample rate |
+HFPHUNG - HFP remote device reject an incoming call or end an ongoing call
Event |
+HFPHUNG |
+HFPVGS - HFP remote device spker gian
Event |
+HFPVGS=Param |
|
Remote device spker gain |
+HFPVGM - HFP remote device microphone gian
Event |
+HFPVGM=Param |
|
Remote device microphone gain |
A2DP/AVRCP events
+A2DPSTAT - A2DP state
Event |
+A2DPSTAT=Param |
Param |
0: Unsupported
1: Standby
2: Connecting
3: Connected
4: Streaming
5: Paused
|
+A2DPENC - A2DP encoder
Event |
+A2DPENC=Param |
Param |
1:SBC
2:APTX
3:APTX-HD
4:APTX-AD
|
+A2DPDEV - A2DP remote device information
Event |
+A2DPDEV=Param1{,Param2} |
|
Remote device’s MAC address(12 bytes ASCII) of current A2DP connection |
|
Remote device’s name(UTF8) of current A2DP connection |
+A2DPCONN - A2DP connecting
Event |
+A2DPCONN=Param |
|
Remote MAC address(12 bytes ASCII) of current A2DP connecting |
+A2DPSR - A2DP codec sample rate
Event |
+A2DPSR=Param |
|
A2DP codec sample rate |
+AVRCPSTAT - AVRCP state
Event |
+AVRCPSTAT=Param |
Param |
0: Unsupported
1: Standby
2: Connecting
3: Connected
|
+AVRCPCONN - AVRCP connecting
Event |
+AVRCPCONN=Param |
|
Remote MAC address(12 bytes ASCII) of current AVRCP connecting |
+SPKVOL - Remote spker volume change
Event |
+SPKVOL=Param |
|
Remote spker volume |
+CTVOLUP - volume up
Event |
+CTVOLUP |
Description |
Receive volume up command |
+CTVOLDN - volume down
Event |
+CTVOLDN |
Description |
Receive volume down command |
+CTPLAY - Track play
Event |
+CTPLAY |
Description |
Receive play command |
+CTPAUSE - Track pause
Event |
+CTPAUSE |
Description |
Receive pause command |
+CTSTOP - Track stop
Event |
+CTSTOP |
Description |
Receive stop command |
+CTFWD - Track forward
Event |
+CTFWD |
Description |
Receive forward command |
+CTBACK - Track backward
Event |
+CTBACK |
Description |
Receive backward command |
LE Audio events
+LEASTAT - LE Audio state
Format |
+LEASTAT=Param |
Param |
0: Unsupported
1: Standby
2: Connecting
3: Connected
4: Streaming
5: Pause
|
+LEASR - LE Audio sample rate
Format |
+LEASR=Param |
Param |
Sample rate |
GATT events
+GATTSTAT - GATT state
Format |
+GATTSTAT=Param |
Param |
0: Unsupported
1: Standby
2: Connecting
3: Connected
|
+GATTDATA - GATT received incoming data
Format |
+GATTDATA=Param1,Param2 |
|
Payload length |
|
Payload |
SPP events
+SPPSTAT - SPP state
Format |
+SPPSTAT=Param |
Param |
0: Unsupported
1: Standby
2: Connecting
3: Connected
|
+SPPDATA - SPP received incoming data
Format |
+SPPDATA=Param1,Param2 |
|
Payload length |
|
Payload |
+SPPDEV - SPP remote device information
Event |
+SPPDEV=Param1 |
|
Remote device’s MAC address(12 bytes ASCII) of current SPP connection |
Application scenarios
profiles initializing and change parameter
The following figure shows Profile initialization and name modification
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
Source mode connection
Le Audio broadcast mode
Note
Now scan broadcast data using other sink devices that support le audio
Le Audio unicast mode
SPP data transfer
Note
SPP connect is not supported iphone
GATT data transfer