Retrieve the low energy connection parameters.
Synopsis:
#include <btapi/btdevice.h>
int bt_rdev_get_le_conn_params(const bt_remote_device_t *remote_device, uint16_t *min_conn_ivl, uint16_t *max_conn_ivl, uint16_t *latency, uint16_t *super_tmo)
Arguments:
- remote_device
-
A pointer to a remote device structure.
- min_conn_ivl
-
The preferred minimum connection interval. These are possible values that are returned to you:
- Range: 0x0006 to 0x0C80
- Time = N * 1.25 msec
- Time range: 7.5 msec to 4 seconds
- max_conn_ivl
-
Preferred maximum connection interval. These are possible values that are returned to you:
- Range: 0x0006 to 0x0C80
- Time = N * 1.25 msec
- Time range: 7.5 msec to 4 seconds
- latency
-
The preferred latency value. You can use a range from 0x0000 to 0x01F4.
- super_tmo
-
The preferred supervisory timeout. The timeout can be:
- Range: 0x000A to 0x0C80. A value of 0 is returned if unknown.
- Time = N * 10 msec
- Time range: 100 msec to 32 seconds
Library:
libbtapi (For the qcc command, use the -l btapi option to link against this library)
Description:
This function retrieves the preferred low energy connection parameters for the remote device. If these parameters are not known (invalid), the min_conn_ivl and max_conn_ivl arguments will be 0. In addition, if super_tmo is 0, then both super_tmo and latency arguments are considered invalid.
All arguments provided as part of this call are pointers to a buffer the results are written to. If you do not require a specific piece of information, provide a value of NULL for the argument.
Returns:
0 is returned upon success,
-1 with the
errno set otherwise. Possible
errno values include:
- EINVAL: An invalid value was passed in for remote_device.
- ENOTSUP: The remote device does not contain low energy parameters.