The ID validation check would always fail with IDs less than
OTS_OBJ_ID_START_RANGE, where the intention was that it should
allow the OTS_OBJ_ID_DIR_LIST (0) value as well if
CONFIG_BT_OTS_DIR_LIST_OBJ was enabled.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of defining the string, that will be reported by DFU
as a name for DFU target, in code, pick it from the DTS label that
will be the DFU target.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Alternative settings are determined by number of flash partitions
available for DFU from DTS.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
IPv6 source address selection procedure selected link-local address
for any muticast destination with other scope than mesh-local. It
was a cause of problems for broader multicast scopes like admin-, or
site-local. For such broader scopes source address must be at least
as broad as the scope of multicast destination.
This patch updates IPv6 source address selection procedure. Now
link-local address is selected only for link-local destinations,
including multicast destinations. For broader destination scope,
source address with broader scope is selected.
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
The interrupt_util.h provides utils of trigger irq, now move them into
testsuite. All of the needed test cases can make use of them.
Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
Fix missing big_disconnect in hci_le_big_complete when the number of
BIS in the event is invalid.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Validate the big_handle before received from the controller before
using it as an array into the bigs array.
Discover by coverity: Insecure data handling (TAINTED_SCALAR)
Using tainted variable "big_handle" as an index into an array "bigs".
Cleanup state of BIG in pending or syncing state if it exists.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix parsing BIG handle which is just one octet as a two octet field,
which could have caused problems on big-endian systems.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Refactor the BIG initialized atomic handling to use bits instead of a
single atomic.
This allows for more bit flags to be added.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix race conditional when create connection cancel is called
and actually a connection did get setup while initiator is
being stopped.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Conditional compile adv_addr which is only used by
controller when supporting initiator/central role.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Move the initiated bit flag into role specific union, so that
other role specific bit flags can share bit space in the LLL
context structure.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix flash driver sync regression introduced due to changed
default ULL_HIGH in the commit 30634334a8 ("Bluetooth:
controller: Fix ULL_HIGH priority to be lower than LLL").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Updated ticker implementation to return lazy value for a
ticker when enumerating active tickers with time
reservations.
This is required to find offsets and to use the lazy value
to correctly calculate event and payload counter values that
needs to be filled into SyncInfo and BigInfo structures.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Previously, a non null-terminated "string" could
be passed to z_impl_net_addr_pton if the string was
exactly `INET6_ADDRSTRLEN` long.
Signed-off-by: James Harris <james.harris@intel.com>
Fixing problem where k_fifo functions have been used to get/put
data from/info net buf, where documentation has been strictly
forbidding so.
Found, reported and solution suggested by jrhees-cae.
Fixes: #32579
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This patch removes scenario which was testing deprecated
API behaviors. Needed as As flash_write_protection_set() was
deprecated and became no-operation.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Removed two unneeded `if` statements. These statements had not
effect in function results.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
flash_write_protection_set() was deprecated.
This patch removes usage of it and the test case which was
testing deprecated API behaviors.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
All IPSO objects that utilized the non-standard timestamp extension now
implement their model in version 1.1, which contains the Timestamp
resource. As it's no longer needed to add timestamp in a non-standard
way, simply remove LWM2M_IPSO_TIMESTAMP_EXTENSIONS option.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Update IPSO Pressure Sensor object implementation to support object
model version 1.1.
Add missing optional resources for the object model version 1.0.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Some of the objects redefined reusable resources IDs, while others used
a common header which defines resource IDs. Unify the approach and use
the header in every object.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Each object now have to specify the object version it implements.
Based on this information the LwM2M engine can decide whether it's
needed to report the object version during Registration/Discovery
operations or not.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
If the first network interface is down when the net config init
is run, then the IP addresses etc would be set to wrong network
interface. So when initializing the network, try to first find
a network interface that is auto started and use that to configure
IP addresses etc.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When printing network interface information print index or
index + pointer, so that the output is more user friendly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As DAD is not done for point-to-point links, we can mark them
valid immediately. If this is not done, then the address will
never be picked as a source address to a sent packet.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Useful to know what flags are set for the network interface
so print them in the shell by the "net iface" command.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>