Commit graph

41120 commits

Author SHA1 Message Date
Joakim Andersson
1ef16e6d96 Bluetooth: shell: Update help text of bt init command
Update help text of `bt init` command which says address could be
provided. This feature was removed by:
d22b7c9f2d

As a replacement the `bt id-create` command can be used instead.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-26 17:51:18 +02:00
Wolfgang Puffitsch
c3ee7d26d1 manifest: EDTT: update manifest to point to new revision in EDTT
Update EDTT so ATT reads filter on the CID.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2020-02-26 15:03:51 +01:00
Dariusz Lisik
d4d7c947b9 tracing: fixes C++ compilation issue
When tracing_cpu_stats.h is included by C++ file it will not compile
and link correctly due to missing #ifdef __cplusplus directives
in the header file.

Fixes #23072

Signed-off-by: Dariusz Lisik <dariusz.lisik@hidglobal.com>
2020-02-26 14:13:22 +02:00
Morten Priess
41481f92f7 Bluetooth: controller: Prevent LLCP handling of must-expire events
When a must-expire ticker callback is executed, it is important not to
call the LLCP state machine, as the lazy state is unavailable. The code
must rely on the next proper event to call ull_conn_llcp with an updated
non-zero lazy count.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2020-02-26 09:20:58 +01:00
Martí Bolívar
90edd01644 doc: west: 'west installation' is now 'west workspace'
This nomenclature change was done in west 0.7 because it seems to be a
lot easier for people to understand. Propagate it to all the west
documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-25 23:08:02 +02:00
Martí Bolívar
c3ddea01f2 doc: west: update structure page
The main change is that west 0.7 is not a namespace package anymore.
Make some other improvements while here.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-25 23:08:02 +02:00
Martí Bolívar
62c5b3d198 doc: west: add examples for each topology
Add example west.yml files showing how to build west workspaces of
each type. Split these into separate sections as a result since
they're longer.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-25 23:08:02 +02:00
Johan Hedberg
03514c13b4 release: Zephyr 2.2.0-rc2
Bumped to v2.2.0-rc2

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-02-25 22:38:58 +02:00
Carles Cufi
e9a416f3cd Bluetooth: tester: Add missing log_strdup
Since we enable CONFIG_ASSERT in the tester app, the logging subsystem
will assert if it detects a missing log_strdup. Add the two missing ones
that I could find to properly log transient strings.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-25 22:29:29 +02:00
Andrei Gansari
a410486dca drivers: eth_mcux phy_setup moved after SMI init
SMI initialization is required to enable PHY communication.
PHY setups needs to run after SMI initialization.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-02-25 20:41:04 +02:00
Andries Kruithof
a8703b83f4 manifest: EDTT: update manifest to point to new revision in EDTT
For passing the EDTT tests pass/fail criteria needs to be updated,
which is done starting with the revision referenced in the updated
manifest

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2020-02-25 16:13:17 +01:00
Andries Kruithof
0ac4433a12 Bluetooth: controller: split: fix LL/CON/MAS/BV-74-C tx timing
Fix EBQ tests for the Max Tx Time and Max Rx Time parameter.

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>

Bluetooth: controller: split: fixed for endianness

Added conversion to correct endianness

Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
2020-02-25 16:13:17 +01:00
Vinayak Kariappa Chettimada
e0f51b29ef Bluetooth: controller: split: Fix assert on DLE procedure stall
Fix local initiated Data Length Update procedure from being
stalled when a remote initiates a procedure with instant.

Fixes #23069.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-02-25 15:14:31 +01:00
Joakim Andersson
09b89ef585 Bluetooth: samples: Unref conn object on create connection timeout
Handle connected callback with error status not releasing the default
conn object in central samples. This can happen when the initiator fails
to create the connection within 3 seconds and is canceled by the host.

Also restart the scan role in this case.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-25 14:12:04 +02:00
Joakim Andersson
ce99a5b8fc Bluetooth: samples: central_hr: Move connected callback
Move the connected callback down together with the disconnected
callback.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-25 14:12:04 +02:00
Joakim Andersson
1db7a11c3f Bluetooth: host: Document bt_conn_unref responsibility of caller
Document the need for the caller to call  bt_conn_unref on the
connection object returned from API functions.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-25 14:12:04 +02:00
Ioannis Glaropoulos
e489a59b4e doc: release notes: add missing ARM Board in v2.2 release notes
Adding Si Labs EFM32 Jake Gecko board in the v2.2 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-25 14:07:45 +02:00
Ioannis Glaropoulos
a062edd805 boards: arm: silabs_exx32: correct Kconfig option prompt
Fix a typo in the option prompt for Kconfig symbol
SOC_SERIES_EFM32GG11B.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-25 14:07:45 +02:00
Ioannis Glaropoulos
747391e705 doc: release notes: list of ARM SoCs added during v2.2 release cycle
This commit adds the list of ARM SoCs whose support was
added during the Zephyr v2.2 release cycle.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-25 14:07:45 +02:00
Armando Visconti
262f88e2c3 boards/shields: x_nucleo_iks01a1: connect irq to DRDY pin
The LIS3MDL driver handles DRDY interrupt only. So connect
trigger to the DRDY pin instead of the INT pin.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-25 11:40:17 +01:00
Armando Visconti
0ba94d6d78 driver/sensor: lis3mdl: Fix DRDY interrupt
The LIS3MDL sensor provides two different pins for handling
interrupts: the DRDY, that triggers new data sample availability,
and INT, that goes off when data sample exceeds a given threshold.

The driver handled data ready triggers only, which does not
require sensor configuration at all. Moreover a dummy read is
required when the data ready is configured to re-trigger a new
interrupt.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-02-25 11:40:17 +01:00
Ravi kumar Veeramally
36b92fb7e6 net: ppp: Fix integer handling coverity issue
Store the time difference value in u32_t variable than
abs() value in signed variable.

Fixes #22912
Coverity CID: 208406

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2020-02-25 11:26:06 +01:00
Martí Bolívar
e4479e2fec cmake: flash: three runners.yaml fixes
There are two problems with the way runners.yaml is being created:

1. The dictionary which contains the arguments for each runner is
   using the runner's name converted to a C identifier instead of the
   runner's name itself. That causes west flash to fail when the two
   are different, e.g. for 'misc-flasher' (runner name), which is
   different than 'misc_flasher' (runner name as C identifier)

2. We need to make sure that the dictionary key maps to an empty list
   if there are no arguments, which normally doesn't happen since the
   runner usually at least takes the path of the file to flash or debug.
   It does happen in the case of misc-flasher, though, since the whole
   point of that runner is that it's an escape hatch for people with
   out of tree scripts that nevertheless want 'west flash' integration
   for things like sanitycheck device testing.

3. A copy/paste error is setting the debug runner to the flash runner.

Fix them all.

Fixes: #23004
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-24 14:00:29 +02:00
Ioannis Glaropoulos
0d47d1e4ba doc: release notes: add list of ARM boards
In the 2.2 release notes add the list of ARM boards, whose
support was added during the 2.2 release cycle.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-24 13:46:58 +02:00
Carles Cufi
2b0e9a3d6e Bluetooth: tester: Implement the GAP_SET_MITM command
Implement the BTP command to set MITM, although on Zephyr this is not
configurable at runtime. Instead print a warning instructing to use the
CONFIG_BT_SMP_ENFORCE_MITM Kconfig option instead.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-23 21:46:22 +02:00
Carles Cufi
3c69dff9a3 Bluetooth: tester: Implement the GAP_PASSKEY_CONFIRM command
Implement the BTP GAP command and event for passkey confirmation.
This also allows us to set the passkey_confirm auth callback which
enables the keyboard/display IO capabilities.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-23 21:46:22 +02:00
Carles Cufi
c3f5677672 Bluetooth: tester: Implement the GAP_SET_BONDABLE command
Implement the BTP GAP command to set bondable on or off.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-23 21:46:22 +02:00
Carles Cufi
4a59e8da59 Bluetooth: tester: Disable forcing of MITM
Since some tests require MITM to be off, disable the option that forces
the MITM flag at all times.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-23 21:46:22 +02:00
Carles Cufi
6f8dd90a83 Bluetooth: tester: Ensure the app is bondable by default
Ensure the bondable Kconfig option is set unconditionally.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-23 21:46:22 +02:00
Carles Cufi
2b48a8f37b Bluetooth: tester: Fix packet field name
Correct the name of the boolean include in the set bondable
command so it reflects the spec.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-23 21:46:22 +02:00
Carles Cufi
5cbc3e0c6c Bluetooth: tester: Tweak nRF52840 config
Disable stack measurements by default, since they pollute the log
output.
Ensure that the logging thread has enough stack.
Ensure that the UART that connects to the BTP client is
interrupt-driven.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-23 21:46:22 +02:00
Carles Cufi
613e5f541f Bluetooth: tester: Update GATT cmds/evts to the latest BTP spec
Fill in all the missing GATT commands and events in the latest BTP
specification.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-22 19:15:04 +02:00
Joakim Andersson
58908aa5d0 Bluetooth: host: Fix missing connection id checks
Fix issue where a new connection with the same peer would use the CCC
from from first connection, despite different local identity.
Since there is no CCC for the new connection yet this caused the
application to think that CCC was enabled but the remote device had not
yet subscribed.

Fix this issue by making the id as an input to the peer address check
function. This will force us to make the check every time. This commit
might also fix similar issues not yes discovered as the ID check was
missing in a few other places as well.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-21 21:28:30 +02:00
Joakim Andersson
4e829eb544 Bluetooth: host: Rename acl context id to index
Rename the acl buf context id to index since to avoid confusing it with
the conn object ID parameter. Especially the bt_conn_lookup_id function
was creating confusion.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-02-21 21:28:30 +02:00
Martí Bolívar
8f740f9edf doc: dts/howtos.rst tweaks
A couple of tweaks and a TODO. I think this page could still use some
more love.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-21 12:42:40 -06:00
Martí Bolívar
9fbe872172 doc: dts/macros.rst improvements
Syntax highlight all the DTS fragments, add more internal
cross-referencing to making jumping around the HTML easier, and tweak
the language, filling in a missing piece here and there.

Fix a couple of DTS syntax errors caught by adding highlighting.

Add an ABNF grammar for the macros generated by DT, along with
some comments about why the current grammar is not ideal from a
generality point of view.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-21 12:42:40 -06:00
Martí Bolívar
0bcf84b155 doc: dts/intro.rst improvements
Syntax highlight all the DTS fragments and add some more explanatory
text.

Split the content about important properties into its own section, and
add a similar section about unit addresses.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-21 12:42:40 -06:00
Martí Bolívar
98c1828254 doc: dts/bindings.rst improvements
Add more cross-references, improve section titles, syntax highlight
DTS fragments, and improve some descriptions.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-02-21 12:42:40 -06:00
Andrew Boie
896e32b414 kernel: remove problematic pend() assertion
This assertion, if built in, allows users threads to crash
the kernel in a critical section by passing a negative timeout
value, creating a DoS attack vector.

Remove this assertion, immediately below it there's a check
which just resets it to 0 anyway.

Fixes: #22999

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-02-21 08:57:07 -08:00
Carles Cufi
2be22c0473 Bluetooth: tester: Update GAP cmds/evts to the latest BTP spec
Fill in all the missing commands and events in the latest BTP
specification.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-21 18:17:59 +02:00
Rubin Gerritsen
fa241f0249 bluetooth: Add decoding for BLE 5.2 version string
The BLE 5.2 specification has been assigned the version number 0x0b.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2020-02-21 16:53:16 +02:00
Ravi kumar Veeramally
01867fa28c tests: net: Simple test for net_pkt clone
Added simple test case for net_pkt_clone() to verify
cursor position after cloning.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2020-02-21 16:49:14 +02:00
Ravi kumar Veeramally
3ce7f89a8a net: pkt: Restore pkt cursor after cloning
net_pkt_clone() initializes the original packet cursor
and clone the packet. But it doesn't restore the cursor
back to original position.

Issue noticed when mDNS resolving fails when mdns responder
is also enabled.

net_conn_input(), in case of multicast packet, connection
handler clone the packet and deliver to matching handler.

Example case: dns_resolver and mdns_responder both register
handlers for 5353 port. After first clone original packet
cursor moved back to starting position. But first cloned
packet cursor is set properly. Second time cloning makes
cursor position to set to zero. Which makes second packet
handler header unpacking goes wrong.

Fixes #21970.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2020-02-21 16:49:14 +02:00
Stephanos Ioannidis
573db5af60 doc: release: Add ARM Cortex-R release notes
Add ARM Cortex-R architecture release notes

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-02-21 13:58:56 +02:00
Stephanos Ioannidis
451040aabf doc: release: Add ARM GIC release notes
Add ARM Generic Interrupt Controller (GIC) release notes

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-02-21 13:58:56 +02:00
Ioannis Glaropoulos
a9eaa28f4c doc: release: move CC2650 removal to Boards' section
We move the removal of the CC2650 board to the
section about ARM Boards (add, remove).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-21 13:58:56 +02:00
Ioannis Glaropoulos
1209989358 doc: release: v2.2.0 release notes for ARM architecture
Release notes for ARM for v2.2.0 Zephyr release.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-21 13:58:56 +02:00
Ioannis Glaropoulos
12497f1eb5 doc: release notes: change kernel to RTOS
Change Zephyr kernel to Zephyr RTOS in Release Notes'
title for v2.2 release, stressing that we deliver an
RTOS instead of a kernel only. Consistent with Zephyr
2.0 release notes.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-02-21 13:58:56 +02:00
Andrzej Puzdrowski
5e4d06cfd1 manifest: mcuboot 1.5.0 revision
Introduce exact 1.5.0 mcuboot release version
Difference to previous reference:
- imgtool: fix passing --erased-val with 0xff value
- mcuboot internal sim patches (not affected zephyr)
- release note ect.
- introduced default recovery trigger pin configuration for nRF5340

** No mcuboot embedded C code changes at all. **

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-02-21 13:58:37 +02:00
Carles Cufi
cee1954ac3 Bluetooth: tester: Add abundant logging in GAP
Log all error conditions in GAP for easier debugging.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-21 13:42:07 +02:00