Development Examples
Data Throughput Mode Application
What is Throughput Mode?
The FSC-BT836B Bluetooth dual-mode data transmission module operates with two data transmission modes: Throughput Mode and Command Mode.
The generic data throughput firmware for the FSC-BT836x series modules defaults to throughput mode. To switch modes, refer to the FSC-BT836B AT Command Set and use the AT+TPMODE command. The operation and differences between the two modes are as follows:
Throughput Mode:
Bluetooth Not Connected: Data received via UART is parsed as AT commands.
Bluetooth Connected: All data received via UART is sent as-is to the remote Bluetooth device. It does not contain any data headers or framing and does not require AT commands to send data.
Command Mode:
Bluetooth Not Connected: Data received via UART is parsed as AT commands.
Bluetooth Connected: Data received via UART is still parsed as AT commands. It will contain specific response indication headers and framing. Data must be sent to the remote device using AT commands, such as AT+LESEND.
Between Module and Phone Application
Module: Upon power-up, the module continuously transmits advertisement packets.
Phone: Open the FeasyBlue APP, scan for nearby Bluetooth device advertisements, find the target Bluetooth module, and establish a connection.
Connection Success: The status pin on the module side will be pulled HIGH, indicating a successful connection.
Data Transmission: After a successful connection in Transparent Transmission Mode, data received by the module via UART is automatically transmitted over the air to the remote end (phone side).
Between Modules Application
A demonstration of SPP communication and data transparent transmission between an FSC-BT836B and an FSC-BT986 Bluetooth module is as follows:
Scan for nearby SPP devices
The FSC-BT836B scans for nearby Bluetooth SPP devices. Operation is as follows:
1Send: <<AT+SCAN=1 // Scan for nearby Bluetooth SPP devices 2Response: >>OK 3 >>+SCAN={ // Scan started 4 >>+SCAN=0,0,001D439A2001,-45,10,FSC-BT986 5 >>+SCAN=1,1,DC0D3023CA1C,-71,14,0000-1007Z ggg 6 >>+SCAN=2,0,DC0D30000015,-88,23,FSC-BT1038C-LE-AKM-0015 7 >>+SCAN=3,0,DC0D300017A8,-85,11,FSC-BT3721V 8 >>+SCAN=5,0,A4405B28A838,-89,10,AirGo AS01 9 >>+SCAN=} // Scan ended
Establish SPP connection request
The FSC-BT836B establishes an SPP connection with the FSC-BT986 using the AT+SPPCONN command. Operation is as follows:
1Send: <<AT+SPPCONN=001D439A2001 // Initiate SPP connection to remote FSC-BT986 2Response: >>OK
SPP connection established successfully
In Transparent Transmission Mode, after a successful Bluetooth connection, the UART will not receive event response indicators. The connection status can be determined by the level state of the status pin (e.g., Pin 10) on the FSC-BT836B, as follows:
High Level (H): Indicates Bluetooth is successfully connected.
Low Level (L): Indicates Bluetooth is not connected or the connection has been disconnected.
Send data
Transparent transmission mode is enabled by default in the generic data transmission firmware. After a successful SPP connection, data can be sent directly without using AT commands, as shown in the figure below:
Read/Write Module Default Parameters
When Bluetooth is not connected, the module parses UART data as AT commands. The host can query and modify the module’s default parameters. The following example demonstrates:
Write the device name to ABC
Read the device name
Read the Bluetooth address
Data Transmission Flow
Upon power-up, the module continuously transmits advertisement data. A remote Bluetooth device (e.g., phone) can discover these advertisement packets via scanning and initiate a connection request to the module. Upon successful connection, the module pulls its connection status pin HIGH to notify the host of the successful Bluetooth connection. The host can send data to the remote Bluetooth device via the Bluetooth module, and the remote Bluetooth device can also send data to the host.
Module Acting as Master to Connect to Remote Device
The module can act as a master device to connect to a slave device. The host can send commands to control the module to perform scanning, connection, and disconnection. The following diagram illustrates the process of connecting to another device: