iBeacon is a location-aware feature introduced in iOS 7. It is not physical hardware, but rather a protocol that enables the concept of physical "beacons". Developed by Apple, it is natively supported by iOS and deeply integrated with the mobile operating system.
Devices with Bluetooth Low Energy (BLE) communication capabilities broadcast identification information, and receiving apps perform actions based on the data.
When a phone enters the signal range, it receives the broadcast ID (UUID, Major, and Minor) from the signal source. The app parses the received ID to push notifications or other information to the user.
Common iBeacon application scenarios include:
| Scenario | Description |
|---|---|
| Find phone | Tigger iBeacon broadcast to wake up the app and play a sound for short-range phone locating. |
| Indoor positioning | Enable area ranging and estimate distance using RSS signal to locate objects indoors. |
| Smart lock | Register the geofence service and wake it up with iBeacon. It can automatically unlock when entering the fence area and automatically lock when leaving. |
| Personal safety alarm | Trigger an alarm when encountering robbers or other threats to personal safety. The device emits a loud alarm and activates the mobile app to report SOS messages. |
| Probe thermometer | Detect hazardous elements in food. Trigger iBeacon broadcast to activate the app and send alerts. |
| Outdoor SOS first aid | Use devices such as flashlights or watches. Trigger iBeacon broadcast to activate nearby apps and send SOS signals. |
| Beacon data reception | Deploy multiple beacons in malls or public spaces to trigger app events for marketing or broadcasting. |
iBeacon protocol commands:
| Command | Description |
|---|---|
| 0xA8 | iBeacon feature settings |
The MCU sends the following data:
| No. | Length (byte) | Field | Description |
|---|---|---|---|
| 0 1 |
2 | Header | 0x55 0xAA |
| 2 | 1 | Version No. | 0x00 |
| 3 | 1 | CMD | 0xA8 |
| 4 5 |
2 | Data length | 0x00 0x06 |
| 6 to 11 | 6 | CFG | See the following table. |
| 12 | 1 | CRC8 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
CFG format:
| 1 byte | 1 byte | 2 bytes | 2 bytes |
|---|---|---|---|
| 1 | 2 | 3 to 4 | 4 to 5 |
| operation | config_type | ibeacon_interval | timeout |
operation:
0x00: Turn off standalone iBeacon.0x01: Turn on standalone iBeacon (mode 1).0x02: Turn off alternating iBeacon broadcast.0x03: Turn on alternating iBeacon broadcast (mode 2).config_type:
0x00: Use the default configuration. Set ibeacon_interval and timeout to 0x00.0x01: Use the custom configuration. See the fields ibeacon_interval and timeout.ibeacon_interval: The iBeacon advertising interval in low power mode is ibeacon_interval × 100 ms, with a configurable range of 100 ms to 2,000 ms. It is fixed to 100 ms in standard power mode.
With iBeacon turned on, the advertising interval is as follows:
0xE2. With iBeacon turned on, the device advertises with the ibeacon_interval in low power mode.ibeacon_interval.the ibeacon_interval. The interval for switching between advertising contents is 1 second (fixed, not configurable). Make sure ibeacon_interval is less than one second.timeout: The iBeacon timeout duration in seconds. The iBeacon service automatically disables after 1 × timeout seconds. The range is 1s to 3,600s. When the timeout is 0xFFFF, it will never time out.
Example
55 AA 00 A8 00 06 01 00 00 00 00 00 AE55 AA 00 A8 00 06 03 00 00 00 00 00 B0The module returns the following data:
| No. | Length (byte) | Field | Description |
|---|---|---|---|
| 0 1 |
2 | Header | 0x55 0xAA |
| 2 | 1 | Version No. | 0x00 |
| 3 | 1 | CMD | 0xA8 |
| 4 5 |
2 | Data length | 0x00 0x01 |
| 6 | 1 | State | Return value |
| 7 | 1 | CRC8 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Return value of state:
0x00: SuccessIs this page helpful?
YesFeedbackIs this page helpful?
YesFeedback