How to Enable a Bluetooth Beacon

Broadcasting data to any nearby device is the core function of a Bluetooth Low Energy (BLE) beacon. Unlike a standard connection, in which two devices pair, a beacon continuously broadcasts information into the air. Any smartphone or gateway within range can hear these packets without needing a handshake.

Understanding BLE Advertising

Beacons work through a process called advertising. The microcontroller sends small data packets over three specific radio channels. These packets contain a unique identifier or small bits of sensor data. Because the beacon does not wait for a response, it saves significant power.

The two most common beacon formats are iBeacon and Eddystone. Both formats rely on the same underlying BLE advertising technology. To make your board a beacon, you need to define the advertising data and tell the Bluetooth stack to start broadcasting.

While this guide focuses on the TI ecosystem, you can apply the same advertising principles to the Nordic Semiconductor 54L series development boards. On Nordic hardware, you define the advertising structures in C code using the Zephyr Bluetooth API instead of a graphical tool. The stack initialization and broadcast start functions perform the same role as the TI commands, making the logic portable across both platforms.

Configuring the TI CC2340R5

The TI CC2340R5 uses the SysConfig tool to manage Bluetooth settings. SysConfig generates the necessary code to initialize the BLE stack and set the advertising parameters. Treat your project’s SysConfig as the authoritative source of behavior.

Step 1: Configure the BLE Stack in SysConfig

Open your project in Code Composer Studio and launch the SysConfig file. Create a BLE instance and adjust the following settings:

  • Set the Device Role to Peripheral
  • Set General Configuration > Device Name to your desired beacon name, like “TI Bluetooth Beacon”.
TI SysConfig BLE instance showing Device Role set to Peripheral and Device Name configured

Step 2: Initialize and Enable the Radio

Once you save your SysConfig settings, Code Composer Studio automatically updates the generated header files. You can now add the code to your main.c file to activate the radio. Include the GAP (Generic Access Profile) header and call the enable function as shown below:

#include <ti/bleapp/menu_module/menu_module.h>
#include <ti/bleapp/ble_app_config/ble_app_config.h>

int main(void)
{
    // Initialize board hardware and BLE stack
    Board_init();
    BLEAppUtil_init();

    // Start advertising using the set configured in SysConfig
    // This activates the radio to begin broadcasting the beacon packets
    GapAdv_enable(advHandle0, GAP_ADV_ENABLE_OPTIONS_USE_MAX, 0);

    while (1) {}
}

Testing the Broadcast

After you flash the firmware, the easiest way to verify the beacon is with a mobile app like TI SimpleLink Connect or nRF Connect for Mobile.

  1. Open the app on your smartphone.
  2. Scan for nearby Bluetooth devices.
  3. Look for the beacon name you defined in your project.
Smartphone BLE scanner app showing the TI Bluetooth Beacon appearing in scan results

If the device does not appear in the scan, verify that the board has a stable power supply. You can check your power setup by following the guide on verifying board power supply. If the board has power but no signal appears, use the printf logging technique to check for errors during Bluetooth initialization.

Optimizing for Low Power

Beacons usually run on batteries for months or years. To reach this lifespan, you need to adjust the advertising interval. A shorter interval makes the beacon easier to find but drains the battery quickly. A longer interval preserves the battery but may cause a slight delay when a smartphone tries to detect the signal.

The CC2340R5 automatically enters sleep modes between advertising events. You can learn more about how these boards handle tasks efficiently in the tutorial on using interrupts to handle events.

Wrapping Up

Setting up a Bluetooth beacon is a reliable way to start with wireless firmware development. By configuring the advertising data and enabling the radio, you turn your development board into a functional transmitter. On the TI CC2340R5, SysConfig centralizes these configurations into generated board metadata. Once you confirm the beacon works, you can begin adding sensor data to your packets to create a real-world IoT application.


Ready to connect your devices anywhere on Earth? Get started with Hubble Network for free →