Development Examples
Data Throughput Mode Application
What is Throughput Mode?
FSC-BT630x series Bluetooth BLE data modules have two work modes: Throughput Mode and Command Mode .
The generic data throughput firmware for the FSC-BT630x series modules defaults to throughput mode. To switch modes, refer to FSC-BT630x General Data AT Command Set and use AT+TPMODE command. The differences between the two work 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.
Module to Phone Application
1.Module Side: After being powered on, the module will continuously send broadcast packet data.
2.Mobile Phone Side: Open the [FeasyBlue App] , scan for broadcast packets of nearby Bluetooth BLE devices, locate the target Bluetooth module, and establish a connection.
3.After successful connection, the status pin of the module side will pull up the level, indicating that the connection has been established.
4.After successful connection, in throughput mode, the module side will automatically transmit the data transparently through the air to the remote end (mobile phone side) after receiving serial port data.
Module to Module Application
This is a demonstration of BLE communication data throughput transmission between FSC-BT630(Module1) and FSC-BT630(Module2) Bluetooth modules, as follows:
1.Scan for nearby BLE devices
FSC-BT630x scans for nearby Bluetooth BLE devices, with the operation as follows:
1Send:<<AT+SCAN=1 //Scan for nearby Bluetooth BLE devices
2Response:>>OK
3 >>+SCAN={ //Scan started
4 >>+SCAN=0,0,E0798DB74BD5,-82,9,FSC-WY001
5 >>+SCAN=1,0,E0798DB74B93,-88,9,FSC-WY001
6 >>+SCAN=2,1,DD0D30500762,-89,13,FSC-BW256B-LE
7 >>+SCAN=3,0,E0798DB39B34,-86,9,FSC-WY001
8 >>+SCAN=4,0,DC0D30000A09,-52,12,FSC-BT630 //Module2's MAC address and address type 1 are identified.
9 >>+SCAN=5,1,FCB7E6A1E72C,-89,10,LE_WI-C100
10 >>+SCAN=6,1,DD0D30001885,-80,18,FSC-BT909C-LE-1885
11 >>+SCAN=7,0,E0798DB74BA9,-75,9,FSC-WY001
12 >>+SCAN=8,0,E0798DB74BD3,-81,9,FSC-WY001
13 >>+SCAN=E} //Scan ended
2.Send BLE Connection Establishment Request
FSC-BT630(Module1) establishes a BLE protocol connection with FSC-BT630(Module2) via the AT+LECCONN command, with the operation as follows:
1Send:<<AT+LECCONN=DC0D30000A090 //Establish BLE connection request
2Response:>>OK
Warning
AT+LECCONN=Target Bluetooth MAC address + 1-bit address type. Generally, the address type is “0” or “1”.
How to obtain the address type:
Use AT+SCAN=1 to scan, the second parameter in the returned result is the address type, as shown in the example below:
1 //The address type is the second parameter, which is "0".
2
3 Response:>>+SCAN=4,0,DC0D30000A09,-52,12,FSC-BT630
3.BLE Connection Established Successfully
In transparent transmission mode, when the Bluetooth connection is successful, the serial port will not receive an event response indication (in command mode, a connection success event response indication will be received). The current connection status can be determined by the level state of the Pin18 status indicator pin of FSC-BT630x, as follows:
High level (H): Indicates that the Bluetooth is successfully connected;
Low level (L): Indicates that the Bluetooth is not connected or the connection has been disconnected.
4.Send Data
The transparent transmission mode of the general data transmission firmware is enabled by default. After the BLE connection is successfully established, you can send data directly without sending data via AT commands.
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 Device Name : ABC
Read Device Name
Read Bluetooth Address
Data Transmission Flow
1.When the module is powered on, it continuously sends broadcast data outward. A remote Bluetooth device (e.g., a mobile phone) can obtain the broadcast packet by searching and initiate a connection request to the module.
2.After the connection is successfully established, the module will pull high the connection status pin to notify the host that the Bluetooth connection has been successfully established.
3.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 Acts as Master to Connect to Remote Device
The module can act as master device to connect to remote slave devices.
The host can send AT commands to control the module to perform scanning, connection, and disconnection operations. The following shows the process of connecting to other devices: