Those APIs are used for deleting appkey, unbinding an application
from SIG model, unbinding an application from vendor model on the
target node, with matching shell command.
Signed-off-by: YanBiao Hao <haoyanbiao@126.com>
Adds a Config Client API for deleting netkeys on the target node, with
matching shell command.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Added a callback that lets an application get write error
(if any) when subscribing to a gatt characteristic.
Signed-off-by: Emil Gydesen <emil_gydesen@bose.com>
Remove paragraph in documentation of GATT write callback which is
clearly wrong and was meant for the read callback.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This fixes an error introduced in commit
9b2e9eda89
It seems that in a couple of instances, the "_VAL" suffix was
forgotten. One of these broke the le-audio build.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
Add encode utility mocre for 16 and 32 bits UUIDs that can be
used to in combination with BT_DATA_BYTES to include UUIDs
in advertising data.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add defines for UUID values so that they can be used without
declaring a full bt_uuid struct.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Elevate connections always to security mode 1 level 4 when
Secure Connections Only Mode has been enabled in the Security Manager.
Elevate connections always to security mode 1 level 3 when
Legacy pairing with OOB only has been enabled in the Security Manager.
Fixes: #27338
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Added a #define for the maximum attribute length defined
by the core spec. Usefull for GATT servers and clients that
deals with long values.
Signed-off-by: Emil Gydesen <emil_gydesen@bose.com>
Core 5.2, Vol 4, Part E, section 5.3.1 clarifies that advertising set
handle is assigned by host when advertising set is created and this
happens only on LE Set Extended Advertising Parameters.
An advertising set handle is an arbitrary number within allowed range,
i.e. 0x00-0xEF and not 0..max_supported-1.
This patch adds option to enable advertising set handle mapping from
HCI range as defined by Core specification to zero-based handles used
by LL. If enabled, HCI handle will be remapped to LL handle for each
command, otherwise HCI handle will be used as an LL handle. The latter
effectively skips mapping logic and should be used with Zephyr host
which uses zero based indexes.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Added support for syncing to periodic advetisements.
The API and usage is heavily inspired by the extended advertisement
and connection APIs.
Signed-off-by: Emil Gydesen <emil_gydesen@bose.com>
Added the ext adv report interval to bt_le_scan_recv_info which
denotes whether or not there is periodic advertisement data
associated with the advertisement report.
Signed-off-by: Emil Gydesen <emil_gydesen@bose.com>
Added API to set periodic adv parameters, periodic adv data
and to enable/disable periodic advertisement.
Signed-off-by: Emil Gydesen <emil_gydesen@bose.com>
Document the behavior of bt_le_ext_adv_set_data ignoring either
advertising or scan response data when the configuration does
not support this type of data.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Document need to register services that are always registered as dynamic
services with CCCs loaded from settings.
These services must be registered before calling settings_load.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Adds a high-level documentation page for the Bluetooth Mesh Shell
subsystem, documenting all available commands and their parameters.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Added a feature that allows an application to request
automatic discovery of the CCCD handle when subscriping
to a characteristic. In order to preserver RAM, the application
is expected to provide the discovery parameters, and it's up
to the application whether or not it wants to reuse the
discovery parameters or use one for each characteristic.
Signed-off-by: Emil Gydesen <emil_gydesen@bose.com>
Add bond_deleted callback so that the application can keep track
of when bond information is deleted in the stack.
Bond information can be deleted by the application through bt_unpair
or automatically by the stack in some cases, e.g when
CONFIG_BT_KEYS_OVERWRITE_OLDEST is enabled and the oldest bond
is overwritten.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Include the files that provide the types and macros used by the
header. Ensure that all declarations use C language linkage when
included from a file using C++.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
C99 designated array initializers are not part of the C++ language,
and are not supported in GNU G++. Replace their use with invocations
of the Zephyr listify macro utility, with ancillary helper functions.
Also fix the initialization order to match declaration order (which
C++ also requires).
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
C++ requires that designated initializers be provided in declaration
order. Fix the macros that violate this requirement.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add options for phy update procedure. User can now set no preference
option for a particular PHY as well as preference for LE Coded PHY
coding scheme.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Previous mode store function only can store single data,
change this to store as KV model, let's app-layer to manager
model data, other than by stack when node reset.
Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
User and implementation code may change the uuid pointer stored in
discover and gatt_read parameter structures, but it should never
mutate the pointed-to-value. Add a const qualifer so UUIDs stored in
flash can be referenced.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The indicate callback does not provide a return value. The read
callback didn't document its return values.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Adds propagation of error returns from the model init callbacks in
Access, and removing any other checks for successful init in the
foundation models.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Add application control of initiating phy change procedure and it's
parameters.
The reasons for allowing the application control over the PHY:
- Allow changing to Coded PHY.
- Application may change PHY to react to changes in environment
to balance throughput and range.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add application control of initiating data length procedure and it's
parameters.
The reasons for allowing the application control over the data length:
- Bandwidth control adjusted based on number of active connections.
- Changing data length before switching to coded phy.
- Applying workarounds for interoperability problems.
- Controlling order of ATT MTU and data length procedures.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The Bluetooth 5.2 specification was recently released, and has a new
version identifier (11) assigned to it in the Bluetooth Assigned
Numbers.
Relates to commit fa241f0249 ("bluetooth: Add decoding for BLE 5.2
version string")
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Only persist advertising when the bt_le_adv_start API is used to start
the advertiser. For multiple advertising set a connectable advertiser
can only be started if there is a connection object available for the
advertiser. Leave the decision on which advertising set should be
advertising up to the application instead of suspending advertising
when no connection object is available.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix BT_LE_CONN_OPT_NONE renamed to BT_CONN_LE_OPT_NONE missed in 2
places in conn.h
Regression from commit: fdb3da8aff
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove the BT_LE_CONN_OPT_2M option and update documentation.
This was a misunderstand about the init PHY HCI parameter.
The init PHY in the extended connection create command does not
determine which PHYs are accepted as the initial PHY of the
connection. This is instead determined by the secondary PHY of the
extended advertiser.
The init PHY parameter only specifies which conn parameters are
provided, and since we only provide one conn parameter this option
has no effect.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This adds a new flag to track if the L2CAP channel is pending waiting
for encryption to be changed to resume connecting.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds support for ATT_MULTIPLE_HANDLE_VALUE_NTF,
ATT_READ_MULTIPLE_VARIABLE_REQ and ATT_READ_MULTIPLE_VARIABLE_RSP.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds support for EATT bearer which was introduced in 5.2, they work
as extra channels to have GATT traffic, at the moment it is completely
transparent to application when they are in use since the allocation
happens automatically.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds the definitions for Enhanced ATT along with new PDUs and UUIDs
introduced in 5.2.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds a callback to indicate when the stack has released all
references to a given channel so the owner free up any resources
associated with that.
This is requires since EATT channels cannot rely on the destroy callback
as it does not use a fixed channel like ATT.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds the initial implementation of ECRED mode which can connect up
to 5 channels simultaneously and is required by EATT.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Attempt to fix C++ error: taking address of temporary array.
According to GCC documentation:
In C++, a compound literal designates a temporary object that only
lives until the end of its full-expression.
Finishing with this recommendation:
As an optimization, G++ sometimes gives array compound literals
longer lifetimes: when the array either appears outside a function
or has a const-qualified type.
But it is probably safest just to avoid the use of array compound
literals in C++ code.
Fix the issue by introducing INIT macros as an alternative, and use
these in the inline functions to avoid the use of array compound
literals in Bluetooth headers.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>