Commit graph

71 commits

Author SHA1 Message Date
Valerio Setti 32b792b21f bluetooth: remove BT_TINYCRYPT_ECC in bluetooth mesh tests
Some bluetooth test were using BT_TINYCRYPT_ECC without also
setting BT_ECC. This means that BT_TINYCRYPT_ECC gets disabled
as it depends on BT_ECC.
This commit fix this by removing BT_TINYCRYPT_ECC in all test
for bluetooth mesh.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-14 15:41:34 +02:00
Dominik Ermel 5a0ecb9641 flash: Move dependency on FLASH_PAGE_LAYOUT where it belongs
The commit adds dependency on Kconfig FLASH_PAGE_LAYOUT to subsystems
that really require it:
 FCB, NVS, LittleFS
and removes direct selection from '*.conf' files where no longer
needed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-10 10:01:40 +02:00
Théo Battrel 4a55bc00f0 Bluetooth: Shell: Add support for EAD
Add new commands to manage the Encrypted Advertising Data feature.

Overview of those new commands:

- `bt encrypted-ad set-keys`: set key materials (session key and
  initialisation vector) used for encrypted and decryption of EAD;
- `bt encrypted-ad add-ad`: store a given advertising data structure;
- `bt encrypted-ad add-ead`: encrypt the given advertising data
  structres and store the generated AD structure;
- `bt encrypted-ad commit-ad`: set the AD of the selected advertiser
  with the stored AD;
- `bt encrypted-ad clear-ad`: remove all stored AD;
- `bt encrypted-ad decrypt-scan`: decrypt data using the previously set
  key materials when receiving AD with type `0x31`.

The documentation of the Bluetooth Shell has been updated to include
those new commands.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-03-13 18:51:03 +02:00
Théo Battrel f5ff886260 Bluetooth: Tests: Remove usage of BT_DEBUG_LOG
Remove usage of Kconfig symbol `CONFIG_BT_DEBUG_LOG` from tests. It has
been deprecated since this PR:
https://github.com/zephyrproject-rtos/zephyr/pull/56183

The Kconfig symbols has been replaced by `CONFIG_LOG=y` on most of the
cases. Or it has been removed when not needed anymore.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-06-07 13:56:55 -04:00
Aleksander Wasaznik 6b6178be30 Bluetooth: Shell: Make gatt notify more general
Make `gatt notify` take the source handle and the data to send.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-03-20 09:51:24 +01:00
Aleksander Wasaznik 6648da731b Bluetooth: Host: SMP Keypress Notification
Add experimental support for SMP Keypress Notification.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-03-13 14:04:25 +01:00
Jonathan Rico ee190f49c2 Shell: bluetooth: don't refer to commit message text
One sometimes forgets files can be distributed outside of git..

Added a concise usage example of the command above the config.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-07-12 15:38:46 +02:00
Jonathan Rico 76f74344a8 Shell: kernel: Add runtime log filtering command
Use `kernel log-level modulename severity`
Also enable it for the Bluetooth Shell.

Then one can compile-in a lot of BT modules like so:

CONFIG_BT_DEBUG_HCI_CORE=y
CONFIG_BT_DEBUG_L2CAP=y
CONFIG_BT_DEBUG_ATT=y
CONFIG_BT_DEBUG_GATT=y

And at runtime select only, e.g. GATT

kernel log-level bt_hci_core 0
kernel log-level bt_l2cap 0
kernel log-level bt_att 0

And then re-enable L2CAP if needed later

kernel log-level bt_l2cap 4

And so on..

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-07-12 12:24:43 +02:00
Emil Gydesen 0eb5b3ac03 Bluetooth: Shell: Add gatt notify-mult command
Add GATT command to test the bt_gatt_notify_multiple
function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:29:33 +02:00
Emil Gydesen 3f247b212b Bluetooth: ISO: Add Kconfig for ISO central/peripheral
Add two new Kconfigs: BT_ISO_CENTRAL and BT_ISO_PERIPHERAL
that is used to do central or peripheral only builds,
similar to the BT_CENTRAL or BT_PERIPHERAL Kconfigs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-13 12:44:47 -07:00
Nazar Kazakov f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Emil Gydesen 7b73472139 Bluetooth: shell: Enable ISO for the BT shell
Enable ISO (unicast and broadcast) for the BT shell.
This allows users to use the ISO features (if supported by
the controller) in the shell.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-11-13 08:00:16 -05:00
Emil Gydesen f49d69ee00 Bluetooth: shell: Move LE audio configuration to a new file
Move the LE audio configuration to a new audio.conf file
in the bluetooth shell project, similar to the mesh.conf
file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-22 11:30:56 +02:00
Carles Cufi 6de4747979 Bluetooth: Update terms in public API to spec v5.3
The Bluetooth Core Specification, version 5.3, has introduced multiple
changes to several widely-used terms in order to make them inclusive.
Update the public API to reflect this, excluding hci.h, which will be
done in a subsequent commit.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-15 14:02:50 +03:00
Emil Gydesen f79b39c104 Bluetooth: shell: Remove accidentally added debug config
Remove two debug config values from the BT shell that
was accidentally merged.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-26 13:42:22 -04:00
Emil Gydesen c47dae8c6d Bluetooth: ISO: Update connected ISO API
Update the connected ISO API to be more
similar to the broadcast ISO API as well
as the HCI spec.

This updated API allows for more flexibility
and will better support scenarios such as true
wireless setup, as ISO channels and connections
are more independent now.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-24 07:29:11 -04:00
Emil Gydesen 2c67bafb7b Bluetooth: Audio: Microphone Input Control Service and Client
This commit implements the microphone input  control service
(MICS) and client, The implementation supports and uses the
Audio Input Control Service (AICS) secondary service.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-06-07 12:04:28 +02:00
Casper Bonde afe469eac7 Bluetooth: ISO: Speed up BT ISO data processing
For the native posix build the sleep calls used in tasks will stall
the zephyr instance which sets an upper limit on the data processing
interval to once every 20-30 millisecond.
This change reduces the duration of the sleep calls and increases the
TICKS_PER_SECOND to allow for shorter sleeps. This is needed to
support the data rates needed for LE Audio streaming. The rate is
tuned to support up to bidirectional 5ms ISO-intervals.
This change also increases the ISO buffer count from 1 to 5 to
allow for some buffering in the controller, which is needed for
gapless playback and/or use of burst number larger than 1.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>
2021-05-27 13:16:40 +02:00
Emil Gydesen 82a32f5ca5 Bluetooth: Audio: Volume Control Service and client
This commit implements the volume control service (VCS) and
client, The implementation supports and uses the
Audio Input Control Service (AICS) and
Volume Offset Control Service (VOCS) secondary services.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-05-07 15:02:41 +02:00
Emil Gydesen 2016509756 Bluetooth: Audio: Audio Input Control Service and client
This commit implements the secondary service
Audio Input Control Service (AICS) server and client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-04-12 11:47:00 -04:00
Emil Gydesen ed2162c700 Bluetooth: Audio: Volume Offset Control Service and Client
This commit implements the secondary service
Volume Offset Control Service (VOCS) server and client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-03-22 13:05:56 -04:00
Emil Gydesen a264efbcbc Bluetooth: host: Initial support for BIS
Added initial support for BIS (broadcast ISO stream), which
adds support for creating BISes as both broadcaster and receiver,
as well as managing and creating BIGs.

Extends PA sync to handle BIGInfo adveritising reports.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-03-09 08:06:02 -05:00
Joakim Andersson f8956cfbc7 Bluetooth: L2CAP: Enable L2CAP dynamic channels without Enhanced CBFC
Allow application to enable L2CAP dynamic channels without support
for Enhanced Credit Based Flow Control (CBFC).

Since these are separate features in the qualification it should
be possible to qualify L2CAP connection oriented channels without
also having to qualify L2CAP enhanced credit based flow control.

The L2CAP/LE/REJ/BI-02-C conformance test will fail when enhanced CBFC
has not been selected in the ICS.

The lower tester expects that since the Enhanced CBFC is not supported,
the command L2CAP_CREDIT_BASED_CONNECTION_REQ should be met with an
L2CAP_COMMAND_REJECT_RSP and not an L2CAP_CREDIT_BASED_CONNECTION_RSP.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-11-09 11:25:10 +01:00
Luiz Augusto von Dentz 67041a85d2 Bluetooth: shell: Add CONFIG_BT_AUDIO
This enables use of iso module with shell application.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-09-04 21:03:13 +02:00
Emil Gydesen 8d7b5ebd7a Bluetooth: Remove _gatt_ infix for Heart Rate Service (HRS)
The _gatt_ infix was determined to be unnecessary as
GATT is implied by it being a Bluetooth service.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2020-09-04 15:38:44 +02:00
Emil Gydesen aea6afe3fa Bluetooth: host: Perodic advertisement synchronization
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>
2020-08-11 14:17:19 +02:00
Emil Gydesen 8cf01ab590 Bluetooth: host: Add periodic advertising API
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>
2020-08-11 14:17:19 +02:00
Emil Gydesen 5b59c002f6 Bluetooth: Gatt: Automatic discover of CCC when subscribing
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>
2020-07-20 12:46:18 +02:00
Joakim Andersson 194079d5bd Bluetooth: shell: Enable extended advertising support in the shell
Enable extended advertising commands in the shell and enable the
runtime check of feature support in the controller.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-05-07 20:12:29 +02:00
Joakim Andersson 21a42f3b67 Bluetooth: shell: Add phy handling to the shell
Add phy update callback and command to the shell.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-05-07 20:12:29 +02:00
Joakim Andersson 322f70243e Bluetooth: shell: Add data length handling in the shell
Add data length callback and command to the shell.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-05-07 20:12:29 +02:00
Luiz Augusto von Dentz 70271435dd Bluetooth: shell: Enable BT_EATT
This enables BT_EATT for shell samples so it can be build test by CI and
gives user the ability of test it using shell commands.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2020-05-02 15:59:14 +03:00
Joakim Andersson 98827e9f6d Bluetooth: tests: shell: Remove config not supported on native_posix
Remove CONFIG_CONSOLE_HANDLER from project configuration. When building
for native_posix this produces the following warning:

warning: CONSOLE_HANDLER was assigned the value 'y' but gotthe value 'n'
Check these unsatisfied dependencies: SERIAL_SUPPORT_INTERRUPT (=n)

The shell works without this option since this is handled by the shell
itself instead.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-27 13:45:18 +02:00
Ulf Magnusson cf89ba33ea global: Fix up leading/trailing blank lines in files
To make the updated test in
https://github.com/zephyrproject-rtos/ci-tools/pull/121 clean, though it
only checks modified files.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-01-27 17:41:55 -06:00
Johan Hedberg 4e135d76a3 Bluetooth: shell: Add printing of remote version information
Add printing of the remote version information whenever the new
CONFIG_BT_REMOTE_VERSION option is enabled.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-12-23 14:47:31 +02:00
Kamil Piszczek 92d9e30527 tests: migrating to NVS backend with settings
Bluetooth tests now use the NVS backend for Settings.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-10-11 14:55:24 +02:00
Carles Cufi f8da57a93e tests: bluetooth: shell: Revert back to default logging settings
Disable the CONFIG_TEST_LOGGING_DEFAULTS Kconfig option which forces
immedate logging, since that is not compatible with Bluetooth and its
tests.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-10-01 19:11:16 +02:00
Joakim Andersson 513244afe2 Bluetooth: Shell: Add whitelist commands to shell
Add shell commands to add and remove devices from the shell.
Add commands and options to use whitelist for advertising, scanning,
and creating connections.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-08-09 16:26:10 +02:00
Joakim Andersson 029a66a195 Bluetooth: services: Move Heart rate service
This commit moves the BLE GATT heart rate service from
samples/bluetooth/gatt to subsys/bluetooth/services and adds a Kconfig
entry to enable and configure the service.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-07-11 13:21:14 +03:00
Luiz Augusto von Dentz bd007141fd Bluetooth: GATT: Rename BT_GATT_DB to BT_GATT_DYNAMIC_DB
This should be clearer about the intent of the option.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-02 08:29:23 +03:00
Luiz Augusto von Dentz 2c4e5d5f16 Bluetooth: GATT: Disable dynamic database by default
This makes BT_GATT_DB default to n which reduces the ram required for
many samples.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-05-02 08:29:23 +03:00
Jakub Rzeszutko b7a5874830 tests: shell: migrate tests to the new shell
Testing:
1. Shell built-in commands.
2. Wildcards module.
3. Static commands creation and execution.
4. Dynamic commands creation and execution.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-11-22 11:32:29 +01:00
Johan Hedberg 343c53e841 Bluetooth: Switch from SYS_LOG to logger-based logging
Initial conversion to use syslog instead of logger.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-10-19 14:50:22 +02:00
Luiz Augusto von Dentz 592dd2e964 Bluetooth: shell: Port commands to the news shell
Fixes #8873

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-10-01 11:10:46 +02:00
Johan Hedberg 7ec40e81d0 Bluetooth: shell: Add multiple identity support
Add shell support for creating and showing identities.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-08-13 19:53:22 +03:00
Szymon Janc 504584a998 Bluetooth: att: Add option to disable GATT writable name
This allow to set name at runtime while leaving GAP name characteristic
read only.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2018-08-03 10:41:01 +02:00
Johan Hedberg b049ac1216 Bluetooth: shell: Add command for setting fixed passkey
Add a shell command to utilize the newly added bt_passkey_set() API.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-08-01 16:13:21 +03:00
Luiz Augusto von Dentz e9e5115116 Bluetooth: shell: Add name command
name command can be used to read or write the GAP Device Name which is
used by the advertise command.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-07-23 14:45:58 +03:00
Johan Hedberg a29554360a Bluetooth: shell: Add settings support
Enable settings and increase the system workqueue size to deal with
the stack usage. This also makes it possible to test unpairing support
with the shell's 'clear' command.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-05-04 17:26:05 -04:00
Anas Nashif 829598be2b tests: add CONFIG_TEST for marking tests
Mark tests with CONFIG_TEST to allow for test specific setup and
configuration.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-08 10:03:57 -05:00