Table of Contents

Advertisement

Quick Links

BT6038A programming user guide
Release 1.0.1
1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BT6038A and is the answer not in the manual?

Questions and answers

Summary of Contents for Feasycom BT6038A

  • Page 1 BT6038A programming user guide Release 1.0.1...
  • Page 2: Table Of Contents

    Table of contents 1 Introduction Release note ........Description .
  • Page 3 5.1.10 AT+PROFILE - Get/Set bluetooth profile ....19 5.1.11 AT+AUTOCONN - Get/Set poweron auto reconnect ..20 5.1.12 AT+STAT - Get all state .
  • Page 4 5.3.8 AT+AVRCPCONN - Establish AVRCP connection ..31 5.3.9 AT+AVRCPDISC - Release AVRCP connection ... . 32 GATT commands ....... . . 32 5.4.1 AT+GATTSTAT - Get GATT state .
  • Page 5 6.3.6 +AVRCPCONN - AVRCP connecting ....41 6.3.7 +CTVOLUP - volume up ......42 6.3.8 +CTVOLDN - volume down .
  • Page 6: Introduction

    Chapter 1 Introduction 1.1 Release note Index Version Date Description V1.0.0 2024/05/23 First edition V1.0.1 2024/07/09 Add le audio description Add GATT description Fix known issues 1.2 Description This design guide is suitable for engineers to develop FSC-BT6038A series bluetooth modules...
  • Page 7: Module Default Settings

    BT6038A programming user guide, Release 1.0.1 1.3 Module default settings BR/EDR Name FSC-BT6038A BLE Name FSC-BT6038A-LE UART configuration 115200/8/N/1 1.3. Module default settings...
  • Page 8: Hardware Description

    Chapter 2 Hardware description 2.1 Pin diagram FSC-BT6038A as an example:...
  • Page 9: Pin Description

    BT6038A programming user guide, Release 1.0.1 2.2 Pin description Name Type Descriptions SYS_CTRL Typically connected to an ON/OFF push button Also usable as a digital input in normal operation continues on next page 2.2. Pin description...
  • Page 10 BT6038A programming user guide, Release 1.0.1 Table 1 – continued from previous page Name Type Descriptions MIC_LP Microphone differential 1 input, positive Differential audio line input 1, positive MIC_LN Microphone differential 1 input, negative Differential audio line input 1, negative...
  • Page 11 BT6038A programming user guide, Release 1.0.1 Table 1 – continued from previous page Name Type Descriptions PIN35 Programmable I/O I2S_SCL Alternative funciton I2C_SCL Not connect Not connect PIO18 Programmable I/O I2S_DOUT Alternative funciton I2S_DOUT PIO16 Programmable I/O I2S_BCLK Alternative funciton I2S_BCLK...
  • Page 12 BT6038A programming user guide, Release 1.0.1 Table 1 – continued from previous page Name Type Descriptions Power ground AIO0 General-purpose analog/digital input or OD LED output AIO1 General-purpose analog/digital input or OD LED output RESET External reset input VBUS USB power...
  • Page 13 BT6038A programming user guide, Release 1.0.1 Table 1 – continued from previous page Name Type Descriptions PIN6 Programmable I/O TRBI_MOSI TRBI_MOSI PIN8 Programmable I/O TRBI_CLK TRBI_CLK PIO5 Programmable I/O UART_TX Alternative funciton UART_TX PIO4 Programmable I/O UART_RX Alternative funciton UART_RX...
  • Page 14: Hardware Design Notes

    BT6038A programming user guide, Release 1.0.1 2.3 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 2.3.
  • Page 15: Function Description

    Chapter 3 Function description 3.1 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) •...
  • Page 16: Gatt Default Service And Characteristic

    BT6038A programming user guide, Release 1.0.1 3.2 GATT Default service and characteristic Type UUID Characteristic Description Service 0xFFF0 throughput services 0xFFF2 Write Write app send to module Write Without Response Notify 0xFFF1 Notify module send to app 3.2. GATT Default service and characteristic...
  • Page 17: Command Description

    Chapter 4 Command description 4.1 Terms • Throughout this specification: • Content between { } is optional • Content behind << represents a command from host • Content behind >> represents a response/event to host 4.2 Command format AT+Command{=Param1{,Param2{,Param3…}}}<CR><LF> • All commands start with “AT”, end with <CR><LF> •...
  • Page 18: Event Format

    BT6038A programming user guide, Release 1.0.1 Example: Get module’s BR/EDR name << AT+NAME >> +NAME=FSC-BT6038A >> OK Example: Pick up an incoming call when no call incoming actually << AT+HFPANSW >> ERROR 4.3 Event format <CR><LF>+Event{=Param1{,Param2{,Param3…}}}<CR><LF> • All events start with <CR><LF>, end with <CR><LF>...
  • Page 19: Commands Table

    Chapter 5 Commands table 5.1 General commands 5.1.1 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> …...
  • Page 20: At+Baud - Get/Set Uart Baudrate

    BT6038A programming user guide, Release 1.0.1 5.1.3 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 Param Current baudrate Description It takes effect immediately and does not need to be restarted...
  • Page 21: At+I2Scfg - Get/Set I2S Configuration

    BT6038A programming user guide, Release 1.0.1 5.1.4 AT+I2SCFG - Get/Set I2S configuration Command AT+I2SCFG{=Param} 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...
  • Page 22: At+Micgain - Get/Set Input Gain

    BT6038A programming user guide, Release 1.0.1 5.1.5 AT+MICGAIN - Get/Set input gain Command AT+MICGAIN{=Param} Param 0 ~ 10: Set target value +: Increase -: Decrease Response +MICGAIN=Param Param Current input gain Description In usb input mode, the parameter only be +/-, and get the...
  • Page 23: At+Bten - Get/Set Bluetooth State

    BT6038A programming user guide, Release 1.0.1 5.1.8 AT+BTEN - Get/Set bluetooth state Command AT+BTEN{=Param} Param 0: Disable 1: Enable Response +BTEN=Param Param Current bluetooth state 5.1.9 AT+LECFG - Get/Set random BLE address state Command AT+LECFG{=Param} Param 0: Disable 1: Enable...
  • Page 24: At+Profile - Get/Set Bluetooth Profile

    LE Audio (LE Audio Profile) Response +PROFILE=Param 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 5.1. General commands...
  • Page 25: At+Autoconn - Get/Set Poweron Auto Reconnect

    BT6038A programming user guide, Release 1.0.1 5.1.11 AT+AUTOCONN - Get/Set poweron auto reconnect Command AT+AUTOCONN{=Param} Param 0: Disable 1 ~ 15: Reconnect times Response +AUTOCONN=Param Param Current auto reconnect configuration Description In Le Audio, the setting will be invalidated 5.1.12 AT+STAT - Get all state...
  • Page 26: At+Addr - Get Br/Edr Mac Address

    BT6038A programming user guide, Release 1.0.1 5.1.14 AT+ADDR - Get BR/EDR MAC address Command AT+ADDR Response +ADDR=Param Param Module’s BR/EDR MAC address(12 bytes ASCII) 5.1.15 AT+LEADDR - Get BLE MAC address Command AT+LEADDR Response +LEADDR=Param Param Module’s LE MAC address(12 bytes ASCII) 5.1.16 AT+NAME - Get/Set BR/EDR name...
  • Page 27: At+Lename - Get/Set Ble Name

    BT6038A programming user guide, Release 1.0.1 5.1.17 AT+LENAME - Get/Set BLE name Command AT+LENAME{=Param1{,Param2}} Param1 BLE name Param2 0: Disable suffix 1: Enable suffix“XXXX”(lower 4 bytes of MAC address) after name Response +LENAME=Param Param BLE name Description The name contains a maximum of 31 bytes 5.1.18 AT+ADVDATA - Get/Set BLE advertising data...
  • Page 28: At+Pair - Get/Set Br/Edr Visibility

    BT6038A programming user guide, Release 1.0.1 5.1.20 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 Param Current BR/EDR visibility 5.1.21 AT+SCAN - Scan nearby devices Command AT+SCAN=Param1{,Param2}{,Param3} Param1...
  • Page 29: At+Plist - Get/Delete Paired List

    BT6038A programming user guide, Release 1.0.1 5.1.22 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...
  • Page 30: At+Tpmode - Get/Set Throughput Mode

    BT6038A programming user guide, Release 1.0.1 5.1.24 AT+TPMODE - Get/Set throughput mode Command AT+TPMODE{=Param} Param 0: Disable 1: Enable Response +TPMODE=Param 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 5.1.25 AT+AUXCFG - Get/Set audio input mode...
  • Page 31: At+Linkkey - Get Remote Device Link Key

    BT6038A programming user guide, Release 1.0.1 5.1.26 AT+LINKKEY - Get remote device link key Command AT+LINKKEY=Param Param MAC address of target device(12 bytes ASCII) Response +LINKKEY=Param1,Param2 Param1 MAC address of target device(12 bytes ASCII) Param2 Target device’s link key(32 bytes ASCII) 5.1.27 AT+RSSI - Get remote device rssi...
  • Page 32: At+Audmode - Get/Set Audio Mode

    BT6038A programming user guide, Release 1.0.1 5.1.29 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 5.1.30 AT+PRINT - Get/Set report mode...
  • Page 33: At+Hfpconn - Establish Hfp Connection

    BT6038A programming user guide, Release 1.0.1 5.2.2 AT+HFPCONN - Establish HFP connection Command AT+HFPCONN{=Param} Param MAC address of target device(12 bytes ASCII) Description Reconnect to last HFP device if parameter not exist 5.2.3 AT+HFPDISC - Release HFP connection Command AT+HFPDISC...
  • Page 34: At+Hfpaudio - Establish/Release Voice Audio

    BT6038A programming user guide, Release 1.0.1 5.2.7 AT+HFPAUDIO - Establish/Release voice audio Command AT+HFPAUDIO=Param Param 0: Release voice audio connection with remote hfp sink device 1: stablish voice audio connection with remote hfp sink device 5.3 A2DP/AVRCP commands 5.3.1 AT+A2DPSTAT - Get A2DP state...
  • Page 35: At+A2Dpcfg - Get/Set A2Dp Configuration

    BT6038A programming user guide, Release 1.0.1 5.3.4 AT+A2DPCFG - Get/Set A2DP configuration Command AT+A2DPCFG{=Param} 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]...
  • Page 36: At+A2Dpenc - Get A2Dp Encoder

    BT6038A programming user guide, Release 1.0.1 5.3.5 AT+A2DPENC - Get A2DP encoder Command AT+A2DPENC Response +A2DPENC=Param Param +A2DPENC - A2DP encoder 5.3.6 AT+A2DPAUDIO - Establish/Release A2DP audio connection Command AT+A2DPAUDIO=Param Param 0: Release A2DP audio connection with remote a2dp sink device...
  • Page 37: At+Avrcpdisc - Release Avrcp Connection

    BT6038A programming user guide, Release 1.0.1 5.3.9 AT+AVRCPDISC - Release AVRCP connection Command AT+AVRCPDISC Description This command only initiates a disconnect request The actual status depends on the query 5.4 GATT commands 5.4.1 AT+GATTSTAT - Get GATT state Command AT+GATTSTAT...
  • Page 38: At+Sppdisc - Release Spp Connection

    BT6038A programming user guide, Release 1.0.1 5.5.2 AT+SPPDISC - Release SPP connection Command AT+SPPDISC Description This command only initiates a disconnect request The actual status depends on the query 5.5.3 AT+SPPSEND - Send data via SPP Command AT+SPPSEND=Param1,Param2 Param1 Payload length(1 ~ 236)
  • Page 39: At+Leadisc - Release Le Audio Connection

    BT6038A programming user guide, Release 1.0.1 5.6.2 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 5.6.3 AT+LEACONN - Establish le audio connection...
  • Page 40: Events Table

    Chapter 6 Events table 6.1 General events 6.1.1 +VER - Frmware version information Event +VER=Param1,Param2,Param3 Param1 Module type Param2 Firmware version Param3 Firmware compile time...
  • Page 41: Devstat - Device State

    BT6038A programming user guide, Release 1.0.1 6.1.2 +DEVSTAT - Device state Event +DEVSTAT=Param 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]...
  • Page 42: Scan - Scan Result

    BT6038A programming user guide, Release 1.0.1 6.1.3 +SCAN - Scan result Event1 +SCAN =Param1,Param2,Param3, Param4,Param5{,Param6{,Param7}} Param1 Index Param2 0: LE public address 1: LE random address 2: BR/EDR address Param3 MAC address(12 bytes ASCII) Param4 RSSI(-127 ~ -1) Param5 Size of Param6 if exist...
  • Page 43: Hfpstat - Hfp State

    BT6038A programming user guide, Release 1.0.1 6.2.1 +HFPSTAT - HFP state Event +HFPSTAT=Param Param1 0: Unsupported 1: Standby 2: Connecting 3: Connected 4: Outgoing call 5: Incoming call 6: Active call 6.2.2 +HFPDEV - HFP remote device information Event +HFPDEV=Param1{,Param2}...
  • Page 44: Hfpaudio - Hfp Voice Audio State

    BT6038A programming user guide, Release 1.0.1 6.2.4 +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 6.2.5 +HFPCID - HFP call phone number...
  • Page 45: Hfpvgm - Hfp Remote Device Microphone Gian

    BT6038A programming user guide, Release 1.0.1 6.2.9 +HFPVGM - HFP remote device microphone gian Event +HFPVGM=Param Param Remote device microphone gain 6.3 A2DP/AVRCP events 6.3.1 +A2DPSTAT - A2DP state Event +A2DPSTAT=Param Param 0: Unsupported 1: Standby 2: Connecting 3: Connected...
  • Page 46: A2Dpdev - A2Dp Remote Device Information

    BT6038A programming user guide, Release 1.0.1 6.3.3 +A2DPDEV - A2DP remote device information Event +A2DPDEV=Param1{,Param2} Param1 Remote device’ s MAC address(12 bytes ASCII) of current A2DP connection Param2 Remote device’s name(UTF8) of current A2DP connection 6.3.4 +A2DPCONN - A2DP connecting...
  • Page 47: Ctvolup - Volume Up

    BT6038A programming user guide, Release 1.0.1 6.3.7 +CTVOLUP - volume up Event +CTVOLUP Description Receive volume up command 6.3.8 +CTVOLDN - volume down Event +CTVOLDN Description Receive volume down command 6.3.9 +CTPLAY - Track play Event +CTPLAY Description Receive play command 6.3.10 +CTPAUSE - Track pause...
  • Page 48: Ctback - Track Backward

    BT6038A programming user guide, Release 1.0.1 6.3.13 +CTBACK - Track backward Event +CTBACK Description Receive backward command 6.4 LE Audio events 6.4.1 +LEASTAT - LE Audio state Format +LEASTAT=Param Param 0: Unsupported 1: Standby 2: Connecting 3: Connected 4: Streaming 5: Pause 6.4.2 +LEASR - LE Audio sample rate...
  • Page 49: Gattstat - Gatt State

    BT6038A programming user guide, Release 1.0.1 6.5.1 +GATTSTAT - GATT state Format +GATTSTAT=Param Param 0: Unsupported 1: Standby 2: Connecting 3: Connected 6.5.2 +GATTDATA - GATT received incoming data Format +GATTDATA=Param1,Param2 Param1 Payload length Param2 Payload 6.6 SPP events 6.6.1 +SPPSTAT - SPP state...
  • Page 50: Sppdata - Spp Received Incoming Data

    BT6038A programming user guide, Release 1.0.1 6.6.2 +SPPDATA - SPP received incoming data Format +SPPDATA=Param1,Param2 Param1 Payload length Param2 Payload 6.6.3 +SPPDEV - SPP remote device information Event +SPPDEV=Param1 Param1 Remote device’s MAC address(12 bytes ASCII) of current SPP connection...
  • Page 51: Application Scenarios

    Chapter 7 Application scenarios 7.1 profiles initializing and change parameter The following figure shows Profile initialization and name modification MCU change device name CARKIT reference code:...
  • Page 52 BT6038A programming user guide, Release 1.0.1 void change_name(void) uart_send("AT+NAME\r\n"); if(uart_read("+NAME",name_buf)) if(memcmp(name_buf,"CARKIT",6)) uart_send("AT+NAME=CARKIT,0\r\n"); //defalut␣ disable MAC address suffix → uart_send("AT+NAME\r\n"); // read bt name if(uart_read("+NAME",name_buf)) if(memcmp(name_buf,"CARKIT",6)) //change name fail else //change name success Note: modify any parameters, it is recommended to query first and then modify the final veri- fication 7.1.
  • Page 53: Source Mode Connection

    BT6038A programming user guide, Release 1.0.1 7.2 Source mode connection 7.2. Source mode connection...
  • Page 54: Appendix

    Chapter 8 Appendix 8.1 Download PDF Document Download PDF Document...

Table of Contents