Hardwares Guides About Bluetooth and Poe
Hardwares Guides About Bluetooth and Poe
Examples
1 / 12
1 Pin function
PIN Type Description
Module slave role connection status: high level when unconnected, low level
P0.26 GPIO when connected
Enable status of sending data from slave role: High level is not enabled, low
P0.27 GPIO level is enabled
Module host role connection status: High level when disconnected, low level
P0.28 GPIO when connected
Module host role connection status: High level is not enabled, low level is
P0.29 GPIO enabled
Module serial port BUFFER Indicates the cache tension status: high level
P0.30 GPIO when no tension, low level when tension
2 Default parameters
2.1 Bluetooth Default parameters
Name of advertising::nRF52
Transmission power:0dBm
Advertising interval:100ms
2 / 12
2.2 Serial port Default Parameters
Baud rate:115200 bps
Parity bit: No
Stop bit:1
Flow control:No
2 0x01 0x06
0x9ECADC240EE5A9E
11 0x07 UUID
093F3A3B50100406E
3 / 12
4 Bluetooth AT Command parsing
4.1 AT Command format
The Command string consists of five parts: Command header, Command, parameter connector,
[parameter], and terminator. The Command header is "AT+" or "AT? , the parameter concatenator is
"=", and the end character is "\r\n". The parameter concatenator and parameter are optional (either with
or without parameters). If the Command string contains parameters, it indicates that the Command is
Note: Serial port data 20ms as a frame of data timeout, AT Command recognized as “AT+“ or
“AT?”Error ([AT]ER, correct [AT]OK); error ([AT]ER); After a master and(or) slave connection is made,
the AT command is still recognized and does not act as passthrough data. If the AT+ or AT? At the
举例/For example:
4 / 12
4.2 General command
4.2.1 Get AT commands help:AT?
Command
Example Possible results returned Explain
Gets all
command sets
supported by the
AT? AT?\r\n
module
Obtain
[AT]OK
AT+VER AT+VER\r\n the module firmware version
[DA]B0171,V1.22,May 5 2022 17:29:10
information
5 / 12
4.2.4 Get peer device MAC address when in connection:AT+PEER
Command
Example Possible results returned Explain
Unconnected device:
If there is no primary or
default reply is
00:00:00:00:00:00
6 / 12
4.2.7 Store current parameters to FLASH:AT+SAVE
1、
[AT]OK
[DA]adv,idle
AT+WSTA AT+WSTA\r\n
2、
Parameter 1 indicates the working status of
[AT]OK
the active role.
[DA]conn,conn
Parameter 2 indicates the working status of
7 / 12
4.2.10 Connect a peripheral via MAC address:AT+CON_MAC
Connect to a peer Bluetooth device:AT+CON_MAC=MAC address\r\n
1. Command error:
[AT]ER
2. Scan timeout:
[AT]OK Returns the MAC of the
AT+CONNECT AT+CONNECT=nRF52
[DA]Connecting connection
[DA]Timeout
. 3. Connection successful:
[AT]OK
8 / 12
[DA]Connecting
[DA]Connected=CA:6C:F3:9B:EC:38
. 连接失败/Connection fail:
[AT]OK
[DA]Connecting
[DA]Connected=CA:6C:F3:9B:EC:38
[DA]Disconnected=CA:6C:F3:9B:EC:
38
[DA]Disconnected=CA:6C:F3:9B:EC:38
[DA]Connected=4E:65:41:C9:62:03
[AT]OK
AT+DISCON AT+DISCON=m/s\r\n
[DA]Disconnected=4E:65:41:C9:62:03
Set transmitting
AT+TXPWR=param\r\n Param:
AT+TXPWR [AT]ER or [AT]OK power
{8,7,6,5,4,3,2,0,-4,-8,-12,-16,-20}
9 / 12
4.2.14 Setting device's name:AT+DEV_NAME
Scan and output BLE devices through serial ports, up to 100 devices can be output.
10 / 12
4.2.17 Start a procedure for updating PHYs mode : AT+BLE5_REQ
Set the physical characteristic of Bluetooth transmission (the same parameters must be set for the master
and slave)
1、The
command or parameter
[AT]OK of AT?
11 / 12
12 / 12