nRF5 SDK v15.0.0
Modules | Typedefs | Enumerations | Functions
Eddystone advertising module

Types and functions for handling advertising in Eddystone beacons. More...

Modules

 Timing
 Events and functions for advertisement timing.
 
 TLM
 Functions for the Eddystone telemetry (TLM) manager.
 

Typedefs

typedef void(* es_adv_evt_handler_t )(es_adv_evt_t evt)
 Eddystone Advertiser event handler.
 

Enumerations

enum  es_adv_evt_t {
  ES_ADV_EVT_NON_CONN_ADV,
  ES_ADV_EVT_CONNECTABLE_ADV_STARTED,
  ES_ADV_EVT_CONNECTABLE_ADV_STOPPED
}
 Eddystone Advertiser events.
 

Functions

void es_adv_init (uint8_t ecs_uuid_type, es_adv_evt_handler_t adv_event_handler, nrf_ble_escs_adv_interval_t adv_interval, bool remain_connectable, uint8_t *const p_adv_handle)
 Function for initializing the module. More...
 
void es_adv_on_ble_evt (ble_evt_t const *p_ble_evt)
 Function for passing BLE events to this module. More...
 
void es_adv_start_non_connctable_adv (void)
 Function for starting the advertisements.
 
void es_adv_remain_connectable_set (bool remain_connectable)
 Function for specifying if the beacon should remain connectable. More...
 
void es_adv_start_connectable_adv (void)
 Function for starting connectable advertisements.
 
void es_adv_interval_set (nrf_ble_escs_adv_interval_t interval)
 Function for setting the base advertisement interval for non-connectable advertisements. More...
 
nrf_ble_escs_adv_interval_t es_adv_interval_get (void)
 Function for getting a pointer to the current advertisement interval. More...
 
bool es_adv_remain_connectable_get (void)
 Function for getting the value of the 'remain_connectable' field. More...
 
void es_adv_timers_init (void)
 Function for initializing the Eddystone advertisement timers.
 
void es_adv_frame_fill_connectable_adv_data (ble_advdata_t *p_scrsp_data, ble_gap_adv_data_t *const p_adv_data)
 Function for setting up connectable advertisement data using ble_advdata_encode. More...
 
void es_adv_frame_fill_non_connectable_adv_data (uint8_t slot_no, bool etlm, ble_gap_adv_data_t *const p_adv_data)
 Function for setting up non-connectable advertisement data using ble_advdata_encode. More...
 

Detailed Description

Types and functions for handling advertising in Eddystone beacons.

Function Documentation

void es_adv_frame_fill_connectable_adv_data ( ble_advdata_t p_scrsp_data,
ble_gap_adv_data_t *const  p_adv_data 
)

Function for setting up connectable advertisement data using ble_advdata_encode.

Parameters
[in]p_scrsp_dataPointer to the scan response data that will be encoded.
[in,out]p_adv_dataPointer to the encoded advertising data (including scan response).
void es_adv_frame_fill_non_connectable_adv_data ( uint8_t  slot_no,
bool  etlm,
ble_gap_adv_data_t *const  p_adv_data 
)

Function for setting up non-connectable advertisement data using ble_advdata_encode.

Parameters
[in]slot_noSlot to fill in data for.
[in]etlmFlag that specifies if Eddystone-TLM is required.
[in,out]p_adv_dataPointer to the encoded advertising data (including scan response).
void es_adv_init ( uint8_t  ecs_uuid_type,
es_adv_evt_handler_t  adv_event_handler,
nrf_ble_escs_adv_interval_t  adv_interval,
bool  remain_connectable,
uint8_t *const  p_adv_handle 
)

Function for initializing the module.

Parameters
[in]ecs_uuid_typeECS UUID type used for advertising the Eddystone Configuration Service UUID.
[in]adv_event_handlerEddystone advertiser event handler.
[in]adv_intervalAdvertisement interval to use.
[in]remain_connectableFlag that specifies if advertisements should remain connectable.
[in]p_adv_handlePointer to the advertising handle used to start and stop advertising.
nrf_ble_escs_adv_interval_t es_adv_interval_get ( void  )

Function for getting a pointer to the current advertisement interval.

Return values
Pointerto the current advertisement interval.
void es_adv_interval_set ( nrf_ble_escs_adv_interval_t  interval)

Function for setting the base advertisement interval for non-connectable advertisements.

The minimum allowed advertisement interval is calculated based on the configured minimum advertisement frame spacings and the number of configured slots. If eTLM slots are configured a separate minimum advertisement frame spacing is used for those. If interval is outside of range, the closest valid value is set.

Parameters
intervalThe new advertisement interval.
void es_adv_on_ble_evt ( ble_evt_t const *  p_ble_evt)

Function for passing BLE events to this module.

Parameters
[in]p_ble_evtPointer to the BLE evt.
bool es_adv_remain_connectable_get ( void  )

Function for getting the value of the 'remain_connectable' field.

Return values
Valueof 'remain_connectable'.
void es_adv_remain_connectable_set ( bool  remain_connectable)

Function for specifying if the beacon should remain connectable.

Parameters
[in]remain_connectableValue to be set.

Documentation feedback | Developer Zone | Subscribe | Updated