User Manual
HLK-B40
Valid only if the low-power sleep function is enabled
The module hibernate
state output
PC7
High level - full speed work, low level - hibernation
Bluetooth connection
status output
PA4
High level - not connected, low level - connected,
transmission channel has been established; When the
pairing binding feature enables, the pairing encryption is
successfully represented on the connection
The operating mode
output
PA5
High level = master, low level = slave
Figure 3
Description of the input and output pin functions
4.4 Bluetooth device roles and connections
Devices at both ends of the Bluetooth connection have fixed roles, one is the host role, the other is the slave
role. Different roles of equipment define the corresponding operations and responsibilities.
The host discovers the slave device by scanning the slave broadcast and actively initiates a connection to the
selected slave device (identified by the MAC address) and Maintain the connection and play a leading role in a
Bluetooth connection
The slave broadcasts its own information, such as the device name, etc. The slave passively waits for the
connection request initiated by the master and accepts the request to connect to Bluetooth Successfully established.
This module can be connected to multiple host devices at the same time as a slave.
The B40 module defaults to the slave mode and the settings can be switched through the AT+ROLE command.
After the two devices establish a Bluetooth connection, they can send data to each other via Bluetooth (GATT).
The Bluetooth GATT service and feature UUID of this module can be modified by AT command, the default
values are as follows:
Service UUID
:
0000fff0-0000-1000-8000-00805f9b34fb
Feature UUID
Action permissions
The function
definition
0000fff1-0000-1000-8000-00805f9b34fb
Read/Notify
Module send
,
APP receive
0000fff2-0000-1000-8000-00805f9b34fb
Write Without Response
APP send
,
module receive
Figure 4
Bluetooth transmission service UUID default