Eddystone Configuration Service module. More...
Modules | |
Eddystone Configuration Service configuration | |
Data Structures | |
struct | nrf_ble_escs_broadcast_cap_t |
Data fields in the Broadcast Capabilities characteristic. More... | |
struct | nrf_ble_escs_lock_state_write_t |
Write data fields of the Lock State characteristic. More... | |
union | nrf_ble_escs_lock_state_t |
Lock State characteristic. More... | |
union | nrf_ble_escs_unlock_t |
Unlock characteristic (read/write). More... | |
struct | nrf_ble_escs_public_ecdh_key_t |
Public ECDH Key characteristic. More... | |
struct | nrf_ble_escs_eid_id_key_t |
EID Identity Key characteristic. More... | |
union | nrf_ble_escs_remain_conntbl_t |
Unlock characteristic (read/write). More... | |
struct | nrf_ble_escs_init_params_t |
Eddystone Configuration Service initialization parameters (corresponding to required characteristics). More... | |
struct | nrf_ble_escs_init_t |
Eddystone Configuration Service initialization structure. More... | |
struct | nrf_ble_escs_s |
Macros | |
#define | BLE_UUID_ESCS_SERVICE 0x7500 |
UUID of the Eddystone Configuration Service. | |
Typedefs | |
typedef uint8_t | nrf_ble_escs_active_slot_t |
typedef uint16_t | nrf_ble_escs_adv_interval_t |
typedef int8_t | nrf_ble_escs_radio_tx_pwr_t |
typedef int8_t | nrf_ble_escs_adv_tx_pwr_t |
typedef uint8_t | nrf_ble_escs_factory_reset_t |
typedef struct nrf_ble_escs_s | nrf_ble_escs_t |
typedef void(* | nrf_ble_escs_write_evt_handler_t )(nrf_ble_escs_t *p_escs, nrf_ble_escs_evt_type_t evt_type, uint16_t value_handle, uint8_t *p_data, uint16_t length) |
typedef void(* | nrf_ble_escs_read_evt_handler_t )(nrf_ble_escs_t *p_escs, nrf_ble_escs_evt_type_t evt_type, uint16_t value_handle) |
Enumerations | |
enum | nrf_ble_escs_lock_state_read_t { NRF_BLE_ESCS_LOCK_STATE_LOCKED = (0x00), NRF_BLE_ESCS_LOCK_STATE_UNLOCKED = (0x01), NRF_BLE_ESCS_LOCK_STATE_UNLOCKED_AUTO_RELOCK_DISABLED } |
Read states of the Lock State characteristic. | |
enum | nrf_ble_escs_lock_byte_t { NRF_BLE_ESCS_LOCK_BYTE_LOCK = (0x00), NRF_BLE_ESCS_LOCK_BYTE_DISABLE_AUTO_RELOCK = (0x02) } |
Write bytes of the Lock State characteristic. | |
enum | nrf_ble_escs_evt_type_t { NRF_BLE_ESCS_EVT_BROADCAST_CAP, NRF_BLE_ESCS_EVT_ACTIVE_SLOT, NRF_BLE_ESCS_EVT_ADV_INTERVAL, NRF_BLE_ESCS_EVT_RADIO_TX_PWR, NRF_BLE_ESCS_EVT_ADV_TX_PWR, NRF_BLE_ESCS_EVT_LOCK_STATE, NRF_BLE_ESCS_EVT_UNLOCK, NRF_BLE_ESCS_EVT_PUBLIC_ECDH_KEY, NRF_BLE_ESCS_EVT_EID_ID_KEY, NRF_BLE_ESCS_EVT_RW_ADV_SLOT, NRF_BLE_ESCS_EVT_RW_ADV_SLOT_PREP, NRF_BLE_ESCS_EVT_RW_ADV_SLOT_EXEC, NRF_BLE_ESCS_EVT_FACTORY_RESET, NRF_BLE_ESCS_EVT_REMAIN_CONNECTABLE } |
Eddystone Configuration Service event types (corresponding to each characteristic). More... | |
Functions | |
ret_code_t | nrf_ble_escs_init (nrf_ble_escs_t *p_escs, const nrf_ble_escs_init_t *p_ecs_init) |
Function for initializing the Eddystone Configuration Service. More... | |
ret_code_t | nrf_ble_escs_on_ble_evt (nrf_ble_escs_t *p_escs, ble_evt_t *p_ble_evt) |
Function for handling the Eddystone Configuration Service's BLE events. More... | |
ret_code_t | nrf_ble_escs_get_lock_state (const nrf_ble_escs_t *p_escs, nrf_ble_escs_lock_state_read_t *p_lock_state) |
Function for checking if a beacon is locked. More... | |
ret_code_t | nrf_ble_escs_active_slot_get (const nrf_ble_escs_t *p_escs, uint8_t *p_active_slot) |
Function for getting the current active slot. More... | |
Eddystone Configuration Service module.
ret_code_t nrf_ble_escs_active_slot_get | ( | const nrf_ble_escs_t * | p_escs, |
uint8_t * | p_active_slot | ||
) |
Function for getting the current active slot.
[in] | p_escs | Eddystone Configuration Service structure. |
[out] | p_active_slot | Pointer where resulting value will be stored. |
NRF_SUCCESS | If the operation was successful. |
NRF_ERROR_NULL | If p_escs is NULL. |
ret_code_t nrf_ble_escs_get_lock_state | ( | const nrf_ble_escs_t * | p_escs, |
nrf_ble_escs_lock_state_read_t * | p_lock_state | ||
) |
Function for checking if a beacon is locked.
[in] | p_escs | Eddystone Configuration Service structure. |
[out] | p_lock_state | Pointer to where result will be stored. |
NRF_SUCCESS | If the operation was successful. |
NRF_ERROR_NULL | If p_escs is NULL. |
ret_code_t nrf_ble_escs_init | ( | nrf_ble_escs_t * | p_escs, |
const nrf_ble_escs_init_t * | p_ecs_init | ||
) |
Function for initializing the Eddystone Configuration Service.
[out] | p_escs | Eddystone Configuration Service structure. This structure must be supplied by the application. It is initialized by this function and will later be used to identify this particular service instance. |
[in] | p_ecs_init | Information needed to initialize the service. |
NRF_SUCCESS | If the service was successfully initialized. Otherwise, an error code is returned. |
NRF_ERROR_NULL | If either of the pointers p_escs or p_ecs_init is NULL. |
ret_code_t nrf_ble_escs_on_ble_evt | ( | nrf_ble_escs_t * | p_escs, |
ble_evt_t * | p_ble_evt | ||
) |
Function for handling the Eddystone Configuration Service's BLE events.
The Eddystone Configuration Service expects the application to call this function each time an event is received from the SoftDevice. This function processes the event if it is relevant and calls the Eddystone Configuration Service event handler of the application if necessary.
[in] | p_escs | Eddystone Configuration Service structure. |
[in] | p_ble_evt | Event received from the SoftDevice. |
NRF_ERROR_NULL | If any of the arguments given are NULL. |
NRF_SUCCESS | otherwise. |