Enable connection encryption setup in 3 connection
intervals. Peripheral will respond to Encryption Request
with Encryption Response in the same connection interval,
and also, will respond with Start Encryption Response PDU in
the 3rd connection interval, hence completing encryption
setup in 3 connection intervals. Encrypted data would be
transmitted as fast as in 3rd connection interval from the
connection establishment. Maximum CPU time in Radio ISR will
increase if this feature is selected.
Change-id: I16f2863fc2aaed624826505739519d4de1ac44c5
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Add Kconfig configuration to select Tx buffer size, this
value will be returned in the HCI LE Read Buffer Size
command response.
This configuration will allow lower Tx RAM usage when
larger PDU sizes are desired in Rx direction only.
Change-Id: I5106a448d78a0754c4b0f6fa61fd5dcacd87a67c
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Add Kconfig configuration and conditional compilation of
RSSI measurement during a connection.
Change-id: I5a2f23f76a7cbbd9569d53d31899a472bf39d3ee
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Add Kconfig configuration to conditionally enable Data
Length Update procedure support in the Controller.
This will save CPU time, flash and RAM, if this feature is
not desired.
Change-id: I4515c0c7cf9aeb333a289397ae3c9bac04a08e4e
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Add additional conditional compilation of code not needed
when LE Ping is disabled in Kconfig.
Change-id: Idab40b1371488e06a6f2009fb553f7655b7b86f3
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Adds initial handling of SDP Service Search Attribute response PDU.
Currently attributes data are not collected. Main focus was done on
proper handling PDU continuation state to be able receive whole
requested SDP record(s) if found for given UUID.
< ACL Data TX: Handle 74 flags 0x00 dlen 24
Channel: 64 len 20 [PSM 1 mode 0] {chan 3}
SDP: Service Search Attribute Request (0x06) tid 1 len 15
Search pattern: [len 5]
Sequence (6) with 3 bytes [8 extra bits] len 5
UUID (3) with 2 bytes [0 extra bits] len 3
OBEX Object Push (0x1105)
Max record count: 65535
Attribute list: [len 7]
Sequence (6) with 5 bytes [8 extra bits] len 7
Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
0x0000ffff
Continuation state: 0
> HCI Event: Number of Completed Packets (0x13) plen 5
Num handles: 1
Handle: 74
Count: 1
> ACL Data RX: Handle 74 flags 0x02 dlen 68
Channel: 64 len 64 [PSM 1 mode 0] {chan 3}
SDP: Service Search Attribute Response (0x07) tid 1 len 59
Attribute bytes: 48
Continuation state: 8
cd 91 5a 58 30 00 00 00 ..ZX0...
< HCI Command: Host Number of Completed Packets (0x03|0x0035) plen 5
Num handles: 1
Handle: 74
Count: 1
< ACL Data TX: Handle 74 flags 0x00 dlen 32
Channel: 64 len 28 [PSM 1 mode 0] {chan 3}
SDP: Service Search Attribute Request (0x06) tid 2 len 23
Search pattern: [len 5]
Sequence (6) with 3 bytes [8 extra bits] len 5
UUID (3) with 2 bytes [0 extra bits] len 3
OBEX Object Push (0x1105)
Max record count: 65535
Attribute list: [len 7]
Sequence (6) with 5 bytes [8 extra bits] len 7
Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
0x0000ffff
Continuation state: 8
cd 91 5a 58 30 00 00 00 ..ZX0...
> HCI Event: Number of Completed Packets (0x13) plen 5
Num handles: 1
Handle: 74
Count: 1
> ACL Data RX: Handle 74 flags 0x02 dlen 68
Channel: 64 len 64 [PSM 1 mode 0] {chan 3}
SDP: Service Search Attribute Response (0x07) tid 2 len 59
Attribute bytes: 48
Continuation state: 8
cd 91 5a 58 60 00 00 00 ..ZX`...
< HCI Command: Host Number of Completed Packets (0x03|0x0035) plen 5
Num handles: 1
Handle: 74
Count: 1
< ACL Data TX: Handle 74 flags 0x00 dlen 32
Channel: 64 len 28 [PSM 1 mode 0] {chan 3}
SDP: Service Search Attribute Request (0x06) tid 3 len 23
Search pattern: [len 5]
Sequence (6) with 3 bytes [8 extra bits] len 5
UUID (3) with 2 bytes [0 extra bits] len 3
OBEX Object Push (0x1105)
Max record count: 65535
Attribute list: [len 7]
Sequence (6) with 5 bytes [8 extra bits] len 7
Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
0x0000ffff
Continuation state: 8
cd 91 5a 58 60 00 00 00 ..ZX`...
> HCI Event: Number of Completed Packets (0x13) plen 5
Num handles: 1
Handle: 74
Count: 1
> ACL Data RX: Handle 74 flags 0x02 dlen 19
Channel: 64 len 15 [PSM 1 mode 0] {chan 3}
SDP: Service Search Attribute Response (0x07) tid 3 len 10
Attribute bytes: 7
Continuation state: 0
Combined attribute bytes: 103
Attribute list: [len 99] {position 0}
Attribute: Service Record Handle (0x0000) [len 2]
0x00010001
Attribute: Service Class ID List (0x0001) [len 2]
UUID (3) with 2 bytes [0 extra bits] len 3
OBEX Object Push (0x1105)
Attribute: Protocol Descriptor List (0x0004) [len 2]
Sequence (6) with 3 bytes [8 extra bits] len 5
UUID (3) with 2 bytes [0 extra bits] len 3
L2CAP (0x0100)
Sequence (6) with 5 bytes [8 extra bits] len 7
UUID (3) with 2 bytes [0 extra bits] len 3
RFCOMM (0x0003)
Unsigned Integer (1) with 1 byte [0 extra bits] len 2
0x09
Sequence (6) with 3 bytes [8 extra bits] len 5
UUID (3) with 2 bytes [0 extra bits] len 3
OBEX (0x0008)
Attribute: Browse Group List (0x0005) [len 2]
UUID (3) with 2 bytes [0 extra bits] len 3
Public Browse Root (0x1002)
Attribute: Bluetooth Profile Descriptor List (0x0009) [len 2]
Sequence (6) with 6 bytes [8 extra bits] len 8
UUID (3) with 2 bytes [0 extra bits] len 3
OBEX Object Push (0x1105)
Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
0x0100
Attribute: Unknown (0x0100) [len 2]
OBEX Object Push [len 16]
Attribute: Unknown (0x0303) [len 2]
Unsigned Integer (1) with 1 byte [0 extra bits] len 2
0x01
Unsigned Integer (1) with 1 byte [0 extra bits] len 2
0x02
Unsigned Integer (1) with 1 byte [0 extra bits] len 2
0x03
Unsigned Integer (1) with 1 byte [0 extra bits] len 2
0x04
Unsigned Integer (1) with 1 byte [0 extra bits] len 2
0x05
Unsigned Integer (1) with 1 byte [0 extra bits] len 2
0x06
Unsigned Integer (1) with 1 byte [0 extra bits] len 2
0xff
Jira: ZEP-1112
Change-Id: Ie282782fba6ef06c6826b3e624f83c8f4c94ebbe
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
The following readings were obtained after running the peripheral and
central_hr apps in qemu combined with the controller (hci_uart) on nRF51
and nRF52:
Main Stack 380
Idle Stack: 68
ISR stack: 532
Controller RX Stack: 388
HCI TX Stack: 516
The numbers set in this change provide a safety margin from the ones
measured empirically.
Change-id: Ice7ad7f081502e0ea1accf856a7937c0bf0783b2
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
reserve parameter of bt_l2cap_create_pdu() is incorrectly passed
as timeout.
Change-Id: Ieed293f52c2e98f16f1e43c498140178703236db
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
This port ipsp sample to use the native stack so it can be used once
again.
Change-Id: I7975b017b0aa5bd81a1701692ec81527e39d4701
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
HCI ECC commands are causing freezes in the controller build. Until
further investigation is done disable them to avoid issues when running
the controller standalone.
Change-id: Ifab0fa362348b72e88adaa5250c914770e4a70ba
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
For consistency with RX_STACK_SIZE and the rest of stack sizes, rename
to use the normal naming scheme.
Change-id: Ib8d484482466fa8d629e6329e07b927abdd6f598
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add Kconfig configuration to conditionally enable LE Ping
feature in the Controller.
This will save CPU time, flash and RAM, if this feature is
not desired.
Change-id: I5fbbdbe8f45ac01c9b0d7b11e002a0d1db4d272e
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
The data pointer and length was not updated before invoking the
write_rsp function therefore providing pointer to the handle.
Change-Id: I5c27ab7a793979dffb8f1f2c68def027c45f2376
Signed-off-by: Louis Caron <louis.caron@intel.com>
Add a test configuration to build a controller that
supports only Bluetooth v4.0 features.
This is copy of prj_controller.conf, but Kconfig defines
will be added in subsequent commits to conditionally
compile out feature not in Bluetooth v4.0 specification.
Also, added nrf52840_pca10056 and arduino_101_ble board
builds be tested.
Change-id: I36891bfc54cc36a8588c9b019de582e3193e8aa3
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This should also have been net_buf_add_mem(). Otherwise the buffer
gets corrupted.
Change-Id: I4687584777f446d398182c3e8c2cde5946987da4
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Move code that can be executed after radio tx/rx packet ptr
has been assigned in the radio h/w.
Change-id: I9c5a34ee6bb74c1265d7871bcdf93894e3e7b190
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Added code to profile radio ISR execution time and generate
an event, which can be used to populate a vendor HCI event.
This event and associated code is disabled, subsequent
patch will add kconfig to enable it.
Change-id: Ic3fa3e0f4e36829a22a25ffee039949eaae561a7
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Use BT_WARN instead of BT_ASSERT to display unknown rsp in
HCI layer.
Change-id: I63c792468d9c4768f69df73395ee026a03521704
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Peer controllers not supporting LE Ping feature will
respond with unknown response PDU, handle it internally in
the controller rather than exposing it to HCI layer.
Discovered that controller was passing the unknown rsp PDU
to HCI layer when LE Ping was send to Nexus 5.
Unknown response for slave feature request was forwarded to
HCI layer, during that implementation unknown rsp for LE
ping too was getting forwarded to HCI layer.
Change-id: I4396c482e5546d78239cf41d88728de996e48d7d
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This call was supposed to be net_buf_add_mem().
Change-Id: I5e4a718474905c433533fd1c1d7e8e0b7ff35739
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This helps simplify code that was previously combining net_buf_add()
with memcpy().
Change-Id: If44cf9cd651aba5e544e36567869f147468663eb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When running a reduced set of tests with --platform-limit or using the
default of 1 we build the configuration (make initconfig) for all
platforms, although we are only interested in a limited set. On my
machine this is 100s of build time for configurations we are never going
to use.
This reduces the number of builds to what we really need and speeds up
sanitycheck runtime overall.
Might need a few more optimisations.
Change-Id: I813fabf1453f19ce7a83b28e4792b5c80616d936
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Stack for fiber idtSpurFiber at tests/legacy/kernel/test_static_idt
for nanokernel is not big enough since printk parse context refactor
(commit 3ab6046), causing sanity check to fail with CONFIG_DEBUG=y.
Change-Id: Iddc74a2800163a22be985067ce828ac859ae4a24
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
Various changes required by new SDK 0.9:
1. Renamed toolchain vendor name ("poky" -> "zephyr")
2. Toolchains now 64 bit, previously 32 bit
3. New toolchain for Xtensa
4. New toolchain for RISC-V
0.8.2 is still supported.
Change-Id: Icfd4cc44ef643da0f3840b33d6dfc4b3c99dfa9a
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This option has side effects. It also tells the compiler not to generate
these checks in the first place. The checks call abort() which doesn't
exist in our environment.
This patch gets rid of linker errors due to missing abort() in the 0.9 SDK.
Change-Id: Ibc5aeb5458d0bded714c9c074cdf08112733428b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The Cortex-M0(+) and in general processors that support only the ARMv6-M
instruction set have a reduced set of registers and fields compared to
the ARMv7-M compliant processors.
This change goes through all core registers and disables or removes
everything that is not part of the ARMv6-M architecture when compiling
for Cortex-M0.
Jira: ZEP-1497
Change-id: I13e2637bb730e69d02f2a5ee687038dc69ad28a8
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The Cortex-M0(+) and in general processors that support only the ARMv6-M
instruction set can only access the NVIC_IPRn registers with word
accesses, and not with byte ones like the Cortex-M3 and onwards. This
patch addresses the issue by modifying the way that _NvicIrqPrioSet()
writes to the IPRn register, using a word access for Cortex-M0(+).
A similar issue is addressed for internal exceptions, this time for the
SHPR registers that are accessed differently on ARMv6-M.
Reference code taken from CMSIS.
Jira: ZEP-1497
Change-id: I08e1bf60b3b70579b42f4ab926ee835c18bb65bb
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Since the value is treated as uint8_t internally anyway, just use
uint8_t for the input and output parameter types.
Jira: ZEP-1497
Change-Id: I61d68eb39cba5d82dad6ab7593b267c26e003d2b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
By default, when a 'fatal fault' message is seen in the output of any
testcase, it is consider an inmediate fatal condition and the test
case is aborted.
However, this testcase is provoking the situation to verify the
condition is caught. This, it shall NOT be considered a fatal fault
and the default overriden to allow it to proceed.
This was done in the legacy testcases and now is moved to this
testcase, ported from legacy.
Change-Id: Icac6cf55cae2ffd9b071e9dd1f35918b7b30de5e
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Stack for task tStartTask at tests/legacy/kernel/test_sema/microkernel
is not big enough since unfied kernel was enabled by default for all
test (since commit c2de216).
Change-Id: I3332cd5e14ca384428834697a1841fa680a68b00
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
Fix build error (picked by GCC 6.x):
error: ‘stack_size’ defined but not used [-Werror=unused-const-variable=]
Change-Id: I402324fedaea9d0a10ee6533ba957ce18fa0fb83
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Currently CI plays tricks with `tee` to capture the output and post
process it. This makes it more complex to handle and easier for it to
fail in ways it should not.
So add a simple log capture option sanity check that mirrors the
stdout output, removing color encoding for errors.
Change-Id: I6de0b6cfe4da9c289f537979545dddbcd49cf834
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
To customise test builds and support test related features such as time
stamps and a boot banner, introduce a Makefile variant that is dedicated
to testing.
Initially we introduce a new config overlay that is used for all tests, in
this case we enable BOOT_BANNER and BUILD_TIMESTAMP. This will print the
current version and the date, useful when reporting bugs and also an
indicator that the system has booted before the test has started.
For example:
[QEMU] CPU: qemu32
***** BOOTING ZEPHYR OS v1.6.99 - BUILD: Dec 21 2016 19:57:13 *****
tc_start() - Test Nanokernel CPU and thread routines
Initializing nanokernel objects
...
..
Change-Id: I224318cdeb55a301964ea366dbc577e2e3a09175
Signed-off-by: Anas Nashif <anas.nashif@intel.com>