Our Latest News

DX-BT24 Bluetooth module-AT command and cell phone transmissions tutorial

DX-BT24 Bluetooth module-AT command and cell phone transmissions tutorial

  1. Preface
    Daxia Longbird DX-BT24&BT24-S&BT24-PA Bluetooth module has 5.1 Bluetooth protocol, and the module has built-in standard serial protocol. It can interact with mobile, PC and main device through the serial port of the module, and can use AT command to configure and modify the parameters of the module. Thus, the device can join the Internet of Things at a very low cost and very fast speed, making the device more convenient and intelligent.

1.1. Serial port basic parameters

Default serial port parameters: 9600bps/8/n/1 (baud rate/data bits/no parity/stop bits)

Module supports software flow control (Note: DX-BT24-PA is not supported)

Module BLE UUID: SERVICE UUID: FFEO

NOTIFY/WRITE UUID: FFE1

WRITE UUID: FFE2

1.2.AT command mode and pass-through mode

AT command mode: The module is in command mode when it is not connected by other devices, and can respond to commands.
Pass-through mode: The module is in pass-through mode when it is connected to other devices, and it can start transmitting data at this time.

1.3.Module Data Throughput

Note: The data in the above table is for reference only.

The data in the above table is for reference only, the maximum MTU value supported by this module is 253, the data throughput is related to the MTU value and connection interval of cell phone Bluetooth, the data is subject to actual.

  1. Wiring
    2.1 Module wiring sequence definition

Serial TTL connection typeC cable, connected to the computer can begin to connect debugging

2.2 Related AT commands in detail

2.2.1 Command Format Description

AT+Command

All commands begin and end with AT and are omitted from the table that represents commands and responses in this document, showing only commands and responses.
All AT command characters are in uppercase.
Within <> are optional contents, separated by a comma “,” if there are multiple parameters in the command; the actual command does not contain pointed brackets.
is the carriage return character \r, hexadecimal is OXOD.
is the line feed character \n, hexadecimal for OXOA.
Command execution success, return the corresponding command to end with OK, failure to return EEROR = <>, “<>” content for the corresponding error code (please refer to 5.7).

2.2.2 Response format description

+lndication<=param1, param2, param3>

The response instruction starts with a plus sign “+” and ends
equals to “=” followed by the response parameter
If there is more than one parameter in the response parameter, it will be separated by a comma “,”

2.2.3 Examples of AT commands

Example:Change Bluetooth device name to 1234
Send:AT+NAME1234
Return:+NAME=1234
OK

  1. AT commands in detail
    3.1 Basic commands

Basic instructions include: test, version number, Bluetooth status parameters, restore factory settings, reboot and other 14 instructions, table coarse generally often used

No. Function Command Response Description
1 Test command AT OK for testing serial port
2 Query version number AT+VERSION +VERSION= Software version number, according to the different modules and custom requirements version will be different 3 Query MAC address AT+LADDR +LADDR=Bluetooth MAC address code
4 Query Bluetooth name AT+NAME +NAME= Bluetooth name, maximum 28 bytes Set Bluetooth name AT+NAME +NAME= OK Default name: BT24/BT24-S/BT24-PA, need to reboot after setting this command to take effect. 5 Query parameter AT+NAMAC +NAMAC=Parameter,off:0
Set parameter AT+NAMAC +NAMAC= OK Open 6-bit MAC suffix:1;Open 3-bit MAC suffix:2
6 Query serial stop bit AT+STOP +STOP= Sequence 0:1 stop bit Set the serial port stop bit AT+STOP +STOP= OK 1:2 stop bit; default value:0 7 Query serial parity bit AT+PARI +PARI=Sequence 0: no parity
Set serial parity bit AT+PARI +PARI= OK 1: odd parity; 2: even parity; default value: 0
8 Query baud rate AT+BAUD +BAUD= baud rate corresponds to the serial number 1:2400;2:4800;3:9600;4: 19200 Set baud rate AT+BAUD +BAUD= OK 5:38400;6:57600;7:115200 default value:3(9600) 9 Query flow control status AT+FLOW +FLOW =Sequence number 0: for off flow control
Set the flow control status AT+FLOW OK 1: to open the flow control; default value: 0
10 Query the pass-through mode AT+TRANSPORT +TRANSPORT = Sequence number 0: to close the pass-through Set the pass-through mode AT+TRANSPORT +TRANSPORT= OK 1:for open pass-through; default value:1 11 Disconnect AT+DISC 12 Query Bluetooth device type AT+TYPE +TYPE=Parameter 0x0000:unspecified type;0x0040:phone book type;0x0080:laptop type
Set the Bluetooth device type AT+TYPE +TYPE= OK For more types, please find the Bluetooth type table; default value:0x0000
13 Software restart AT+RESET +RESETOK Power On
14 Restore factory settings AT+DEFAULT +DEFAULTOK

Note: After setting up the 4/6/7/8/12 command, a reboot is required.

After setting 4/6/7/8/12 command, you need to reboot to take effect;

5 instruction: set to open the 6-bit MAC suffix, then the maximum valid name of Bluetooth is 16 bytes, set to open the 3-bit MAC suffix, then the maximum valid name of Bluetooth is 22 bytes. Suppose the address code is: 112233aabbcc, the device Bluetooth name is BT24. open 3-bit MAC suffix, that is, the device Bluetooth name is: BT24aabbcc, open 6-bit MAC suffix, that is, the device Bluetooth name is: BT24112233aabbcc, set to take effect only after reboot.

9 instruction :This instruction is not supported by the DX-BT24-PA.

10 instruction : If the module is connected after setting off the transmission, it can continue to respond to the AT command, such as connecting and then sending the open transmission command, after responding, it will enter the transmission mode, and then no longer respond to the command. This command is saved at power down.

11 command : This command can only be used in the pass-through mode, and it can only be sent by the serial port side effectively, but not by the cell phone side.

3.2 AT instruction test

Open the serial debugging tool, connect the port number, open the serial port, set the 9600 baud rate, check plus carriage return line feed, set the command on the right side, and click test.

At this point, Bluetooth is normally connected, the following test begins, in turn, enter

Test Equipment
AT

View device name, default BT24
AT+NAME

Modify the device name to 23456VOR
AT+NAME23456VOR

Restore factory settings
AT+DEFAULT

View device name, default BT24
AT+NAME

The effect is as follows

3.3 Mobile Phone Testing

Install DX-SMART software, app, IOS
The following demonstration APP Android side, click on the transmission, search BLE, connect BT24 Bluetooth, set the text 123456 content, cell phone side click to send

The computer side receives data from the cell phone 123456

    GET A FREE QUOTE

    FPGA IC & FULL BOM LIST

    We'd love to

    hear from you

    Highlight multiple sections with this eye-catching call to action style.

      Contact Us

      Exhibition Bay South Squre, Fuhai Bao’an Shenzhen China

      • Sales@ebics.com
      • +86.755.27389663