Bluenrg-1 Beacon Demonstration Application; Ble Beacon Application Setup; Initialization; Define Advertising Data - ST STEVAL-IDB007V1M SPBTLE-1S User Manual

Table of Contents

Advertisement

UM2264
6

BlueNRG-1 Beacon demonstration application

The BlueNRG-1 Beacon demo is supported by the SPBTLE-1S or BlueNRG-1
development platform (STEVAL-IDB007V1 or STEVAL-IDB007V1M). It demonstrates how
to configure a SPBTLE-1S or BlueNRG-1 device to advertise specific manufacturing data
and allow another BLE device to determine whether it is in BlueNRG-1 BLE Beacon device
range.
6.1

BLE Beacon application setup

This section describes how to configure a BlueNRG-1 device to act as a Beacon device.
6.1.1

Initialization

The BlueNRG-1 BLE stack must be correctly initialized thus:
aci_gatt_init();
aci_gap_init(GAP_PERIPHERAL_ROLE, 0, 0x08, &service_handle, &dev_name_char_handle,
&appearance_char_handle);
See the BlueNRG-1 BLE stack documentation for more information on these and following
commands.
6.1.2

Define advertising data

The BLE Beacon application advertises the following manufacturing data:
Data field
Company identifier
code
ID
Location UUID
Major number
Minor number
Tx Power
Notes:
(1)
available at: https://www.bluetooth.org/en-us/specification/assigned-numbers/company-identifiers
6.1.3

Entering non-connectable mode

The BLE Beacon device uses the GAP API command to enter non-connectable mode thus:
aci_gap_set_discoverable(ADV_NONCONN_IND, 160, 160, PUBLIC_ADDR,
To advertise the specific selected manufacturer data, the BLE Beacon application can use
the following GAP APIs:

Table 5: BlueNRG-1 Beacon advertising manufacturing data

Description
SIG company identifier
Beacon ID
Beacons UUID
Identifier for a group of
beacons
Identifier for a single beacon
2's complement of the Tx
power
NO_WHITE_LIST_USE,0, NULL, 0, NULL, 0, 0);
DocID030868 Rev 1
BlueNRG-1 Beacon demonstration application
Notes
(1)
Default is 0x0030 (STMicroelectronics)
Fixed value
Used to distinguish specific beacons from
others
Used to group a related set of beacons
Used to identify a single beacon
Used to establish how far you are from
device
25/55

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STEVAL-IDB007V1M SPBTLE-1S and is the answer not in the manual?

This manual is also suitable for:

Bluenrg-1Bluenrg-2

Table of Contents