ble_eddystone_set_adv_data_url
int
ble_eddystone_set_adv_data_url(
struct ble_hs_adv_fields *adv_fields,
uint8_t url_scheme,
char *url_body,
uint8_t url_body_len,
uint8_t url_suffix
)
Description
Configures the device to advertise eddystone URL beacons.
Parameters
Parameter | Description |
---|
adv_fields | The base advertisement fields to transform into an eddystone beacon. All configured fields are preserved; you probably want to clear this struct before calling this function. |
url_scheme | The prefix of the URL; one of the BLE_EDDYSTONE_URL_SCHEME values. |
url_body | The middle of the URL. Don't include the suffix if there is a suitable suffix code. |
url_body_len | The string length of the url_body argument. |
url_suffix | The suffix of the URL; one of the BLE_EDDYSTONE_URL_SUFFIX values; use BLE_EDDYSTONE_URL_SUFFIX_NONE if the suffix is embedded in the body argument. |
Returned values
Value | Condition |
---|
0 | Success. |
BLE_HS_EBUSY | Advertising is in progress. |
BLE_HS_EMSGSIZE | The specified data is too large to fit in an advertisement. |
Core return code | Unexpected error. |