Introduction
In BLE (Bluetooth Low Energy) development, the Bluetooth MAC address type is a crucial concept that is easily overlooked by developers but directly affects the success or failure of device connections. Many engineers using the Ansiot Technology ANS-BT101M Bluetooth module are often confused by the “address type” parameter appearing in the scan results and connection commands when debugging AT commands—what does it represent? How should it be correctly selected and configured?
This article will take the practical application of the ANS-BT101M Bluetooth module as a starting point to systematically explain the definition, classification, determination criteria, and configuration methods of Bluetooth MAC address types, helping developers quickly master this core knowledge point and improve BLE development efficiency. Whether you are a novice engineer just starting out with Bluetooth Low Energy or an experienced developer who wants to delve deeper into the protocol details, this article can provide you with clear ideas and practical operational guidance.
I. Address Type Parameter in the ANS-BT101M Bluetooth Module
The ANS-BT101M is a high-performance BLE Bluetooth module launched by Ansiot Technology, supporting master/slave modes and widely used in IoT devices, smart homes, health monitoring, and other scenarios. When the ANS-BT101M is running as the host, two core AT commands involve MAC address type parameters:
1.1 Scan Command: AT+SCAN
Command Format: AT+SCAN=param1{,param2{,param3}}
The scan response contains the following parameters:
First Response Format: param1 sequence number, param2 MAC address type, param3 MAC address, param4 RSSI signal value, param5 device name length, param6 device name.
Second Response Format: param1 MAC address type, param2 MAC address, param3 RSSI signal value, param4 broadcast type, param5 broadcast length, param6 broadcast content.
As can be seen, regardless of the response format, the MAC address type is an indispensable field. Developers must correctly extract this parameter when parsing the scan results; otherwise, subsequent connections will fail.
1.2 Connection Command: AT+CONN
Command Format: AT+CONN=param1,param2
param1 is the MAC address of the target device, and param2 is the MAC address type of the target device. When performing a connection operation, developers need to pass the MAC address and its corresponding address type obtained during the scanning phase into the connection command. Mismatch between address type and MAC address is one of the common reasons for BLE connection failure. In actual development, it is recommended that developers establish a unified device information structure in the program, binding and storing the MAC address and address type to avoid parameter transmission errors from the source.
II. What is a Bluetooth MAC Address Type?
The “0” or “1” in the Bluetooth MAC address type field is not arbitrarily set, but is automatically determined by the Bluetooth protocol stack based on the actual address type used by the device, reflected in the link layer header of the BLE data packet. Understanding this mechanism is fundamental to mastering the principles of BLE communication.
2.1 Definition of Address Type Field
In the link layer header of a BLE air packet, TxAdd and RxAdd each occupy 1 bit, with the following meanings: a value of 0 indicates that the following 6 bytes of device address is a public address; a value of 1 indicates that the following 6 bytes of device address is a random address. This flag is automatically filled or parsed by the protocol stack each time a packet is sent and received. Developers do not need to manually intervene, but the device’s address type needs to be configured correctly.
2.2 Basis for Address Type Determination
The MAC address type is determined by two key factors:
Factor 1: Device Configuration. Devices can be configured to use public or random addresses. Public addresses are globally unique fixed addresses, consisting of a 24-bit Organization Unique Identifier (OUI) assigned by IEEE and a 24-bit vendor-defined portion. Random addresses are generated by the device itself, including two main forms: static random addresses and private addresses.
Factor 2: Communication Scenario Requirements When sending data packets, the protocol stack automatically fills in the TxAdd field based on the current device configuration; when receiving data packets, it sets the RxAdd field based on the address type information sent by the peer. This process is entirely handled by the underlying protocol stack, ensuring the accuracy of data transmission.
2.3 Comparison of Public Addresses and Random Addresses
Public Address (Value 0): Globally unique, fixed, and widely compatible, but lacks privacy protection and is subject to tracking risks. Suitable for devices requiring a fixed identity.
Random Address (Value 1): Generated by the device itself, can be changed periodically, has privacy protection capabilities, requires the peer to support the corresponding address type, and is suitable for applications that prioritize privacy protection.

III. Classification and Privacy Functions of Random Addresses
Random addresses are the core mechanism for implementing device privacy protection in the BLE protocol. Based on behavioral characteristics, they can be divided into the following three categories:
3.1 Static Random Addresses
Static random addresses are generated after the device is powered on and remain unchanged unless restarted or restored to factory settings. They are suitable for scenarios that require maintaining a fixed identity within a local area while not exposing the real public address.
3.2 Resolvable Private Address
Resolvable private addresses are based on a periodically changing Identity Resolution Key (IRK). Only devices bound to and possessing the corresponding IRK can resolve the true identity. This is the most commonly used address type for BLE privacy features, effectively preventing third parties from continuously tracking devices via MAC addresses. For example, when the ANS-BT101M module is deployed in a wearable device, using a resolvable private address can prevent malicious tracking of the user’s location.
3.3 Unresolvable Private Address
Unresolvable private addresses are completely randomly generated and cannot be associated with a device identity. They are suitable for purely anonymous broadcast scenarios, such as applications that only send signals and do not need to be identified by any specific device.
IV. Practical Configuration Recommendations
4.1 How to Choose an Address Type?
Choose the appropriate address type based on the application scenario: Use public addresses when a fixed identity is required (e.g., fixed device pairing); use resolvable private addresses when privacy protection is paramount (e.g., wearable devices, mobile devices); use unresolvable private addresses for anonymous broadcast applications (e.g., beacons).

4.2 Configuration Method on ANS-BT101M
Developers can set the “Own Address Type” parameter of the ANS-BT101M Bluetooth module using AT commands or SDK API to determine the address type used in subsequent communication. It is recommended to define the address type strategy early in product development to avoid connection anomalies during later debugging. Furthermore, in batch deployment scenarios, it is recommended to standardize the address type configuration across all devices for easier subsequent maintenance and firmware upgrades. Ansiot Technology provides comprehensive technical documentation and engineering support to assist customers in quickly completing address type-related configurations.

V. Frequently Asked Questions (FAQ)
Q1: Is BLE connection failure related to MAC address type?
Yes. The connection will fail when the address type passed in the connection command is inconsistent with the address type actually used by the target device. It is recommended to obtain the correct address type of the target device through a scanning command before attempting to connect.
Q2: Is there a difference in address type handling between ANS-BT101M and ANS-BT301M?
Both modules comply with the BLE protocol standard and have the same address type mechanism. The ANS-BT101M focuses on low-power master/slave applications, while the ANS-BT301M offers richer interface options, allowing developers to choose based on project needs.
Q3: Will using a random address affect device pairing?
When using a resolvable private address, already bound devices can identify the peer via the IRK, without affecting the pairing process. However, unbound devices cannot resolve the address, so it’s necessary to switch to a resolvable address type during initial pairing.
Conclusion
The 0/1 value of the Bluetooth MAC address type field is a flag automatically generated by the BLE protocol stack based on device configuration, reflecting whether a public address or a random address is currently being used. Properly configuring the address type can meet functional requirements while effectively protecting device privacy. For developers using BLE Bluetooth modules such as the Ansiot Technology ANS-BT101M and ANS-BT301M, a deep understanding of the address type mechanism is crucial for ensuring stable device connections and secure data transmission.
For more technical information and development support for the ANS-BT101M and ANS-BT301M Bluetooth modules, please visit the Ansiot Technology website to obtain detailed product specifications and application notes.