Commit graph

217 commits

Author SHA1 Message Date
Luiz Augusto von Dentz 310ffc4c4c Bluetooth: shell: Split BR/EDR commands
This splits BR/EDR command under 'bt' to 'br' to reduce the command
list and at same time cleaning the mix between different bearers.

In addition to that also remove "br-" prefix for the commands:

br - Bluetooth BR/EDR shell commands
Options:
  -h, --help  :Show command help.
Subcommands:
  auth-pincode       :<pincode>
  connect            :<address>
  discovery          :<value: on, off> [length: 1-48] [mode: limited]
  iscan              :<value: on, off>
  l2cap-register     :<psm>
  oob                :
  pscan              :value: on, off
  sdp-find           :<HFPAG>
  rfcomm-register    :<channel>
  rfcomm-connect     :<channel>
  rfcomm-send        :<number of packets>
  rfcomm-disconnect  :[none]

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-10-01 11:10:46 +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
Luiz Augusto von Dentz 8c02af73be Bluetooth: shell: Add l2cap-recv command
This adds l2cap-recv which can be used to set a delay when confirming
the receptions of packets:

> l2cap-recv 1000
Incoming conn 0x00401c20
Channel 0x004220c8 connected
Channel 0x004220c8 requires buffer
Incoming data channel 0x004220c8 len 230
00000000 00 00 00 00 e6 00 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
00000010 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
00000020 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
00000030 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
00000040 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
00000050 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
00000060 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
00000070 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
00000080 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
00000090 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
000000a0 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
000000b0 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
000000c0 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
000000d0 7f 7f 7f 7f 7f 7f 7f 7f  7f 7f 7f 7f 7f 7f 7f 7f
000000e0 7f 7f 7f 7f 7f 7f
Delaying response...
Confirming reception

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-09-24 12:51:11 +03:00
Luiz Augusto von Dentz 3151d26572 Bluetooth: L2CAP: Add return to recv
This adds a int return to recv callback which can be used to notify the
stack about errors when receiving a packet. In addition to that the user
can return -EINPROGRESS to inform the stack the data will be processed
asynchronously which can be complete by calling
bt_l2cap_chan_recv_complete.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-09-24 12:51:11 +03:00
Krzysztof Chruscinski 527256501f shell: Rename shell to legacy_shell
New shell implementation is on the way. For now old one and all
references are kept to be gradually replaced by new shell.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-19 09:30:29 -04:00
Joakim Andersson 9c2214e2a3 Bluetooth: shell: Add shell command set channel map
Add a new command in the shell which can be used to set the channel
map by specifying a 37 bit bitmask written as a five byte hex array.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2018-09-19 15:51:57 +03:00
Mariusz Skamra 323243d376 Bluetooth: Add a shell command to disable bondable mode
This adds a shell command for qualification purposes to enable/disable
Bonding flag in Authentication Requirements.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2018-09-19 10:48:39 +03:00
Luiz Augusto von Dentz f67d45609e Bluetooth: shell: Fix requiring UUID for gatt-discover
This enables using these commands to perform discover all procedure:

> gatt-discover-primary
 Discover pending
 Service 1800 found: start handle 1, end_handle 5
 Service 1801 found: start handle 6, end_handle 9

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-09-19 09:23:08 +03:00
Flavio Ceolin da49f2e440 coccicnelle: Ignore return of memset
The return of memset is never checked. This patch explicitly ignore
the return to avoid MISRA-C violations.

The only directory excluded directory was ext/* since it contains
only imported code.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-14 16:55:37 -04:00
Kamil Piszczek 3e8f118d8f Bluetooth: shell: adding command for directed advertising
Added a new command, which can be used to test the directed advertising
API. This command allows user to turn on directed advertising in two
modes: low and high duty. High duty mode is the default one.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2018-09-13 14:21:21 +02:00
Johan Hedberg 61ec51251e Bluetooth: shell: Add id-delete command
Add a command to test the new bt_id_delete() API.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-08-13 19:53:22 +03: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
Johan Hedberg 5708f1e8b1 Bluetooth: Add infrastructure to handle multiple identities
Make it possible to have multiple identity addresses as an LE
peripheral. For central role only the default identity is supported
for now. This also extends the flash storage in a backward compatible
way.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-08-13 19:53:22 +03:00
Johan Hedberg 0ab27e6803 Bluetooth: shell: Add support for pairing confirm-only callbacks
Add a callback struct with only the pairing_confirm authentication
method. This is useful both for just-works testing as well as the
recently added fixed passkey support.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-08-01 16:13:21 +03:00
Johan Hedberg e504aad28f Bluetooth: shell: Add pairing failed/complete callbacks
Add support for the recently added pairing failed/complete callbacks.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-08-01 16:13:21 +03: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 8780636ff8 Bluetooth: shell: Add hci-cmd command
hci-cmd can be used to inject an arbritrary HCI command which can be
useful when testing vendor/new commands.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-07-27 19:36:11 +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
Luiz Augusto von Dentz d1c4ce8741 Bluetooth: shell: Make use of BT_LE_ADV_OPT_USE_NAME
Use BT_LE_ADV_OPT_USE_NAME whenver possible since it does properly
track updates.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-07-23 14:45:58 +03:00
Ulf Magnusson 1073882998 subsys: kconfig: Remove 'default n' properties and clean up a bit
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.

Remove some 'default ""' properties on string symbols too.

Also make definitions more consistent by converting some

  config FOO
  	<type>
  	prompt "foo"

definitions to a shorter form:

  config FOO
  	<type> "foo"

This shorthand works for int/hex/string symbols too, not just for bool
symbols.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-12 23:13:22 -04:00
Johan Hedberg d41d9bd112 Bluetooth: Convert sample code to use the new bt_data_parse() API
Convert the shell and central_hr sample apps to use the newly
introduced bt_data_parse() API.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-06-26 19:34:57 +03:00
Luiz Augusto von Dentz 1b038f2941 Bluetooth: GATT: Make BT_GATT_CHARACTERISTIC declare its value
This ensures the every characteristic has a value attribute declared
with the same UUID since the old macro did not declare the value the
application would normally have to declare one itself using a different
UUID which is not allowed.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-05-14 18:51:22 +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
Johan Hedberg d22b7c9f2d Bluetooth: Remove bt_storage API
The same functionality is now supported by the settings-based
solution, so remove bt_storage out of the way. There were stubs in
bt_storage to handle per-peer information (e.g. pairing keys) but this
was never actually implemented in full. The next step is to add this
support to the settings-based solution.

Leave the code for generating temporary IRK and identity address in
case BT_SETTINGS is not enabled. Also leave the code for using vendor
HCI to read the identity address, in which case the settings
implementation will not touch it.

Introduce a new bt_unpair() API to replace the removed
bt_storage_clear(), since the latter was actually doing more than just
storage management: it was also handling runtime storage of pairing
information. Later, the bt_unpair() implementation will be extended to
clear settings-based pairing storage.

There is one feature that the bt shell module looses: the ability to
give a specific identity address to the "init" command as a parameter.
We might look later in the future if this is really needed, and add a
separate API for this.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-05-04 17:26:05 -04:00
Johan Hedberg ac133268a5 Bluetooth: Remove 'own_addr' from advertising parameters
This was originally added as a work-around to avoid the heavy stack
consumption of the TinyCrypt PRNG when generating NRPAs. This is
no-longer an issue, and there are in fact no (in-tree) users of this.
Remove it before it gains any wider users, since it was in many ways a
hack/work-around to begin with.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-03-21 18:11:49 +02:00
Carles Cufi 8aa9a37902 drivers: flash: nrf: Rename nrf5 to nrf
With upcoming ICs that are not in the nRF5x family, rename the flash
driver and all its dependencies from nrf5 to nrf.

Should also fix the issue introduced by f49150cab6 which broke the
assignment of the flash device due to a partial rename.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-20 20:07:09 +01:00
Carles Cufi f49150cab6 arch: arm: nrf: Rename nrf5 SoC Family to nrf
Upcoming Nordic ICs that share many of the peripherals and architecture
with the currently supported nRF5x ones are no longer part of the nRF5
family. In order to accomodate that, rename the SoC family from nrf5 to
nrf, so that it can contain all of the members of the wider Nordic
family.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-20 11:57:14 +01:00
Vinayak Kariappa Chettimada 4c123a5162 Bluetooth: controller: Refactor ticker integration into hal
Refactor ticker execution context dependency out into HAL
folder. This decouples ticker from mayfly, enabling porting
towards a more tasklet (if and when kernel gets the support)
style execution contexts type implementation support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-02-13 13:26:37 +01:00
Luiz Augusto von Dentz 800bfaf9a7 Bluetooth: UUID: Remove macros defining 16 bit values
Application should normally declare a bt_uuid with proper type and then
use bt_uuid_cmp.

Fixes #5162

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2018-02-13 13:33:48 +02:00
Johan Hedberg 8fc4c99496 Bluetooth: Remove redundant AD parsing check
A few lines earlier the code bails out in case len is 0. Checking for
buf->len < 1 is the same as checking for buf->len == 0. Since len is
guaranteed to be > 0 here the check len > buf->len implicitly checks
for buf->len == 0, i.e. the second test can be removed.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-01-31 07:01:10 -08:00
Kumar Gala 26e4da52cf arm: nordic: flash: Use FLASH_DEV_NAME define
We want to move to use a common FLASH_DEV_NAME across the various flash
drivers. So samples, tests, or other code can be a bit more generic.  So
replace CONFIG_SOC_FLASH_NRF5_DEV_NAME with FLASH_DEV_NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 15:23:00 -06:00
Vinayak Kariappa Chettimada 5f4a7ea119 Bluetooth: shell: Support a non-connectable build
Add conditional compilation and move code to support
building a non-connectable Bluetooth shell application.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2018-01-25 10:51:54 +02:00
Vinayak Kariappa Chettimada e00282af6e Bluetooth: Fix build failure with -Wshadow CFLAGS
Fixes many instances of errors similar to below:
zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:5927:22:
    error: declaration of ‘s_link’ shadows a previous
        local [-Werror=shadow]
  static memq_link_t s_link;
                     ^~~~~~
zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:5905:21:
    note: shadowed declaration is here
  static memq_link_t s_link;
                     ^~~~~~

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-12-20 12:29:52 -05:00
Anas Nashif 429c2a4d9d kconfig: fix help syntax and add spaces
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-13 17:43:28 -06:00
Vinayak Kariappa Chettimada b022f72cf4 Bluetooth: shell: Fix compile error due to missing memq.h include
Fixes the following compile error when building
tests/bluetooth/shell application:

In file included from subsys/bluetooth/shell/ticker.c:16:0:
subsys/bluetooth/shell/../controller/util/mayfly.h:21:2:
error: unknown type name 'memq_link_t'
  memq_link_t *_link;
  ^~~~~~~~~~~

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-11-27 13:48:24 -08:00
Sebastian Bøe 0829ddfe9a kbuild: Removed KBuild
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Vinayak Kariappa Chettimada 6831351799 Bluetooth: shell: Add controller DTM commands
Add controller Direct Test Mode commands to bt shell module.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-09-29 20:56:11 +02:00
Paul Sokolovsky 0592c0ce59 Bluetooth: shell: gatt_read: Reset offset to 0
Unless offset was specified, it should default to 0, whereas
previously, value from the last command was used.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-08-15 21:16:40 +03:00
Carles Cufi d5c13a7530 Bluetooth: controller: Rename Kconfig prefix
Rename the BT_CONTROLLER prefix used in all of the Kconfig variables
related to the Bluetooth controller to BT_CTLR.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-08-14 15:44:56 +03:00
Johan Hedberg 2975ca0754 Bluetooth: Kconfig: Rename CONFIG_BLUETOOTH_* to CONFIG_BT_*
The API name space for Bluetooth is bt_* and BT_* so it makes sense to
align the Kconfig name space with this. The additional benefit is that
this also makes the names shorter. It is also in line with what Linux
uses for Bluetooth Kconfig entries.

Some Bluetooth-related Networking Kconfig defines are renamed as well
in order to be consistent, such as NET_L2_BLUETOOTH.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-08-09 11:14:19 +03:00
Luiz Augusto von Dentz a864436559 Bluetooth: Shell: Add second vendor service
This adds a second vendor service testing if service changed indications
works with more than one change in a row and as a bonus it implements
echo attribute which notifies any data that is written to it:

> ACL Data TX: Handle 3585 flags 0x00 dlen 9
      ATT: Write Command (0x52) len 4
        Handle: 0x0013
          Data: 0000
< ACL Data RX: Handle 3585 flags 0x02 dlen 9
      ATT: Handle Value Notification (0x1b) len 4
        Handle: 0x0013
          Data: 0000

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-07-11 08:22:22 +03:00
Luiz Augusto von Dentz 17b340cc13 Bluetooth: Shell: Implement support for gatt-metrics off
With introduction of bt_gatt_service_unregister it is now possible to
unregister service at runtime.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-07-11 08:22:22 +03:00
Vinayak Kariappa Chettimada ed85dea358 Bluetooth: shell: Fix compile warnings when CONFIG_DEBUG=y
Fixed uninitialised auto variables, that had caused compile
errors under CONFIG_DEBUG=y.

Jira: Zep-2334

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-06-29 07:43:54 +03:00
Johan Hedberg 4040610244 Bluetooth: shell: Fix incorrect #define
This should have been upper case and not lower case.

Fixes: ZEP-2322

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-06-28 09:52:26 -04:00
Andrzej Puzdrowski 9f964ba8d3 bluetooth: shell: add module for testing NRF5x flash driver
Intention is to test flash driver along with BLE radio.
Added flash shell module with commands for erase, write-check, read and
co-operation with radio stress test.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2017-06-28 12:29:50 +02:00
Luiz Augusto von Dentz a6b37b072b Bluetooth: GATT: Rename bt_gatt_unregister_service
Rename bt_gatt_unregister_service to bt_gatt_service_unregister to be
consistent with other APIs such as bt_gatt_service_register.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-06-20 15:32:16 +03:00
Luiz Augusto von Dentz 272b3a5c99 Bluetooth: Shell: Add gatt-show-db command
gatt-show-db shows the current set of attributes available in the GATT
database:

bt> gatt-show-db
attr 0x0011ce80 handle 0x0001 uuid 2800 perm 0x01
attr 0x0011ce94 handle 0x0002 uuid 2803 perm 0x01
attr 0x0011cea8 handle 0x0003 uuid 2a00 perm 0x01
attr 0x0011cebc handle 0x0004 uuid 2803 perm 0x01
attr 0x0011ced0 handle 0x0005 uuid 2a01 perm 0x01
attr 0x0011cde0 handle 0x0006 uuid 2800 perm 0x01
attr 0x0011cdf4 handle 0x0007 uuid 2803 perm 0x01
attr 0x0011ce08 handle 0x0008 uuid 2a05 perm 0x00
attr 0x0011ce1c handle 0x0009 uuid 2902 perm 0x03
attr 0x0011c9a0 handle 0x000a uuid 2800 perm 0x01
attr 0x0011c9b4 handle 0x000b uuid 2803 perm 0x01

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-06-15 21:53:00 +03:00
Luiz Augusto von Dentz 01eeb5ea0b Bluetooth: Shell: Add gatt-unregister-service command
gatt-unregister-service can be used to remove the test service at
runtime causing service changed to be indicated:

00:1b:dc:07:31:88 (public)> gatt-unregister-service
[bt] [DBG] gatt_indicate: (0x0011e100) conn 0x0011d880 handle 0x0008
[bt] [DBG] bt_att_req_send: (0x0011e100) conn 0x0011d880 req 0x0011db00
[bt] [DBG] att_send_req: (0x0011e100) req 0x0011db00
Unregistering test vendor service

< ACL Data TX: Handle 3585 flags 0x00 dlen 11
      ATT: Handle Value Indication (0x1d) len 6
        Handle: 0x0008
          Data: 0a001000
> ACL Data RX: Handle 3585 flags 0x02 dlen 5
      ATT: Handle Value Confirmation (0x1e) len 0

Jira: ZEP-2225
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-06-15 21:53:00 +03:00
Luiz Augusto von Dentz 79af35991b Bluetooth: GATT: Add bt_gatt_register_service
This adds bt_gatt_register_service using bt_gatt_service which contains
the attribute array that is then added to the database saving a pointer
in each and every attribute declared.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-06-15 21:53:00 +03:00
Vinayak Kariappa Chettimada 8877348aec Bluetooth: shell: Fix compile error with LL cmds included
Fixed compile error due to the missing header file
dependency on bluetooth/hci.h, for bt_addr_le_t, in the
Link Layer header file.

Merge of PR #475 introduced the new dependency that broke
compilation after merge of #474.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-06-14 22:12:40 +02:00
Vinayak Kariappa Chettimada dc11c9c315 Bluetooth: shell: Add Extended Scan command
Add shell scanx command to start Extended Scanning on 1M or
Coded PHY.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-06-14 18:40:40 +03:00
Vinayak Kariappa Chettimada 128a0613cd Bluetooth: shell: Add LE Adv. Ext. advx command
Add Bluetooth Link Layer LE Advertising Extensions commands
for manual testing the feature during development. First one
being advx command to start non-connectable non-scannable
extended advertising.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-06-14 18:40:40 +03:00
Vinayak Kariappa Chettimada 0998cdfba1 Bluetooth: shell: gatt-write-without-response with repeat
Add a repeat param to gatt-write-without-response so that
it covers what gatt-write-without-response-repeated was
doing. gatt-write-without-response was removed in the
commit 26eae70da.

gatt-write-signed too will have repeat param with this
change.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-06-04 09:34:08 +03:00
Vinayak Kariappa Chettimada a3cba8bb90 Bluetooth: shell: Add controller's ticker shell module
Added shell module for the Bluetooth Controller's ticker
interfaces.

For now, info command enumerates active tickers' details.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-06-01 12:32:47 +03:00
Luiz Augusto von Dentz da86ae0cb6 Bluetooth: Shell: Rework gatt-write-signed
This makes gatt-write-signed to reuse cmd_gatt_write_without_rsp since
it is quite similar and that adds the ability to send multiple octecs
instead of just a single byte.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-30 16:39:05 +03:00
Luiz Augusto von Dentz a5aa904f90 Bluetooth: Shell: Fix help of gatt-write-signed
gatt-write-signed does not have an offset parameter.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-30 16:39:05 +03:00
Luiz Augusto von Dentz 26eae70da2 Bluetooth: Shell: Remove gatt-write-without-response-repeated
This removes gatt-write-without-response-repeated and makes
gatt-write-without-response similar to gatt-write which was the
intention of gatt-write-without-response-repeated.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-30 16:39:05 +03:00
Luiz Augusto von Dentz 6107f61d8c Bluetooth: Shell: Fix help of gatt-write-without-response
gatt-write-without-response does not have an offset parameter.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-30 16:39:05 +03:00
Luiz Augusto von Dentz 6abccb6d40 Bluetooth: Shell: Split GATT command to its own file
This makes it simpler to organize the GATT command implementation.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-30 16:39:05 +03:00
Luiz Augusto von Dentz 54d917f767 Bluetooth: Shell: Add shell subdir if CONFIG_BLUETOOTH_SHELL=y
All the files under shell subdir shall only be build if
CONFIG_BLUETOOTH_SHELL is selected.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-30 16:39:05 +03:00
Luiz Augusto von Dentz 7b9013140d Bluetooth: GATT: Fix not queuing writes to CCC
In order to properly queue request there need to be a bt_att_req
storage but none of the calls to gatt_write_ccc were using the params
causing gatt_send to use bt_att_send and not bt_att_req_send.

To fix this now all the callers of gatt_write_ccc do set the params
properly but this means that bt_gatt_unsubscribe has to wait for it
to be completed before the application can reuse the
bt_gatt_subscribe_params.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-30 14:34:11 +03:00
Vinayak Kariappa Chettimada fe3aeebcfa Bluetooth: shell: Fix scan on to use active scanning
Both scan on and scan passive performed passive scanning,
fixed scan on command to use active scanning.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-05-29 18:21:36 +03:00
Luiz Augusto von Dentz 737a9dc306 Shell: bt: Use SHELL_REGISTER_WITH_PROMPT
This replaces the use of shell_register_prompt_handler with
SHELL_REGISTER_WITH_PROMPT which doesn't overwrite other modules
prompt.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-29 10:42:21 +03:00
Luiz Augusto von Dentz 12d1b2aa32 Shell: bt: Fix build without CONFIG_BLUETOOTH_GATT_CLIENT
If CONFIG_BLUETOOTH_GATT_CLIENT is not defined disable command that
would depend on it.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-29 10:42:21 +03:00
Luiz Augusto von Dentz a6f75bebc7 Shell: bt: Add command supported by btshell
This adds existing commands support by btshell test application to bt
module.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-29 10:42:21 +03:00
Luiz Augusto von Dentz 1c4561925c Shell: Add initial code for bt shell module
This adds the config option and files of the bt shell module.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-05-29 10:42:21 +03:00