Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wiced_bt_beacon.h File Reference

> More...

Data Structures

struct  wiced_bt_beacon_ble_advert_elem_t
 

Macros

#define WICED_BT_BEACON_ADV_DATA_MAX   31
 
#define EDDYSTONE_FRAME_TYPE_UID   0x00
 
#define EDDYSTONE_FRAME_TYPE_URL   0x10
 
#define EDDYSTONE_FRAME_TYPE_TLM   0x20
 
#define EDDYSTONE_FRAME_TYPE_EID   0x30
 
#define EDDYSTONE_UID_FRAME_LEN   20
 
#define EDDYSTONE_UID_NAMESPACE_LEN   10
 
#define EDDYSTONE_UID_INSTANCE_ID_LEN   6
 
#define EDDYSTONE_URL_FRAME_LEN   20
 
#define EDDYSTONE_URL_VALUE_MAX_LEN   17
 
#define EDDYSTONE_TLM_UNENCRYPTED_VERSION   0
 
#define EDDYSTONE_TLM_ENCRYPTED_VERSION   1
 
#define EDDYSTONE_TLM_UNENCRYPTED_FRAME_LEN   14
 
#define EDDYSTONE_TLM_ENCRYPTED_FRAME_LEN   18
 
#define EDDYSTONE_ETLM_LEN   12
 
#define EDDYSTONE_EID_FRAME_LEN   10
 
#define EDDYSTONE_EID_LEN   8
 
#define EDDYSTONE_UUID16   0xFEAA
 
#define EDDYSTONE_ELEM_NUM   3
 
#define EDDYSTONE_URL_SCHEME_0   0x00
 
#define EDDYSTONE_URL_SCHEME_1   0x01
 
#define EDDYSTONE_URL_SCHEME_2   0x02
 
#define EDDYSTONE_URL_SCHEME_3   0x03
 
#define IBEACON_TYPE   0x01
 
#define IBEACON_PROXIMITY   0x02, 0x15
 
#define IBEACON_COMPANY_ID_APPLE   0x4c, 0x00
 
#define IBEACON_DATA_LENGTH   0x19
 
#define IBEACON_ELEM_NUM   2
 

Functions

void wiced_bt_eddystone_set_data_for_uid (uint8_t eddystone_ranging_data, uint8_t eddystone_namespace[EDDYSTONE_UID_NAMESPACE_LEN], uint8_t eddystone_instance[EDDYSTONE_UID_INSTANCE_ID_LEN], uint8_t adv_data[WICED_BT_BEACON_ADV_DATA_MAX], uint8_t *adv_len)
 Creates Google Eddystone UID format advertising data. More...
 
void wiced_bt_eddystone_set_data_for_url (uint8_t tx_power, uint8_t urlscheme, uint8_t encoded_url[EDDYSTONE_URL_VALUE_MAX_LEN], uint8_t adv_data[WICED_BT_BEACON_ADV_DATA_MAX], uint8_t *adv_len)
 Creates Google Eddystone URL format advertising data. More...
 
void wiced_bt_eddystone_set_data_for_eid (uint8_t eddystone_ranging_data, uint8_t eid[EDDYSTONE_EID_LEN], uint8_t adv_data[WICED_BT_BEACON_ADV_DATA_MAX], uint8_t *adv_len)
 Creates Google Eddystone EID format advertising data. More...
 
void wiced_bt_eddystone_set_data_for_tlm_unencrypted (uint16_t vbatt, uint16_t temp, uint32_t adv_cnt, uint32_t sec_cnt, uint8_t adv_data[WICED_BT_BEACON_ADV_DATA_MAX], uint8_t *adv_len)
 Creates Google Eddystone TLM unencrypted format advertising data. More...
 
void wiced_bt_eddystone_set_data_for_tlm_encrypted (uint8_t etlm[EDDYSTONE_ETLM_LEN], uint16_t salt, uint16_t mic, uint8_t adv_data[WICED_BT_BEACON_ADV_DATA_MAX], uint8_t *adv_len)
 Creates Google Eddystone TLM encrypted format advertising data. More...
 
void wiced_bt_ibeacon_set_adv_data (uint8_t ibeacon_uuid[LEN_UUID_128], uint16_t ibeacon_major_number, uint16_t ibeacon_minor_number, uint8_t tx_power_lcl, uint8_t adv_data[WICED_BT_BEACON_ADV_DATA_MAX], uint8_t *adv_len)
 Creates Apple iBeacon format advertising data. More...
 

Detailed Description

>

The APIs to create Google Eddystone and Apple iBeacon advertisements.

To Eddystone, see specification at https://github.com/google/eddystone.

To iBeacon, see specification at https://developer.apple.com/ibeacon/.

For more usage details, refer example demo.beacon.

This software, including source code, documentation and related materials ("Software") is owned by Cypress Semiconductor Corporation or one of its affiliates ("Cypress") and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Therefore, you may use this Software only as provided in the license agreement accompanying the software package from which you obtained this Software ("EULA"). If no EULA applies, Cypress hereby grants you a personal, non-exclusive, non-transferable license to copy, modify, and compile the Software source code solely for use in connection with Cypress's integrated circuit products. Any reproduction, modification, translation, compilation, or representation of this Software except as specified above is prohibited without the express written permission of Cypress.

Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes to the Software without notice. Cypress does not assume any liability arising out of the application or use of the Software or any product or circuit described in the Software. Cypress does not authorize its products for use in any products where a malfunction or failure of the Cypress product may reasonably be expected to result in significant property damage, injury or death ("High Risk Product"). By including Cypress's product in a High Risk Product, the manufacturer of such system or application assumes all risk of such use and in doing so agrees to indemnify Cypress against all liability.

Function Documentation

void wiced_bt_eddystone_set_data_for_eid ( uint8_t  eddystone_ranging_data,
uint8_t  eid[EDDYSTONE_EID_LEN],
uint8_t  adv_data[WICED_BT_BEACON_ADV_DATA_MAX],
uint8_t *  adv_len 
)

Creates Google Eddystone EID format advertising data.

The application calls the API to populate advertisement data for Google Eddystone EID advertisement format. It returns the adv data buffer and length.

Parameters
[in]tx_powerCalibrated TX power, see specification for details for input parameters.
[in]urlschemeURL scheme
[in]encoded_urlURL
[out]adv_dataBuffer of advertisement data
[out]adv_lenLength of advertisement data
Returns
None.
void wiced_bt_eddystone_set_data_for_tlm_encrypted ( uint8_t  etlm[EDDYSTONE_ETLM_LEN],
uint16_t  salt,
uint16_t  mic,
uint8_t  adv_data[WICED_BT_BEACON_ADV_DATA_MAX],
uint8_t *  adv_len 
)

Creates Google Eddystone TLM encrypted format advertising data.

The application calls the API to populate advertisement data for Google Eddystone TLM encrypted advertisement format. It returns the adv data buffer and length.

Parameters
[in]etlmEncrypted TLM data, see specification for details for input parameters.
[in]salt16-bit Salt
[in]mic16 bit Message Integrity Check
[out]adv_dataBuffer of advertisement data
[out]adv_lenLength of advertisement data
Returns
None.
void wiced_bt_eddystone_set_data_for_tlm_unencrypted ( uint16_t  vbatt,
uint16_t  temp,
uint32_t  adv_cnt,
uint32_t  sec_cnt,
uint8_t  adv_data[WICED_BT_BEACON_ADV_DATA_MAX],
uint8_t *  adv_len 
)

Creates Google Eddystone TLM unencrypted format advertising data.

The application calls the API to populate advertisement data for Google Eddystone TLM unencrypted advertisement format. It returns the adv data buffer and length.

Parameters
[in]tempBeacon temperature, see specification for details for input parameters.
[in]adv_cntAdvertising PDU count
[in]sec_cntTime since power-on or reboot
[out]adv_dataBuffer of advertisement data
[out]adv_lenLength of advertisement data
Returns
None.
void wiced_bt_eddystone_set_data_for_uid ( uint8_t  eddystone_ranging_data,
uint8_t  eddystone_namespace[EDDYSTONE_UID_NAMESPACE_LEN],
uint8_t  eddystone_instance[EDDYSTONE_UID_INSTANCE_ID_LEN],
uint8_t  adv_data[WICED_BT_BEACON_ADV_DATA_MAX],
uint8_t *  adv_len 
)

Creates Google Eddystone UID format advertising data.

The application calls the API to populate advertisement data for Google Eddystone UID advertisement format. It returns the adv data buffer and length.

Parameters
[in]eddystone_ranging_dataCalibrated TX power, see specification for details for input parameters.
[in]eddystone_namespaceUID namespace
[in]eddystone_instanceInstance
[out]adv_dataBuffer of advertisement data
[out]adv_lenLength of advertisement data
Returns
None.
void wiced_bt_eddystone_set_data_for_url ( uint8_t  tx_power,
uint8_t  urlscheme,
uint8_t  encoded_url[EDDYSTONE_URL_VALUE_MAX_LEN],
uint8_t  adv_data[WICED_BT_BEACON_ADV_DATA_MAX],
uint8_t *  adv_len 
)

Creates Google Eddystone URL format advertising data.

The application calls the API to populate advertisement data for Google Eddystone URL advertisement format. It returns the adv data buffer and length.

Parameters
[in]tx_powerCalibrated TX power, see specification for details for input parameters.
[in]urlschemeURL scheme
[in]encoded_urlURL
[out]adv_dataBuffer of advertisement data
[out]adv_lenLength of advertisement data
Returns
None
void wiced_bt_ibeacon_set_adv_data ( uint8_t  ibeacon_uuid[LEN_UUID_128],
uint16_t  ibeacon_major_number,
uint16_t  ibeacon_minor_number,
uint8_t  tx_power_lcl,
uint8_t  adv_data[WICED_BT_BEACON_ADV_DATA_MAX],
uint8_t *  adv_len 
)

Creates Apple iBeacon format advertising data.

The application calls the API to populate advertisement data for Apple iBeacon advertisement format. It returns the adv data buffer and length.

Parameters
[in]ibeacon_uuidCustomer beacon UUID, see specification for details for input parameters.
[in]ibeacon_major_numberBeacon major number
[in]ibeacon_minor_numberBeacon minor number
[in]tx_power_lclmeasured power
[out]adv_dataBuffer of advertisement data
[out]adv_lenLength of advertisement data
Returns
None.