Development Examples
Modify Bluetooth Name
For the MCU to modify the device name to CARKIT, the reference code example is as follows:
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"); // 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
Before the MCU modifies any parameters, it is recommended to first query, then modify, and finally verify.
SPP Data Transmission
Note
Apple devices do not support SPP connection.
GATT Data Transmission
Audio Source Application
A2DP/HFP Application
LE Audio Broadcast Application
Note
After setting it up, you can use devices that support the Le Audio function for scanning, such as FSC-BT1038A.
LE Audio Unicast Mode
Audio Sink Application
Classic Auido Sink Mode Application
LE Audio Broadcast Slave Application