This adds peripheral sample application that is configured
in LE SC Only Mode. It tries to set security level to FIPS right
after connection is created. Two paired devices are supported.
Change-Id: I78f3e3eeaf552c52f982035168e967016858a00b
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This patch introduce new Kconfig option that is used to indicate if
device should operate in Secure Connection Only Mode. Enabling this
option removes support for LE Legacy Pairing.
Change-Id: If224b6786f4c840959fe87a31f0224bc1e21f90e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
We can calculate the length with strlen() and there should be no need
to consider anything else except nul-terminated C strings.
Change-Id: I02ec4b1dddbb1bd457f035926c86b27f4c2ab050
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Enables generate link key notification event when legacy PIN code
pairing is done well and give possibility to grab the link key for
later connections.
Change-Id: I5e661c203bbebfa8aa931662a479a1b921f7ace9
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
When PIN code authentication is requested now there's a way
for user to respond with negative reply.
Change-Id: I800bf535f6ae98ee367393c686d6897f50b5fe8b
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Instead of a switch statement use an if statement which is more
compact and readable.
Change-Id: Ie2cd703eef582b129d81331b4bbcee5e0eba2479
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Those applications don't require active scan to be performed.
Change-Id: I7c4b52ab8aaa700ab4fea4e2b19a66d182f799b6
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This allows to conveniently start passive scan from central
applications.
Change-Id: Idf470be747ab7c6e7413cc368227b0b69e7b78a4
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
When the BLE GAP service needs to declare the preferred connection
parameters.
Change-Id: Iff8a6f68f2dfe478c44dcc5a3e95abda271ecc00
Signed-off-by: Louis Caron <louis.caron@intel.com>
Included Services Found can be of type either Primary or Secondary.
Tester shall know the type of service discovered.
Change-Id: Ia78e0c76236bb0ce295a91c6617aa9eafdfcf60b
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This patch adds missing Type parameter in the Notification/Indication
Received event. This parameter specifies if the IUT received Notification
or Indication.
Change-Id: Ia9f4fbf6ede99c72d6c7bddb87f1aeb3b8b97600
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This patch adds extends BTP with commands to register for characteristic
value indications and notifications. These commands require CCC handle
parameter taken from PTS in the MMI.
Change-Id: Ie97c85c47590c0e29c5d8cb65cefe5f022f79f47
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
Using empty eui64 array resulted in net_set_mac() failure and
address was never set. This used to work only due to
linkaddr_node_addr being being global (and hence zeroed).
Change-Id: Ie21de35a628956c6221b6f1e4c96a1807a1d2804
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
There is no point in trying to connect non connectable device.
Change-Id: I1e3d8486db7cd7ca80f226ec3f4c36ab43f14a1a
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This application only connects and disconnects to found devices.
Change-Id: Ic4d5cde52da37a369aa0583ec774c4dd116c6c6e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Asynchronous functions use the parameters to store relevant data even
after the scope it has been called which means they have to remain valid
while the operations are in course.
Change-Id: I2cc79e5ce352fef4e077e9fb4cb0f4d111463d00
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes sure discovery UUID is a static variable so that it remain
valid once the scope changes.
Change-Id: Iaca9ab5d71f51e526dcd8439795e962bb359f9b2
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This introduces bt_uuid_copy which can be used to copy UUID values.
Change-Id: I22d996bcace454769ac871a43b9acebe8b23db39
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Using number_removed to find out how many packets from unack queue we
need to clear.
Change-Id: Icad948892f3ab1febc939e9ba6d6b3431973633e
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
We might get out of sync packet because of race collision, drop it.
Change-Id: Ic84a760199df1520dc7a95383972f9ec428c7fde
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Enables get basic connection info support for non-LE connections.
Change-Id: If295b552567886256cfc1e215bfe3149d2f1f60c
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Unmasks pin code request to be able service
pairing request from legacy 2.0 devices.
Change-Id: I5c09232d8e6e2c7673a35205e0bfeb8c8240388e
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Moves object handling user authentication callback interface exposed
in public API to hci core module and exports internally LE SMP
authentication handlers.
The stack authentication API methods call based on connection type
the correct internal methods. Currently only LE SMP backend
is implemented.
Make getting local io capa in runtime.
Change-Id: I17459096616a620467b4fa01c53fd4bc0b59af9b
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Gets included authentication API in BR/EDR variant
Change-Id: I4fa55bb3baa8db79f6e9f5f1c65c0d93f8f8780a
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
If GATT client is enabled but SMP is disabled NULL SMP backend
needs to provide bt_smp_sign stub.
LD zephyr.elf
net/built-in.o: In function `bt_att_send':
net/bluetooth/att.c:1747: undefined reference to `bt_smp_sign'
Makefile:757: recipe for target 'zephyr' failed
make[2]: *** [zephyr] Error 1
Change-Id: Ia740d6c7ca7d65b78f7ecb781275d1f4d635baf7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This fix a regression where incorrect confirm function was used
for legacy pairing.
Change-Id: Ia39aed6b8e9a3cb24b451cdb0219f41ceb5e6c6e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
The fragments we create should not be greater than the connection ACL
MTU (which the code already does correctly) but they can also not be
greater than the buffer has room for data. Fix this by taking the
minimum of the connection MTU and the buffer tail room.
Change-Id: I27462d7e8752773c632d212b28e53a8cf6519972
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The main purpose of sample app is testing H5 driver and catching
checkpatch build issues with H5 enabled.
Change-Id: Ia02cdcb38fc8f836de0e5f87b1afe428f7021673
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This adds very simple peripheral application that supports
Device Information Service only and doesn't support pairing.
Change-Id: Iaec1317a8894db11388408d3f65af8a38d1618c3
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This was not building due to bt_l2cap_create_pdu API change.
CC net/bluetooth/smp_null.o
net/bluetooth/smp_null.c: In function 'bt_smp_recv':
net/bluetooth/smp_null.c:59:2: warning: passing argument 1 of 'bt_l2cap_create_pdu' from incompatible pointer type [enabled by default]
buf = bt_l2cap_create_pdu(conn);
^
In file included from net/bluetooth/smp_null.c:32:0:
net/bluetooth/l2cap_internal.h:136:17: note: expected 'struct nano_fifo *' but argument is of type 'struct bt_conn *'
struct net_buf *bt_l2cap_create_pdu(struct nano_fifo *fifo);
Change-Id: I5fd8ce63da09af1c123b1092624d48edc009756b
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This patch adds document with current supported PICS for PTS 6.3.
Change-Id: Ib87d9432087225612b01d849eced6ad5c2064f0b
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This patch adds document with current supported PICS for PTS 6.3.
Change-Id: I1eb62d500fb8b1bb9ec9162f9b0196858fe22b0a
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
Analyze stack when sending single ACK packet.
Change-Id: Ifd3a54f0d1ad9a644363563fa9b8bea05b895fa9
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
If there is no packet to be sent after timeout we have to send ACK for
last received packet.
Change-Id: I30bbc4ae1a257f9a7351dc5a5d2f1269740ce447
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add initial code for three-wire (H5) Bluetooth uart driver.
At the moment the driver is EXPERIMENTAL. To test use following
method with qemu:
Run btproxy with three-wire emulation patches:
$ sudo tools/btproxy -d --pty -3
Opening pseudoterminal
New pts created: /dev/pts/21
Opening user channel for hci0
Notice that new device created: /dev/pts/21, use it with qemu -serial
parameter.
Run qemu target with following parameters:
$ make qemu 'QEMU_EXTRA_FLAGS=-serial /dev/pts/21'
Change-Id: I51579ffd8088583df9106689a03b2a0b4aa9e4cb
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
BT_STACK depends on BT_STACK_DEBUG_EXTRA, therefore moving it there.
It also allows to use BT_STACK in drivers, at the moment only
Bluetooth stack uses it.
Change-Id: I41e0e0d49dae6abef2dc3a8d1d109127787d3db0
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>