Document the GATT APIs not waiting for TX context when being called
from the system workqueue context. This is because the TX contexts
are freed by the system workqueue so blocking would cause a deadlock.
The number of TX contexts are by default equal to the number of
TX buffers in the system. Since TX contexts is allocated after a buffer,
but freed from a lower priority than the buffer then there can be more
allocated TX contexts than TX buffers.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove the incorrect documentation note about the indication callback
being called from the system workqueue.
The callback will be called by the RX thread once the confirm indication
response has been received.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Allow NULL pointer to be passed to bt_id_get function so
that only count can be fetched.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Don't auto-update the device name in the advertising data as that
would clear any other scan-response data set by the application.
Document the behavior of the advertise with device name option
and the need to update data by the application to make sure
advertising data does not get cleared.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix endianness issue in reading CPF descriptor not converting from
native endianess to little-endian on the 'unit' and 'description'
fields.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add definitions for the HCI command LE Generate DHKey v2.
This command includes the option to use the debug private key.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Set #0 is used for legacy advertising when legacy HCI commands are used
and in such case it's possible to enable advertising without any prior
configuration. This means we should better always have PDUs in set #0
initialized with default empty data.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Reduces some user confusion regarding whether it is related
to "Connection ID", "Channel ID", or "Company ID" for the
uninitiated.
Signed-off-by: Emil Hammarstrom <emil.hammarstrom@assaabloy.com>
Prevent the bt_rand function from being called before bt_enable.
Depending on the implementation of bt_rand this function cannot
be called before bluetooth has been initialized. With host supplied
crypto functions the HCI LE rand command is used for example.
The use case for calling bt_id_create before bt_enable is meant for
when the application has storage for the identity instead of the stack.
So we add the requirement that the application has to have storage
for the identity resolving key (IRK) in addition when the local
device is privacy-enabled.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix doxygen in addr.h file, missing /** needed for doxygen,
and placing the brief on the first line of the comment consistenly.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Deprecate the bt_set_id_addr API function. This is merely a wrapper
for the bt_id_create function now, except an IRK cannot be given.
When CONFIG_BT_PRIVACY is enabled an IRK has to be given by the
application because the bt_rand function cannot be called before
bt_enable.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove the deprecated bt_conn_create_slave_le function.
This was deprecated in the 2.3.0 release.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove the deprecated bt_conn_security function.
This has been deprecated in the 2.3.0 release.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove the deprecated connection create API functions.
These have been deprecated in the 2.3.0 release.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove the deprecated Advertising Types definitions.
These have been deprecated in the 2.3.0 release.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove the deprecated BT_BUF_USER_DATA_MIN macro.
This was deprecated for the 2.3.0 release.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove the deprecated security level define and the HCI error
code for authentication failure.
These have been deprecated since the 2.0.0 release.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove the deprecated scan filter duplicate enum values and parameter.
This was deprecated for the 2.3.0 release.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update description to maximum and minimum values of interval_min and
interval_max fields of bt_le_adv_param struct according to
Bluetooth Core Specification 5.2
Signed-off-by: Alexey Tsvetkov <xeenych@gmail.com>
Add public function to set Constant Tone Extension transmission
enabled or disabled for periodic advertising.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add implementation of HCI_Set_Connecitonless_CTE_TX_Enable
command to HCI. Add scratch implementation of command handling
functions to controller.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This is a pairing function with bt_le_scan_cb_register()
to used for remove the scanner callback from callback list.
Signed-off-by: chao an <anchao@xiaomi.com>
Add publicly accessible function to set Constant Tone Extension
parameters for CTE transmission with periodic advertising.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add implementation of a wrapper for HCI_LE_Set_-
Connectionless_CTE_Transmit_Parameters send command.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add Direction Finding to host initialization sequence.
It allows to get information about Direction finding
optional CTE settings supported by controller.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The proper usage of @param in callbacks is currently unsupported by
Doxygen so not warnings are generated. The issues fixed with this commit
where found while adding support to Doxygen for validating @param in
callbacks like it currently does for functions.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Add implementation of HCI_LE_Set_Connectionless_CTE_-
Transmit_Parameters command in HCI.
Add implementation of command handling in controller.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add enum for LE Read Transmit Power phy values, which are different
form the values used for PHY update procedure since it includes values
for the LE Coded PHY coding schemes.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Added a new Bluetooth API that can be used to read the current and
maximum transmit power level of the radio. The reading operation is
performed over HCI.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Add helper defines for Extended Advertising parameters that
can be used while creating Extended Advertising sets.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Make bt_conn_ref return NULL if the reference count has reached zero.
This makes it possible to re-use bt_conn_ref internally to re-use the
reference count mechanism to check if the reference is in use.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add defines and structs for reading information about supported codes,
codec capabilities and controller delays. Return parameter structs for
commands that return multiple variable-length fields only model the
fixed-length fields to minimize inconsistencies.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
Clarify that the acl_data struct includes the bt_buf type as the
first variable in the user data struct.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add implementation of HCI_LE_Set_Connection_CTE_Transmit_Parameters
for Bluetooth 5.1 Direction Finding.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add Bluetooth 5.1 Direction Finding HCI command:
HCI_LE_Read_Antenna_Information handling to Host.
Add wrapper function to handle send the command
and receive response from Controller.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Put infrastructure for the following HCI commands/events in place:
* LE Setup ISO Data Path command
* LE Remove ISO Data Path command
* Configure Data Path command
* LE Set CIG Parameters Test command
* LE ISO Read Test Counters command
* LE ISO Receive Test command
* LE ISO Test End command
* LE ISO Transmit Test command
Signed-off-by: Asger Munk Nielsen <asmk@oticon.com>
Document the security changed callback can be called with no change
in the security level when the encryption key has been changed
in the link-layer.
Also update the documentation for set security function to include
the bond information so that it matches the documentation for security
changed callback.
Update pairing process to pairing procedure for consistency.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>