SWRA475A January   2015  – October 2016 CC2540 , CC2540T , CC2541 , CC2541-Q1

 

  1.   Bluetooth low energy Beacons
    1.     Trademarks
    2. 1 What is a Beacon?
    3. 2 Bluetooth low energy and Bluetooth Smart
      1. 2.1 Non-Connectable Beacons
      2. 2.2 Connectable Beacons
      3. 2.3 Data Packet
      4. 2.4 Device Address
        1. 2.4.1 Flags
        2. 2.4.2 Manufacturer Specific Data
      5. 2.5 Broadcast Interval
      6. 2.6 Power
      7. 2.7 Range
      8. 2.8 Coexistence
    4. 3 Designing a Bluetooth low energy Beacon
      1. 3.1 Development Kits
      2. 3.2 Creating a Beacon Application With TI Bluetooth low energy-Stack
    5. 4 iBeacon Implementation
      1. 4.1 Overview and Prerequisites
      2. 4.2 Design and Implementation
      3. 4.3 Testing
    6. 5 Proprietary Implementation
      1. 5.1 Overview and Prerequisites
      2. 5.2 Design and Implementation
      3. 5.3 Testing
    7. 6 References
  2.   Revision History

Design and Implementation

This project was created by modifying the SimplePeripheral project. It currently only supports non-connectable advertisements, but the SimplePeripheral project was used instead of the SimpleBroadcaster project to be consistent with the SimpleEddystoneBeacon project (described in a separate application note).

The main modification to the SimplePeripheral project is to the advertisement data. According to the iBeacon specifications, the data is as follows:

static beaconAdvData_t beaconAdv = { // Flags; this sets the device to use general discoverable mode 0x02, // length of this data GAP_ADTYPE_FLAGS, 0x06, 0x1A, // length of this data including the data type byte 0xFF, // type 0x4C, // company ID[0] 0x00, // company ID[1] 0x02, // beacon type[0] 0x15, // beacon type[1] 0xA3, // UUID LSB 0x22, 0x37, 0xE7, 0x3E, 0xC0, 0xC5, 0x84, 0x86, 0x4B, 0xB9, 0x99, 0xF9, 0x82, 0x03, 0xF7, // UUID MSB 0x00, //major[0] (major and minor fields can be set as desired) 0x00, //major[1] 0x00, //minor[0] 0x00, //minor[1] 0x00 //measured power (can be set later) };

The company ID identifies the beacon as an Apple product, and the beacon type identifies the device as a proximity beacon. Any other valid UUID could be used to replace the one that is currently there, as long as it is inserted in the order indicated. The major and minor fields are currently unset, but they can be set as desired to further identify the device. Lastly, the specifications describe a procedure for measuring the power.

Additionally, the advertisement interval is set by specifying minimum and maximum intervals for limited and general discoverable modes. Typically, all four parameters are set to the same value to get the desired interval as follows:

GAP_SetParamValue(TGAP_LIM_DISC_ADV_INT_MIN, advInt); GAP_SetParamValue(TGAP_LIM_DISC_ADV_INT_MAX, advInt); GAP_SetParamValue(TGAP_GEN_DISC_ADV_INT_MIN, advInt); GAP_SetParamValue(TGAP_GEN_DISC_ADV_INT_MAX, advInt);

The specifications state that the beacon must broadcast the entire advertising packet in all three advertising frequencies, and they must use a 100-ms advertising interval.