bt_le_invoke_decode_advert_changed()

This function is used to return the new advertisement intervals when invoke occurs with action "bb.action.bluetooth.ADVERTCHANGE".

Synopsis:

#include <btapi/btle.h>
 
int bt_le_invoke_decode_advert_changed(const char *invoke_dat, int invoke_len, uint16_t *intervalMin, uint16_t *intervalMax)

Since:

BlackBerry 10.3.0

Arguments:

invoke_dat

The data that is provided by the invoke interface.

invoke_len

The length of the data provided by the invoke interface.

intervalMin

Returns the current minimum advertisement interval. Time = N * 0.625 msec.

intervalMax

Returns current maximum advertisement interval. Time = N * 0.625 msec.

Library:

libbtapi (For the qcc command, use the -l btapi option to link against this library)

Description:

The data being provided must have the mime-type of "application/vnd.blackberry.bluetooth.advertchange". You must call bt_le_init() before calling this function.

Returns:

EOK on success, -1 if an error occurred with the errno value set. These are some of the error codes that can be returned:
  • EAGAIN: bt_le_init() was not called.
  • EPROTO: The data provided is not properly formatted to the required mime-type
  • EINVAL: One or more of the variables provided are invalid.
  • ESRVRFAULT: An internal error has occurred.