background image

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

Summary of Contents for HLK-B40

Page 1: ...Shenzhen Hi Link Electronic co Ltd HLK B40 Master slave integrated Bluetooth transparent transmission module User Manual Version V1 2 Verified 2020 10 31 Copyright Hi Link...

Page 2: ...command mode 8 4 3 Description of the input and output pin functions 9 4 4 Bluetooth device roles and connections 9 5 A quick start guide 10 5 1 Test the debug base plate 10 5 2 Quickly verify blueto...

Page 3: ...information passively waiting for the connection Bluetooth broadcast Bluetooth from the machine device through periodic broadcasting so that the surrounding host equipment can scan and identify themse...

Page 4: ...ata Based on BLE5 1 it is faster and has a longer transmission distance and can reach 40 to 100 m in an open environment Supports low power modes sleep currents of up to6 A and custom connection and b...

Page 5: ...the 10 GND GND Power source 11 VDDIO Keep the functionality 12 PD7 Keep the functionality 13 PD6 Keep the functionality 14 PD5 Keep the functionality 15 PD4 Keep the functionality 16 PC7 O Module Slee...

Page 6: ...ication circuit reference of this module if you need more functions please refer to the module manual or contact our engineers to assist Figure 2 Basic minimum circuit disables low power sleep functio...

Page 7: ...e about complex Bluetooth protocol stack and RF circuit just a simple serial port transmission data can be transmitted directly on the Bluetooth wireless connection Transmission is short for transpare...

Page 8: ...st devices is also forwarded to the serial port from the machine module Figure 5 A map of the many to one Bluetooth connection transmission function 4 2 Module operating mode transmission and AT comma...

Page 9: ...lows Figure 6 A diagram of the conversion logic of the transmission mode and the AT command mode 4 3 Description of the input and output pin functions Name Chip pin Description Reset key input RESET H...

Page 10: ...lected 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...

Page 11: ...tically reconnect and reconnect if the slave is not found or the connection is disconnected The interval time can be set by the AT RECONNI command the default is 5s that is when it is not connected it...

Page 12: ...st APP on the mobile phone the APP will automatically search for surrounding Bluetooth devices and display them in a list Click the Bluetooth device name corresponding to the module in the device list...

Page 13: ...power consumption but the greater the delay Turn on auto sleep 6 A After the automatic sleep function is turned on the module can be controlled by the input level of the external sleep control input...

Page 14: ...d on 7 AT command 7 1 ATinstruction format description All at instructions are in ascii string format and end with carriage return Power failure will not be lost after setting All settings will take e...

Page 15: ...y send response AT MAC AT VER 1 03 20092421 OK 2 MAC MAC address Read only send response AT MAC AT MAC 112233445501 OK 3 DEFAULT Restore the default configuration 1 Send response AT DEFAULT 1 AT DEFAU...

Page 16: ...e sleep state according to the control of the level of the SLEEPEN input pin send response AT SLEEPEN AT SLEEPEN 0 OK send response AT SLEEPEN 1 AT SLEEPEN 1 OK 10 CONNI Bluetooth Connection interval...

Page 17: ...DE 123456 OK 16 PEERMAC When the module is the master it automatically goes to the MAC address of the slave MAC address 12 hexadecimal numbers send response AT PEERMAC AT PEERMAC AABBCC000001 OK send...

Page 18: ...NI AT RECONNI 0 OK send response AT RECONNI 10 AT RECONNI 10 OK 20 UUIDS Bluetooth transmission service UUID 32 hexadecimals Default 0000fff00000100080000080 5f9b34fb 21 UUIDR Read feature UUID in tra...

Page 19: ...structions 9 OTA functionality In the mobile phone APP through Bluetooth wireless upgrade module firmware the specific operation please refer to the HLK B40 Bluetooth transmission module mobile phone...

Reviews: